/* Hugvis — logged-in area (login, app, admin). Same tokens as the public site (README). */
:root {
  --bg: #F3EEE4; --white: #FBF9F4; --sunken: #EAE3D5; --deeper: #DFD7C7;
  --ink: #13203F; --body: #3D4A5C; --muted: #5F6B7C; --faint: #5F6B7C; --disabled: #A6AEBB;
  --blue: #3B5BFF; --blue-hover: #2A4BB8; --blue-100: #E6EBF8; --blue-200: #C9D4F2;
  --green: #2F7D4F; --green-100: #E4F2E9; --risk: #9A3F1C; --risk-100: #F6E7E0;
  --line: #D9D1C2; --line-strong: #BFB5A2; --border-strong: #13203F;
  --serif: "Spectral", Georgia, serif; --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0.1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); } h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); } h3 { font-size: 1.25rem; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; } a:hover { color: var(--blue-hover); }
*:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
button { font-family: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.narrow { max-width: 760px; }
.section { padding: clamp(32px, 5vw, 56px) 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.lead { font-size: 1.0625rem; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 15px; }

/* header */
.hdr { position: sticky; top: 0; z-index: 20; height: 64px; background: rgba(245,247,250,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hdr .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 28px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { color: var(--blue); }
.hdr nav { margin-left: auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hdr nav a { color: var(--faint); text-decoration: none; font-size: 16px; } .hdr nav a:hover, .hdr nav a.on { color: var(--ink); }
.hdr .who { font-size: 15px; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 4px; font: 500 16px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease); }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); } .btn-secondary:hover { background: var(--sunken); border-color: var(--body); }
.btn-ghost { background: transparent; color: var(--blue); } .btn-ghost:hover { background: var(--blue-100); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* cards & tags */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 24px; }
.card.featured { border: 1.5px solid var(--blue); }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); } .card.dark h2, .card.dark h3 { color: #fff; } .card.dark .muted { color: #D6DEF5; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.tag { display: inline-block; border-radius: 3px; padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.4; background: var(--sunken); color: var(--muted); }
.tag.verified { background: var(--green-100); color: var(--green); } .tag.accent { background: var(--blue-100); color: var(--blue); } .tag.risk { background: var(--risk-100); color: var(--risk); }
.stat { font-family: var(--serif); font-weight: 500; font-size: 2.4rem; line-height: 1.1; color: var(--ink); }
.stat small { font-family: var(--sans); font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 6px; }

/* forms */
label { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px; font: 16px/1.4 var(--sans); color: var(--ink); background: var(--white); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); align-items: end; }
.hint { font-size: 15px; color: var(--muted); margin-top: 6px; }
.notice { border-left: 3px solid var(--blue); background: var(--blue-100); padding: 12px 16px; border-radius: 0 6px 6px 0; font-size: 15px; }
.notice.ok { border-color: var(--green); background: var(--green-100); } .notice.bad { border-color: var(--risk); background: var(--risk-100); }

/* lists & tables */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.num { font-family: var(--serif); color: var(--blue); min-width: 2ch; }
.lock { margin-left: auto; font-size: 13px; color: var(--faint); white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
th { background: var(--sunken); border-top: 0; font-weight: 700; color: var(--ink); }
.tablewrap { overflow-x: auto; }
td select { min-height: 36px; padding: 4px 8px; font-size: 15px; width: auto; }

/* accordion / parts */
.part { border: 1px solid var(--line); border-radius: 8px; background: var(--white); margin-bottom: 10px; }
.part > button { all: unset; display: flex; width: 100%; gap: 14px; align-items: center; padding: 16px 20px; cursor: pointer; box-sizing: border-box; }
.part > button .num { font-size: 1.1rem; } .part > button .t { color: var(--ink); font-weight: 500; flex: 1; }
.part > button .n { color: var(--muted); font-size: 15px; } .part > button .chev { transition: transform .16s var(--ease); color: var(--muted); }
.part.open > button .chev { transform: rotate(180deg); }
.part .body { display: none; padding: 0 20px 18px 54px; } .part.open .body { display: block; }
.part .q { font-style: italic; color: var(--muted); margin-bottom: 10px; font-family: var(--serif); }

/* progress */
.bar { height: 4px; background: var(--sunken); border-radius: 999px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); }
.tabs { display: flex; gap: 4px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs button { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 4px; font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; }
.panel { display: none; } .panel.on { display: block; }
.copybox { white-space: pre-wrap; font-size: 15px; background: var(--sunken); border-radius: 6px; padding: 16px; font-family: var(--sans); }
footer.ftr { border-top: 1px solid var(--line); padding: 28px 0; font-size: 15px; color: var(--muted); margin-top: 40px; }
@media (max-width: 860px) { .hdr nav { gap: 14px; } .hdr .who { display: none; } }
