/* Layout: header (brand · clock · account), section nav, then one view at a time.
   Identity from the brand artwork: deep navy, engraved gold, ivory; serif display, Plex for work. */
/* fonts are served with the app so it looks the same offline */
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/libre-caslon-text-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Libre Caslon Text'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/libre-caslon-text-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Libre Caslon Text'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/libre-caslon-text-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }
:root {
  --bg: #f6f2e8; --surface: #fffdf8; --surface-2: #f2ede1; --ink: #14233a; --muted: #5b6779; --line: #e1d9c6;
  --accent: #1c3f6e; --accent-ink: #ffffff; --accent-soft: #e5ebf4;
  --gold: #9c7a26; --gold-2: #c9a24a; --gold-soft: #f5ead0; --gold-ink: #1b1608;
  --good: #2b7a4b; --good-soft: #e3f2e8; --bad: #b3261e; --bad-soft: #fbe7e5; --amber: #a2650f; --amber-soft: #fbf0dc;
  --navy: #0b1a2e; --navy-2: #102542; --ivory: #efe6d2; --hero-gold: #d7b35e;
  --focus: #c9a24a; --shadow: 0 1px 2px rgba(20, 35, 58, .06), 0 8px 24px rgba(20, 35, 58, .06);
  --f-display: 'Libre Caslon Text', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --f-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', Consolas, 'SFMono-Regular', Menlo, monospace;
  --r: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a1424; --surface: #0f1e33; --surface-2: #13263f; --ink: #ece4d2; --muted: #9eabbd; --line: #213753;
  --accent: #9dbbe6; --accent-ink: #0a1424; --accent-soft: #172f4f;
  --gold: #dcbc68; --gold-2: #f1d88f; --gold-soft: #2a2414; --gold-ink: #1b1608;
  --good: #5fcf8e; --good-soft: #13301f; --bad: #ff8f85; --bad-soft: #3a1c1b; --amber: #e8aa52; --amber-soft: #33270f;
  --focus: #f1d88f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0a1424; --surface: #0f1e33; --surface-2: #13263f; --ink: #ece4d2; --muted: #9eabbd; --line: #213753;
  --accent: #9dbbe6; --accent-ink: #0a1424; --accent-soft: #172f4f;
  --gold: #dcbc68; --gold-2: #f1d88f; --gold-soft: #2a2414; --gold-ink: #1b1608;
  --good: #5fcf8e; --good-soft: #13301f; --bad: #ff8f85; --bad-soft: #3a1c1b; --amber: #e8aa52; --amber-soft: #33270f;
  --focus: #f1d88f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1440px; margin: 0 auto; padding-inline: 20px; padding-block: 18px 48px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.sub { color: var(--muted); margin: 4px 0 0; }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------------- header ---------------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 10px 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-rose { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-family: var(--f-display); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand-text small { font-size: 11.5px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.top-right > div { display: flex; gap: 8px; align-items: center; }
body:not(.authed) .user-only, body.authed .guest-only { display: none !important; }

.clock { position: relative; justify-self: center; }
.clock-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 18px; display: flex; flex-direction: column; align-items: center; cursor: pointer; line-height: 1.15; }
.clock-time { font-family: var(--f-mono); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock-date { font-size: 11.5px; color: var(--gold); font-weight: 600; letter-spacing: .04em; }
.calendar { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 292px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px; z-index: 30; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-family: var(--f-display); font-size: 16px; }
.cal-nav { border: 1px solid var(--line); background: var(--surface-2); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 13px; }
.cal-grid .dow { font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal-grid .d { padding: 6px 0; border-radius: 8px; font-variant-numeric: tabular-nums; }
.cal-grid .d.o { color: var(--muted); opacity: .45; }
.cal-grid .d.t { background: var(--gold-2); color: var(--gold-ink); font-weight: 700; }
.cal-grid .d.w { color: var(--gold); }
.cal-today { display: block; margin: 8px auto 0; }

.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.icon-btn .i-moon { fill: var(--ink); stroke: none; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; } :root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; } :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; } }

.user-menu { position: relative; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--gold-2); background: var(--navy); color: var(--hero-gold); font-weight: 700; cursor: pointer; font-size: 14px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; z-index: 30; display: flex; flex-direction: column; }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; min-width: 0; }
.menu-who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu a, .menu button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }

