/* naclie.dev shared styles. Fonts are self-hosted (SIL OFL, see /fonts/). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin-var.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #F7F7F4; --surface: #FFFFFF; --fg: #17181A; --fg-2: #3D3F44; --muted: #5E6066;
  --line: #E2E2DC; --line-soft: #EEEEE8; --accent: #2F5BEA; --accent-hover: #1E3FB0;
  --rss: #C2560C; --code-bg: #F1F1EC;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416; --surface: #1C1D20; --fg: #ECECEA; --fg-2: #C9CAC6; --muted: #9A9C9F;
    --line: #2E3034; --line-soft: #26282B; --accent: #7C9BFF; --accent-hover: #A8BCFF;
    --rss: #F08A4B; --code-bg: #232428;
  }
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 Inter, system-ui, sans-serif; color: var(--fg); background: var(--bg); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, .brand { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-weight: 600; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-size: 20px; color: var(--fg); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { color: var(--fg); }
.topbar nav { display: flex; gap: 16px; font-size: 14px; }
.pill { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--fg); color: var(--bg); }

main { max-width: 880px; margin: 0 auto; padding: 48px 16px; }
main.narrow { max-width: 680px; }
h1 { margin: 0 0 8px; font-size: 36px; line-height: 1.2; }
.lede { margin: 0 0 32px; color: var(--fg-2); }
h2 { font-size: 24px; margin: 0; }
.muted { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none; min-height: 120px; }
a.card:hover { border-color: var(--accent); color: var(--fg); }
.card strong { font-size: 17px; }
.card span { font-size: 14px; color: var(--muted); }
.card .icon { width: 24px; height: 24px; color: var(--accent); }
.card.soon { opacity: .85; }
.tag { align-self: flex-start; font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }

.feed { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.feed h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.feed h3::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--rss); flex: none; }
.feed a, .feed .item { display: flex; flex-direction: column; gap: 2px; color: var(--fg); text-decoration: none; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 500; }
.feed a:hover { color: var(--accent); }
.feed small { font-size: 12px; font-weight: 400; color: var(--muted); }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 20px; color: var(--muted); font-size: 14px; }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.box h2 { font-family: Inter, system-ui, sans-serif; font-size: 18px; }
.big { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-size: 40px; font-weight: 600; margin: 0; }
.notice { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-bottom: 1px solid var(--line); padding: 10px 24px; font-size: 14px; color: var(--fg-2); }

pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; font-size: 13px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
pre code { background: none; padding: 0; }

footer { margin-top: 48px; font-size: 13px; color: var(--muted); }

@media (max-width: 480px) { h1 { font-size: 30px; } main { padding: 32px 16px; } .topbar { padding: 14px 16px; } }

/* Sign-in pages (login.naclie.dev) */
main.auth { max-width: 460px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.panel h1 { font-size: 28px; margin: 0; }
.panel .lede { margin: 0; }
.step { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
label small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]) { height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 16px; background: var(--bg); color: var(--fg); }
input:focus-visible, .btn:focus-visible, .linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.code { font-size: 22px; letter-spacing: 3px; height: 52px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: 18px; height: 18px; }
.btn { height: 48px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; padding: 0 18px; }
.btn:hover { background: var(--accent-hover); }
.btn.small { height: 38px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.linkish { background: none; border: none; padding: 0; font: inherit; font-size: 14px; color: var(--accent); cursor: pointer; text-decoration: underline; }
.error { margin: 0; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, #D93025 12%, var(--surface)); color: var(--fg); font-size: 14px; }
.notice-ok { margin: 0; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, #1F7A4A 14%, var(--surface)); font-size: 14px; }
.qr { align-self: center; width: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 15px; word-break: break-all; }
.codes { columns: 2; margin: 0; padding-left: 24px; font-size: 15px; line-height: 2; }
.stack { display: flex; flex-direction: column; gap: 20px; }
main.auth:has(.stack) { max-width: 680px; }
.sessions { list-style: none; margin: 0; padding: 0; }
.sessions li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.sessions li div { display: flex; flex-direction: column; gap: 2px; }
form.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
form.inline label { flex: 1 1 200px; }
.btn.ghost-strong { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.ghost-strong:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-hover); }
.divider { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
/* Sign-in service: admin page */
main.auth:has(.stack.wide) { max-width: 960px; }
.account-row details { flex-basis: 100%; }
.account-row summary { cursor: pointer; color: var(--accent, inherit); }
.sessions li .actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.btn.danger { color: #b42318; border-color: currentColor; }
.log { overflow-x: auto; }
.log table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log th, .log td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line-soft); white-space: nowrap; }
.log tr.bad td { color: #b42318; }
strong.bad { color: #b42318; }
.btn.danger-fill { background: #b42318; border-color: #b42318; color: #fff; }
fieldset.levels { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
fieldset.levels legend { font-weight: 600; margin-bottom: 6px; }
pre.letter { white-space: pre-wrap; font: inherit; font-size: 14px; background: var(--line-soft); padding: 12px; border-radius: 8px; }
textarea { width: 100%; font: inherit; }
form.inline label { min-width: 0; } .box input, .box textarea { max-width: 100%; box-sizing: border-box; }
