* { box-sizing: border-box; }
:root {
  --navy: #0f2542; --blue: #1f5fd1; --bg: #f0f2f6; --card: #fff;
  --line: #e2e6ee; --text: #16202e; --muted: #667389;
}
body { margin: 0; font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 40px; background: var(--navy); color: #fff; }
.logo { background: var(--blue); font-weight: 700; font-size: .85rem; padding: 8px 10px; border-radius: 8px; }
.brand { font-size: 1.1rem; }
.brand b { font-weight: 700; }

.toptabs { display: flex; gap: 8px; padding: 0 40px; background: var(--card); border-bottom: 1px solid var(--line); }
.top-btn { padding: 18px 20px 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font: 600 .95rem inherit; font-family: inherit; cursor: pointer; }
.top-btn:hover { color: var(--text); }
.top-btn.active { color: var(--text); border-bottom-color: var(--blue); }

.page { max-width: 960px; margin: 28px auto; padding: 0 24px; }
.top-content, .sub-content { display: none; }
.top-content.active, .sub-content.active { display: block; }

.target-info { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; display: flex; gap: 32px; flex-wrap: wrap; font-size: .9rem; }
.target-info div span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 2px; }

.subtabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.sub-btn { padding: 8px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer; }
.sub-btn:hover { color: var(--text); }
.sub-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
h2 { margin: 0 0 6px; font-size: 1.35rem; }
.hint { color: var(--muted); font-size: .92rem; margin: 0 0 4px; max-width: 70ch; }
.tool-form { display: flex; gap: 8px; margin: 16px 0; }
.tool-form input { flex: 1; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; }
.tool-form input:focus, .sub-btn:focus-visible, .top-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tool-form button { padding: 11px 18px; border-radius: 8px; border: none; background: var(--blue); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.terminal-output { background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; padding: 14px; white-space: pre-wrap; font-family: "SFMono-Regular", Consolas, monospace; font-size: .85rem; color: #1d2a3d; min-height: 60px; margin: 0; }
.card-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.card { background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
.card .meta { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.card p { margin: 0; font-size: .92rem; white-space: pre-wrap; }
@media (max-width: 600px) { .topbar, .toptabs { padding-left: 16px; padding-right: 16px; } .tool-form { flex-direction: column; } }

h3 { margin: 18px 0 8px; font-size: 1rem; }
.card h3 { margin: 0 0 4px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.li-bar { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.li-logo { font-weight: 700; font-size: 1.3rem; color: #0a66c2; }
.li-logo b { background: #0a66c2; color: #fff; border-radius: 4px; padding: 0 5px; margin-left: 2px; }
.li-search { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.li-search input { flex: 1; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: #eef3f8; font: inherit; }
.li-search button { padding: 9px 16px; border-radius: 999px; border: 1px solid #0a66c2; background: #fff; color: #0a66c2; font: inherit; font-weight: 600; cursor: pointer; }
.li-card { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.li-card:hover, .paste-row:hover { border-color: #0a66c2; }
.paste-row { cursor: pointer; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: #c7d8ee; color: #234; display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.big { width: 88px; height: 88px; font-size: 1.6rem; margin-top: -44px; border: 4px solid #fff; position: relative; }
.li-banner { height: 90px; border-radius: 10px 10px 0 0; background: linear-gradient(90deg, #a9c4e6, #d5e3f5); margin-top: 14px; }
.li-profile { margin-top: 4px; }
.li-profile ul { margin: 0; padding-left: 20px; }
.li-profile .sub-btn { margin-top: 14px; }

.rd-post { display: flex; gap: 14px; cursor: pointer; align-items: flex-start; }
.rd-post:hover, .rd-post.open { border-color: var(--blue); }
.rd-main { flex: 1; min-width: 0; }
.rd-votes { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: .8rem; min-width: 34px; user-select: none; }
.rd-votes b { color: var(--text); font-size: .85rem; }
.rd-chev { color: var(--muted); transition: transform .15s; }
.job-row.open .rd-chev { transform: rotate(180deg); }
.rd-body { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); white-space: pre-wrap; font-size: .9rem; }
pre.rd-body { font-family: "SFMono-Regular", Consolas, monospace; background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }

.addr { margin-top: 0; }
.addr button[type=button] { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.addr input { font-family: "SFMono-Regular", Consolas, monospace; font-size: .88rem; }
#browser-view a.nav { color: var(--blue); font-weight: 600; text-decoration: none; }
#browser-view a.nav:hover { text-decoration: underline; }