.appnav { display: flex; gap: 4px; align-items: center; padding: 8px 20px 0; max-width: 1440px; margin: 0 auto; overflow-x: auto; }
.appnav a { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.appnav a[aria-current="page"] { background: var(--navy); color: var(--hero-gold); }
.appnav .net { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.appnav .net.off { color: var(--amber); font-weight: 600; }
.demo-banner { max-width: 1440px; margin: 10px auto 0; padding: 10px 16px; border: 1px dashed var(--amber); background: var(--amber-soft); color: var(--ink); border-radius: 10px; font-size: 13.5px; width: calc(100% - 40px); }

/* ---------------- buttons & inputs ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 9px; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.gold { background: linear-gradient(180deg, #ecd185, #c9a24a 55%, #a9842f); border-color: #a9842f; color: var(--gold-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.big { padding: 11px 22px; font-size: 15.5px; }
.btn.full { width: 100%; }
.btn.light { color: var(--ivory); border-color: rgba(239, 230, 210, .5); }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
input, select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%; }
input:focus, select:focus { border-color: var(--gold-2); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); background: var(--surface); }
input.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
input.short { width: 110px; }
input.bad { border-color: var(--bad); background: var(--bad-soft); }

/* ---------------- gold flash after login ---------------- */
.gold-flash { position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, rgba(255, 226, 140, .65), rgba(212, 170, 70, .35) 45%, rgba(120, 90, 20, 0) 75%);
  animation: goldBlink .5s ease-in-out 3 both; }
@keyframes goldBlink { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; inset: -20% auto -20% -60%; width: 45%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 232, 160, .85), transparent); animation: sheen 1.1s ease-out .2s 2 both; pointer-events: none; }
@keyframes sheen { from { left: -60%; } to { left: 130%; } }
.brand.glow .brand-rose { animation: roseGlow 1.5s ease-in-out 1; }
@keyframes roseGlow { 0%, 100% { filter: none; transform: rotate(0); } 50% { filter: drop-shadow(0 0 10px #f3d47c) drop-shadow(0 0 22px #c9a24a); transform: rotate(45deg); } }

/* ---------------- landing ---------------- */
.landing { overflow: hidden; }
.hero { position: relative; background: radial-gradient(1200px 600px at 75% 20%, #16335a 0%, var(--navy-2) 45%, var(--navy) 100%); color: var(--ivory); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.gridline { stroke: rgba(160, 190, 230, .07); stroke-width: 1; }
.contours path { fill: none; stroke: rgba(170, 195, 230, .09); stroke-width: 1.1; }
.ht-line { fill: none; stroke: rgba(215, 179, 94, .35); stroke-width: 1.6; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.2s ease-out .4s forwards; }
.ht-pts circle { fill: var(--navy); stroke: var(--hero-gold); stroke-width: 1.6; opacity: 0; animation: pop .4s ease-out forwards; }
.ht-pts circle:nth-child(1) { animation-delay: .5s; } .ht-pts circle:nth-child(2) { animation-delay: .9s; } .ht-pts circle:nth-child(3) { animation-delay: 1.3s; } .ht-pts circle:nth-child(4) { animation-delay: 1.7s; } .ht-pts circle:nth-child(5) { animation-delay: 2.1s; } .ht-pts circle:nth-child(6) { animation-delay: 2.5s; } .ht-pts circle:nth-child(7) { animation-delay: 2.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 72px 28px 40px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: 32px; align-items: center; }
.h-pre { font-family: var(--f-display); color: var(--hero-gold); font-size: clamp(30px, 4.2vw, 56px); margin: 0; line-height: 1.05; }
.hero h1 { margin: 2px 0 0; font-family: var(--f-display); font-weight: 400; line-height: 1.02; }
.h-main { display: block; font-size: clamp(48px, 7.4vw, 104px); color: var(--ivory); letter-spacing: -.01em; }
.h-sub { display: block; font-size: clamp(26px, 3.9vw, 54px); color: var(--hero-gold); margin-top: 6px; }
.ornament { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; max-width: 640px; }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(215,179,94,.15), rgba(215,179,94,.8)); }
.ornament i:last-child { background: linear-gradient(90deg, rgba(215,179,94,.8), rgba(215,179,94,.15)); }
.ornament svg { width: 40px; height: 12px; fill: var(--hero-gold); }
.tagline { font-family: var(--f-display); font-style: italic; font-size: clamp(22px, 2.4vw, 32px); margin: 0; color: #e4dcc8; }
.lead { max-width: 58ch; color: #b9c4d6; font-size: 16.5px; margin: 18px 0 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.cta-note { color: #8f9db3; font-size: 13px; margin: 12px 0 0; }
.hero-rose { position: relative; display: grid; place-items: center; }
.hero-rose .n { font-family: var(--f-display); color: var(--hero-gold); font-size: 34px; font-weight: 700; margin-bottom: -6px; }
.rose-big { width: min(360px, 80%); aspect-ratio: 1; max-width: 100%; filter: drop-shadow(0 12px 30px rgba(0,0,0,.45)); animation: roseIn 1.4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes roseIn { from { transform: rotate(-45deg) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-rule { max-width: 1240px; margin: 0 auto; padding: 0 28px 34px; display: flex; align-items: center; gap: 8px; }
.hero-rule i { flex: 1; height: 1.5px; background: linear-gradient(90deg, rgba(215,179,94,.9), rgba(215,179,94,.6)); }
.hero-rule svg { width: 22px; height: 22px; fill: none; stroke: var(--hero-gold); stroke-width: 1.5; }

.sec-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 3vw, 40px); margin: 0 0 22px; line-height: 1.15; }
.sec-title em { color: var(--gold); font-style: italic; }
.features, .how, .preview { max-width: 1240px; margin: 0 auto; padding: 64px 28px 0; }
.f-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.f-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.f-card svg { width: 44px; height: 44px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.f-card svg .beam { stroke: var(--bad); }
.f-card h3 { font-family: var(--f-display); font-weight: 700; font-size: 20px; margin: 10px 0 6px; }
.f-card p { margin: 0; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--gold-2); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-display); color: var(--gold); font-size: 28px; }
.steps b { font-size: 17px; }
.steps span { color: var(--muted); }
.preview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding-bottom: 72px; }
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.pv-cap { margin: 0; font-size: 12.5px; color: var(--muted); }
.pv-copy p { color: var(--muted); font-size: 16px; }
.foot { border-top: 1px solid var(--line); padding: 22px 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 13.5px; }
.foot .brand-rose { width: 26px; height: 26px; }

/* ---------------- auth ---------------- */
.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(900px 500px at 50% 0%, var(--gold-soft), transparent 70%); }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.auth-rose { width: 64px; height: 64px; align-self: center; }
.auth-card h1 { font-family: var(--f-display); font-weight: 400; font-size: 32px; margin: 0; text-align: center; }
.auth-card .sub { text-align: center; margin: -4px 0 6px; }
.auth-card label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; }
.auth-card label small { font-weight: 400; color: var(--muted); }
.auth-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-msg { margin: 0; min-height: 0; font-size: 13.5px; color: var(--bad); }
.form-msg.ok { color: var(--good); }
.form-msg:empty { display: none; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }

/* ---------------- dashboard ---------------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); margin: 2px 0 0; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--f-display); font-size: 32px; font-weight: 400; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 12.5px; display: block; }
.kpi.gold { background: linear-gradient(135deg, var(--navy-2), var(--navy)); border-color: #2a4268; color: var(--ivory); }
.kpi.gold span, .kpi.gold small { color: #b9c4d6; } .kpi.gold b { color: var(--hero-gold); }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card > h2 { font-size: 16px; margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
.card > h2 > b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 13px; }
.card > h2 small { font-weight: 400; color: var(--muted); font-size: 13px; }
.jobs-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.jobs-tools h2 { font-size: 16px; margin: 0 auto 0 0; }
.jobs-tools input { width: 210px; }
.filters { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.filters button { border: 0; background: none; padding: 5px 13px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 13.5px; }
.filters button[aria-selected="true"] { background: var(--navy); color: var(--hero-gold); }
.job-list { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; }
.job .kind { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); }
.job .kind svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.job .meta { min-width: 0; }
.job .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }
.job .meta span { color: var(--muted); font-size: 12.5px; }
.job .fig { font-family: var(--f-mono); font-size: 13px; text-align: right; color: var(--muted); }
.job .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.job .acts .btn { padding: 6px 11px; font-size: 13.5px; }
.job.confirming { background: var(--bad-soft); border-radius: 10px; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; margin-left: 6px; vertical-align: 1px; font-family: var(--f-sans); }
.pill.accepted { background: var(--good-soft); color: var(--good); } .pill.rejected { background: var(--bad-soft); color: var(--bad); }
.pill.open { background: var(--amber-soft); color: var(--amber); } .pill.incomplete { background: var(--surface-2); color: var(--muted); }
.pill.sync { background: var(--accent-soft); color: var(--accent); }
.empty-state { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty-state svg { width: 56px; height: 56px; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin: 6px 0 2px; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.mini b { font-size: 14.5px; }
.mini span { font-size: 12.5px; color: var(--muted); }
.mini .btn { align-self: flex-start; padding: 5px 11px; font-size: 13px; margin-top: 4px; }
.activity { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 34px 1fr 26px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.bar-row i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); min-width: 2px; }
.bar-row em { font-style: normal; text-align: right; font-family: var(--f-mono); color: var(--ink); }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 12, 22, .55); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(520px, 100%); background: var(--surface); border-radius: 16px; border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; max-height: 90vh; overflow: auto; }
.modal-card h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0; }
.share-row { display: flex; gap: 8px; }
.share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.share-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.share-list li span { overflow: hidden; text-overflow: ellipsis; }
.modal-actions { display: flex; justify-content: flex-end; }

/* ---------------- tools ---------------- */
.details { margin-bottom: 14px; padding: 0; }
.details summary { cursor: pointer; padding: 12px 18px; display: flex; gap: 12px; align-items: baseline; font-weight: 600; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary::before { content: '▸'; color: var(--gold); }
.details[open] summary::before { content: '▾'; }
.details summary em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 0 18px 16px; }
.details-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.panel[hidden] { display: none; }
.panel > .jobbar, .panel > .confirm { grid-column: 1 / -1; }
.jobbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow); }
.jobname { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 0; max-width: 480px; }
.jobname span { font-weight: 700; color: var(--gold); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.jobstate { font-size: 12.5px; color: var(--muted); }
.jobstate.ok { color: var(--good); } .jobstate.warn { color: var(--amber); font-weight: 600; }
.jobbar .sp { flex: 1; }
.confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bad-soft); border: 1px solid var(--bad); border-radius: var(--r); padding: 10px 14px; }
.confirm span { font-weight: 600; margin-right: auto; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.result { display: flex; flex-direction: column; gap: 14px; }
.example-note { margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--navy); color: var(--hero-gold); }
.known { display: grid; grid-template-columns: 92px minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.known.lv { grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); }
.kh { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kl { font-weight: 600; font-size: 14px; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table.grid { width: 100%; border-collapse: collapse; min-width: 520px; }
.grid th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.grid td { padding: 3px 4px; border-bottom: 1px solid var(--line); }
.grid tr:last-child td { border-bottom: 0; }
.grid td.n, .grid th.n { width: 34px; text-align: center; color: var(--muted); font-size: 12.5px; font-family: var(--f-mono); }
.grid th.x, .grid td.x { width: 34px; text-align: center; }
.grid input { border-color: transparent; background: transparent; padding: 6px 8px; }
.grid input:hover { border-color: var(--line); }
.grid input:focus { background: var(--surface); border-color: var(--gold-2); }
.grid input.bad { border-color: var(--bad); background: var(--bad-soft); }
.grid tr.fixed td { background: var(--accent-soft); }
.grid tr.fixed .val { font-family: var(--f-mono); text-align: right; padding: 6px 9px; display: block; font-variant-numeric: tabular-nums; }
.grid tr.fixed .nm { font-weight: 600; padding: 6px 9px; display: block; }
.grid tr.fixed .tag { font-size: 11.5px; color: var(--accent); font-weight: 600; padding: 6px 9px; display: block; }
.grid tr.closing td { background: var(--gold-soft); }
.grid tr.closing .tag { color: var(--gold); }
.del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.del:hover { color: var(--bad); background: var(--bad-soft); }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.methods.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; cursor: pointer; background: var(--surface-2); }
.m input { width: auto; margin-top: 4px; accent-color: var(--gold); }
.m span { display: flex; flex-direction: column; }
.m small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.m:has(input:checked) { border-color: var(--gold-2); background: var(--gold-soft); }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.ratio { font-family: var(--f-mono); }

/* results */
.status { border-radius: var(--r); padding: 16px 18px; display: flex; gap: 14px; align-items: center; border: 1px solid; }
.status .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; color: #fff; }
.status h3 { margin: 0; font-size: 18px; }
.status p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.status.pass { background: var(--good-soft); border-color: var(--good); } .status.pass .ic { background: var(--good); color: var(--surface); } .status.pass h3 { color: var(--good); }
.status.fail { background: var(--bad-soft); border-color: var(--bad); } .status.fail .ic { background: var(--bad); color: var(--surface); } .status.fail h3 { color: var(--bad); }
.status.open { background: var(--amber-soft); border-color: var(--amber); } .status.open .ic { background: var(--amber); color: var(--surface); } .status.open h3 { color: var(--amber); }
.status.wait { background: var(--surface); border-color: var(--line); } .status.wait .ic { background: var(--muted); color: var(--surface); }
.errs { margin: 8px 0 0; padding-left: 18px; color: var(--bad); font-size: 13.5px; }
.warns { margin: 0; padding-left: 18px; color: var(--amber); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-width: 0; }
.stat span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--f-mono); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat b small { font-size: 12px; color: var(--muted); }
.stat.hl b { color: var(--gold); }
.out { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.out h3 { margin: 0; padding: 12px 16px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.out h3 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.tw { overflow-x: auto; }
table.res { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; }
.res th { text-align: right; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.res th:first-child, .res td:first-child { text-align: left; }
.res td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res td:first-child { font-family: var(--f-sans); font-weight: 600; }
.res tr:last-child td { border-bottom: 0; }
.res td.strong { color: var(--gold); font-weight: 500; }
.res td.txt { font-family: var(--f-sans); text-align: left; color: var(--muted); white-space: normal; }
.res td.warn { color: var(--amber); font-weight: 600; }
.res td.empty { text-align: center; font-family: var(--f-sans); color: var(--muted); padding: 18px; }
.res tr.k td { background: var(--accent-soft); }
.res tr.sum td { font-weight: 600; background: var(--surface-2); }
.res td.ok { color: var(--good); font-family: var(--f-sans); font-weight: 700; }
.res td.no { color: var(--bad); font-family: var(--f-sans); font-weight: 700; }
.sketch { padding: 10px; }
.sketch svg { width: 100%; height: auto; display: block; max-height: 360px; }
.sketch .leg { stroke: var(--gold); stroke-width: 2.4; fill: none; }
.sketch .raw { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.sketch .ref { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; fill: none; }
.sketch .pt { fill: var(--surface); stroke: var(--gold); stroke-width: 2; }
.sketch .kn { fill: var(--bad); }
.sketch text { fill: var(--ink); font: 600 12px var(--f-sans); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.sketch .nt { fill: var(--muted); font-weight: 700; }
.sketch .na { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 16px 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--gold); vertical-align: middle; margin-right: 6px; }
.legend i.r { border-top: 2px dashed var(--accent); }
.exports { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.closed-only.hide { display: none !important; }

/* ---------------- simulator ---------------- */
.sim-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); margin: 2px 0 0; }
.sim-head .sub { max-width: 80ch; }
.sim-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; margin-top: 18px; align-items: start; }
.sim-ctrl { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 90px; }
.sim-ctrl label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; }
.sim-ctrl label b { color: var(--gold); font-family: var(--f-mono); }
.sim-ctrl label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.sim-ctrl input[type=checkbox], .sim-ctrl input[type=range] { width: auto; accent-color: var(--gold); }
.sim-ctrl input[type=range] { width: 100%; padding: 0; }
.seed { display: flex; gap: 6px; }
.sim-btns { display: flex; gap: 8px; } .sim-btns .btn { flex: 1; }
.sim-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sim-stage-card { padding: 0; overflow: hidden; }
.sim-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.sim-prog { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.sim-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .3s; }
.sim-stage { background: radial-gradient(900px 500px at 70% 10%, #16335a, var(--navy) 70%); }
.sim-stage svg { display: block; width: 100%; height: auto; }
.sim-stage .grid path { stroke: rgba(160, 190, 230, .07); }
.sim-stage .contour { fill: none; stroke: rgba(170, 195, 230, .09); stroke-width: 1.2; }
.sim-stage .true-path { fill: none; stroke: rgba(239, 230, 210, .35); stroke-width: 1.2; stroke-dasharray: 3 5; }
.sim-stage .bs-line { stroke: rgba(239, 230, 210, .25); stroke-dasharray: 2 6; }
.sim-stage .meas-path { fill: none; stroke: var(--hero-gold); stroke-width: 2.6; stroke-linejoin: round; }
.sim-stage .known path { fill: #e0574b; stroke: #f8d9d5; stroke-width: 1; }
.sim-stage text { fill: #e9e1cc; font: 600 13px var(--f-sans); }
.sim-stage .mp circle { fill: var(--navy); stroke: var(--hero-gold); stroke-width: 2.2; }
.sim-stage .mp.new circle { animation: ping .8s ease-out; }
@keyframes ping { 0% { r: 14; stroke-width: 6; } 100% { r: 6; stroke-width: 2.2; } }
.sim-stage .sight { fill: none; stroke-width: 2; }
.sim-stage .sight.back { stroke: #9dbbe6; stroke-dasharray: 6 5; }
.sim-stage .sight.beam { stroke: #ff5a4a; stroke-width: 2.4; filter: drop-shadow(0 0 4px #ff5a4a); }
.sim-stage .prism path { fill: #f1d88f; stroke: #f1d88f; stroke-width: 1.6; }
.sim-stage .ts-leg { stroke: #c9b07a; stroke-width: 2.2; fill: none; }
.sim-stage .ts-body { fill: #f2c14e; stroke: #3b2d0a; stroke-width: 1.2; }
.sim-stage .ts-scope { fill: #2b2b2b; }
.sim-stage .ts-eye { fill: #1b3a63; stroke: #9dbbe6; stroke-width: 1; }
.sim-stage .north path { stroke: var(--hero-gold); stroke-width: 1.8; fill: none; }
.sim-stage .north text { fill: var(--hero-gold); font: 700 15px var(--f-display); }
.sim-read { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.sim-read div { background: var(--surface); padding: 9px 14px; min-width: 0; }
.sim-read .wide { grid-column: 1 / -1; }
.sim-read span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sim-read b { font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.sim-summary { display: flex; flex-direction: column; gap: 10px; }
.sim-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--navy); color: var(--ivory); border: 1px solid var(--hero-gold); padding: 10px 18px; border-radius: 10px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 60; max-width: calc(100% - 32px); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) { .panel { grid-template-columns: minmax(0, 1fr); } .dash-cols { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
  .hero-rose { order: -1; } .rose-big { width: 200px; }
  .f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview { grid-template-columns: minmax(0, 1fr); }
  .sim-layout { grid-template-columns: minmax(0, 1fr); } .sim-ctrl { position: static; }
  .top { grid-template-columns: auto 1fr auto; } .clock { justify-self: center; }
  .brand-text small { display: none; }
}
@media (max-width: 680px) {
  .top { grid-template-columns: 1fr auto; padding: 8px 16px; }
  .clock { grid-column: 1 / -1; grid-row: 2; }
  .brand-text b { font-size: 17px; }
  .top-right .btn { padding: 7px 11px; font-size: 13.5px; }
  #dash-link { display: none; }
  .wrap { padding-inline: 16px; }
  .appnav { padding-inline: 16px; }
  .hero-inner, .hero-rule, .features, .how, .preview { padding-inline: 16px; }
  .f-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job { grid-template-columns: 42px minmax(0, 1fr); } .job .fig { text-align: left; grid-column: 2; } .job .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .details-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .known, .known.lv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; }
  .known .kh { display: none; } .known .kl { grid-column: 1 / -1; margin-top: 6px; }
  .known:not(.lv) > input:not(.num) { grid-column: 1 / -1; }
  .methods, .methods.two { grid-template-columns: minmax(0, 1fr); }
  .auth-card .two { grid-template-columns: minmax(0, 1fr); }
  .sim-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobs-tools input { width: 100%; }
  .demo-banner { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .gold-flash { animation: goldOnce .8s ease-out 1 both !important; }
  @keyframes goldOnce { 0% { opacity: .7; } 100% { opacity: 0; } }
}
@media (prefers-reduced-motion: no-preference) { .btn, .appnav a, .seg button, .filters button { transition: background .15s, color .15s, filter .15s; } }
