@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f4f3ef; --surface: #ffffff; --surface-2: #f0efea; --surface-3: #e7e5de; --ink: #111816; --ink-2: #3b4541; --muted: #6b7571;
  --line: #e3e1da; --accent: #0f7a64; --accent-2: #0b5f4e; --accent-ink: #ffffff; --accent-soft: #dff1ea;
  --warn: #9a5b00; --warn-soft: #fbefd6; --bad: #b3372b; --bad-soft: #f9e2de; --star: #c28a00; --star-soft: #fbf1d3;
  --shadow-sm: 0 1px 2px rgb(16 24 20 / .06); --shadow: 0 1px 2px rgb(16 24 20 / .05), 0 8px 24px -12px rgb(16 24 20 / .18);
  --shadow-lg: 0 24px 60px -20px rgb(16 24 20 / .35); --r: 16px; --r-sm: 10px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1211; --surface: #161b19; --surface-2: #1c2220; --surface-3: #252c29; --ink: #eef2f0; --ink-2: #c9d1cd; --muted: #93a09a;
    --line: #29312e; --accent: #4cc5a3; --accent-2: #7fd8bf; --accent-ink: #06130f; --accent-soft: #15302a;
    --warn: #e8b562; --warn-soft: #33291a; --bad: #f08c80; --bad-soft: #3a2320; --star: #f0c54f; --star-soft: #33301a;
    --shadow-sm: none; --shadow: 0 1px 0 rgb(255 255 255 / .03); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1211; --surface: #161b19; --surface-2: #1c2220; --surface-3: #252c29; --ink: #eef2f0; --ink-2: #c9d1cd; --muted: #93a09a;
  --line: #29312e; --accent: #4cc5a3; --accent-2: #7fd8bf; --accent-ink: #06130f; --accent-soft: #15302a;
  --warn: #e8b562; --warn-soft: #33291a; --bad: #f08c80; --bad-soft: #3a2320; --star: #f0c54f; --star-soft: #33301a;
  --shadow-sm: none; --shadow: 0 1px 0 rgb(255 255 255 / .03); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .7);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 1.7rem; font-weight: 750; } h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .76rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.hidden { display: none !important; }

/* buttons & inputs */
button, .btn { font: inherit; font-weight: 550; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--muted); text-decoration: none; }
button:active { transform: scale(.98); }
.primary { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
.primary:hover { background: var(--accent-2) !important; }
.ghost { background: transparent; border-color: transparent; }
.ghost:hover { background: var(--surface-2); border-color: transparent; }
.sm { padding: 5px 11px; font-size: .84rem; }
.big { padding: 12px 20px; font-size: 1rem; width: 100%; }
.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.on-star { color: var(--star) !important; border-color: var(--star) !important; background: var(--star-soft) !important; }
.on-bad { color: var(--bad) !important; border-color: var(--bad) !important; background: var(--bad-soft) !important; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
label { display: grid; gap: 5px; font-size: .84rem; font-weight: 550; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; } .check input { width: auto; }

/* shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -.02em; padding: 4px 8px; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #2a9d8f 60%, #7cc6a4); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm); }
.brand .mark svg { width: 18px; height: 18px; }
.acct { width: 100%; justify-content: space-between; border-radius: 12px; padding: 9px 12px; text-align: left; }
.acct small { display: block; color: var(--muted); font-weight: 500; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 550; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.budget { font-size: .78rem; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 5px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.warn i { background: var(--warn); }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; color: var(--ink); }
.me-chip:hover { background: var(--surface-2); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); display: inline-grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; overflow: hidden; border: 2px solid var(--surface); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatars { display: inline-flex; } .avatars .avatar { margin-left: -8px; width: 28px; height: 28px; } .avatars .avatar:first-child { margin-left: 0; }
.main { min-width: 0; padding: 26px 30px 60px; }
.topbar, .bottomnav { display: none; }

/* page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin-top: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { padding: 14px 16px; } .kpi b { display: block; font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; } .kpi span { color: var(--muted); font-size: .84rem; }

/* images */
.photo { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 20% 20%, #4f9c86 0%, transparent 55%), radial-gradient(90% 80% at 85% 90%, #2e6f8a 0%, transparent 60%), linear-gradient(135deg, #1f5a4d, #2b6f7c); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.photo.pin::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 6px rgb(255 255 255 / .35), 0 2px 6px rgb(0 0 0 / .4); }
.photo .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 0 0 / .62)); }
.credit { position: absolute; right: 8px; bottom: 6px; font-size: .62rem; color: rgb(255 255 255 / .75); text-shadow: 0 1px 2px rgb(0 0 0 / .6); }

/* watch cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.wcard { overflow: hidden; display: grid; align-content: start; align-self: start; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.wcard:hover img { transform: scale(1.04); }
.wcard .photo { aspect-ratio: 16 / 9; }
.wcard .over { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; }
.wcard .over h2 { color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .4); }
.wcard .tag { position: absolute; top: 12px; left: 12px; }
.wcard .body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.wcard .goal { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.stats { display: flex; gap: 14px; font-size: .84rem; color: var(--muted); align-items: center; } .stats b { color: var(--ink); font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-transform: capitalize; }
.pill.active { background: var(--accent-soft); color: var(--accent); } .pill.active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.paused { background: var(--warn-soft); color: var(--warn); } .pill.draft { background: var(--surface-2); color: var(--muted); }
.pill.glass { background: rgb(255 255 255 / .9); color: #17201c; backdrop-filter: blur(6px); }
.new-card { align-self: start; border: 1.5px dashed var(--line); background: transparent; box-shadow: none; padding: 18px; display: grid; gap: 10px; align-content: start; }
.new-card h2 { display: flex; align-items: center; gap: 8px; }
.template { display: block; width: 100%; text-align: left; white-space: normal; border-radius: 12px; padding: 10px 12px; font-weight: 500; font-size: .88rem; background: var(--surface); }
.template b { display: block; font-weight: 650; }

/* watch page */
.banner { position: relative; border-radius: 20px; overflow: hidden; height: 210px; margin-bottom: 16px; box-shadow: var(--shadow); }
.banner .photo { position: absolute; inset: 0; }
.banner .over { position: absolute; left: 22px; right: 22px; bottom: 18px; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.banner h1 { color: #fff; text-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.banner .goal { color: rgb(255 255 255 / .88); font-size: .9rem; max-width: 720px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner .back { position: absolute; top: 14px; left: 14px; }
.banner .over button { background: rgb(255 255 255 / .92); color: #17201c; border-color: transparent; }
.banner .over .primary { background: var(--accent) !important; color: #fff !important; }
.work { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.work.no-chat { grid-template-columns: minmax(0, 1fr); }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; padding: 4px; background: var(--surface-2); border-radius: 999px; width: max-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 13px; font-size: .88rem; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tabs .count { font-size: .72rem; background: var(--surface-3); color: var(--ink-2); border-radius: 99px; padding: 0 6px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lcard { overflow: hidden; display: grid; align-content: start; align-self: start; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lcard:hover img { transform: scale(1.05); }
.lcard .photo { aspect-ratio: 16 / 10; }
.lcard .rank { position: absolute; top: 10px; left: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgb(255 255 255 / .92); color: #17201c; font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
.lcard .score { position: absolute; top: 10px; right: 10px; background: var(--accent); color: #fff; font-weight: 800; border-radius: 10px; padding: 3px 9px; font-size: .84rem; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.lcard .price-tag { position: absolute; left: 12px; bottom: 10px; color: #fff; font-weight: 800; font-size: 1.2rem; text-shadow: 0 1px 4px rgb(0 0 0 / .5); letter-spacing: -.01em; }
.lcard .body { padding: 12px 14px 14px; display: grid; gap: 7px; }
.lcard h3 { font-size: .98rem; }
.facts { color: var(--muted); font-size: .84rem; }
.hl { font-size: .88rem; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.hl svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.summary { font-size: .87rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.badge.new { background: var(--accent-soft); color: var(--accent); } .badge.down { background: var(--accent-soft); color: var(--accent); }
.badge.up, .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.star { background: var(--star-soft); color: var(--star); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 40px; height: 40px; color: var(--accent); opacity: .7; }
.panel { padding: 18px; display: grid; gap: 12px; }
.lines { margin: 0; padding: 0; list-style: none; display: grid; }
.lines li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; } .lines li:last-child { border: 0; }
.need { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .86rem; }
.events time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.events .error { color: var(--bad); }

/* chat */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 60px); position: sticky; top: 26px; overflow: hidden; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-head .bot { display: flex; gap: 10px; align-items: center; }
.chat-head .bot i { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #7cc6a4); display: grid; place-items: center; color: #fff; font-style: normal; }
.messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 9px 13px; border-radius: 16px; font-size: .9rem; overflow-wrap: anywhere; line-height: 1.45; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; } .msg ul { margin: 4px 0; padding-left: 18px; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.user a { color: inherit; text-decoration: underline; }
.msg .who { display: block; font-size: .7rem; font-weight: 700; opacity: .8; margin-bottom: 2px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.tool { align-self: flex-start; font-size: .74rem; color: var(--muted); padding: 0 6px; display: flex; gap: 5px; align-items: center; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 14px; background: var(--surface-2); border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.suggest { display: grid; gap: 6px; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; border-radius: 14px; }
.fab { display: none; }

/* sheet (listing detail) + modal */
.scrim { position: fixed; inset: 0; background: rgb(8 12 10 / .45); z-index: 30; animation: fade .2s; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--bg); z-index: 31; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slide .25s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0 } } @keyframes fade { from { opacity: 0 } }
.sheet .gallery { position: relative; }
.sheet .gallery .photo { aspect-ratio: 16 / 10; }
.sheet .close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgb(255 255 255 / .92); color: #17201c; border: 0; width: 36px; height: 36px; padding: 0; }
.thumbs { display: flex; gap: 8px; padding: 10px 18px 0; }
.thumbs button { padding: 0; border-radius: 10px; overflow: hidden; width: 86px; height: 56px; border: 2px solid transparent; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sheet .content { padding: 18px; display: grid; gap: 16px; }
.factgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.fact b { display: block; font-size: 1rem; } .fact span { font-size: .74rem; color: var(--muted); }
.section { display: grid; gap: 8px; }
.section h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.section ul { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 3px; }
.cf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: .9rem; }
.cf div { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; } .cf span { color: var(--muted); }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.note header { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); align-items: center; }
.note header b { color: var(--ink); }
.note .old { font-size: .82rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
.doc { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border: 0; }
.doc .kind { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--accent); }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; z-index: 31; padding: 20px; display: grid; gap: 14px; animation: fade .2s; }
.linkbox { font-size: .8rem; word-break: break-all; background: var(--surface-2); padding: 10px; border-radius: 10px; }
.person { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border: 0; }
.person .who { display: flex; gap: 10px; align-items: center; min-width: 0; } .person .who div { min-width: 0; } .person .who small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.person select { width: auto; padding: 5px 8px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.plan { padding: 14px; display: grid; gap: 6px; } .plan.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plan .price { font-size: 1.3rem; font-weight: 800; }
.usage { display: grid; gap: 10px; }
.place { padding: 16px; display: grid; gap: 10px; }
.place-kids { display: grid; gap: 10px; margin-left: 14px; border-left: 2px solid var(--line); padding-left: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; z-index: 50; box-shadow: var(--shadow-lg); }
.form { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* auth */
.auth-body { background: #0b1f1b; }
.auth { position: relative; min-height: 100dvh; color: #fff; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  grid-template-areas: "top top" "hero side" "feats side" "foot foot"; grid-template-rows: auto 1fr auto auto; gap: 0 48px; padding: 28px clamp(20px, 5vw, 72px); overflow: hidden; isolation: isolate; }
.auth-bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(1200px 600px at 15% 20%, #1d6b5b 0%, transparent 60%), radial-gradient(900px 700px at 85% 80%, #184a63 0%, transparent 60%), linear-gradient(160deg, #0d2c27, #0a1c22); }
.auth-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .92; animation: drift 40s ease-in-out infinite alternate; }
.auth-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgb(6 22 19 / .88) 0%, rgb(6 22 19 / .62) 45%, rgb(6 22 19 / .28) 100%), linear-gradient(0deg, rgb(6 22 19 / .55), transparent 40%); }
@keyframes drift { from { transform: scale(1.04) translate(0, 0) } to { transform: scale(1.12) translate(-1.5%, -1%) } }
.auth-top { grid-area: top; }
.brand.light { color: #fff; } .brand.light .mark { box-shadow: 0 6px 20px rgb(0 0 0 / .3); }
.auth-hero { grid-area: hero; align-self: end; max-width: 640px; padding: 40px 0 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fe3cd;
  background: rgb(159 227 205 / .12); border: 1px solid rgb(159 227 205 / .3); padding: 5px 11px; border-radius: 999px; }
.auth-hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 18px 0 16px; color: #fff; text-shadow: 0 2px 30px rgb(0 0 0 / .3); }
.lead { font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgb(255 255 255 / .82); max-width: 560px; line-height: 1.55; }
.feats { grid-area: feats; align-self: start; max-width: 640px; list-style: none; padding: 0; margin: 30px 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
.feats li { display: flex; gap: 12px; align-items: flex-start; }
.feats .fi { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .18); color: #9fe3cd; backdrop-filter: blur(8px); }
.feats .fi svg { width: 18px; height: 18px; }
.feats b { display: block; font-size: .95rem; } .feats p { font-size: .85rem; color: rgb(255 255 255 / .68); margin-top: 2px; line-height: 1.45; }
.auth-side { grid-area: side; align-self: center; display: grid; gap: 18px; justify-items: stretch; max-width: 420px; width: 100%; justify-self: end; }
.demo-card { border-radius: 20px; overflow: hidden; background: #fff; color: #111816; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); transform: rotate(-2deg) translateX(18px); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: rotate(-2deg) translate(18px, 0) } 50% { transform: rotate(-1.2deg) translate(18px, -8px) } }
.demo-photo { position: relative; } .demo-photo .photo { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2c6e5f, #6fb39b); }
.demo-photo .score { position: absolute; top: 12px; right: 12px; background: #0f7a64; color: #fff; font-weight: 800; border-radius: 10px; padding: 3px 9px; font-size: .84rem; }
.demo-photo .price-tag { position: absolute; left: 14px; bottom: 10px; color: #fff; font-weight: 800; font-size: 1.25rem; text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
.demo-body { padding: 12px 16px 16px; display: grid; gap: 6px; font-size: .88rem; } .demo-body > span { color: #5d6863; }
.demo-body .badge { background: #eef0ec; color: #3b4541; } .demo-body .badge.new, .demo-body .badge.down { background: #dff1ea; color: #0f7a64; }
.glass { background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-radius: 22px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .6); }
.glass h2 { color: #fff; font-size: 1.3rem; } .glass p { color: rgb(255 255 255 / .8); font-size: .92rem; } .glass .fine { font-size: .78rem; color: rgb(255 255 255 / .55); }
.glass .divider { color: rgb(255 255 255 / .6); } .glass .divider::before, .glass .divider::after { background: rgb(255 255 255 / .25); }
.btn.white { background: #fff; color: #1d2320; border-color: #fff; font-weight: 650; } .btn.white:hover { background: #f1f3f1; }
.auth-foot { grid-area: foot; font-size: .7rem; color: rgb(255 255 255 / .45); padding-top: 16px; }
/* server-rendered sign-in pages (invite, errors) */
.auth-body > .auth-card { position: relative; width: min(460px, calc(100% - 32px)); margin: 10vh auto; background: rgb(255 255 255 / .96); color: #111816; border-radius: 24px; padding: 30px; box-shadow: 0 40px 100px -30px rgb(0 0 0 / .7); display: grid; gap: 16px; }
body.auth-body:has(> .auth-card) { min-height: 100dvh; padding: 1px 0; background: radial-gradient(1000px 600px at 20% 10%, #1d6b5b, transparent 60%), radial-gradient(900px 700px at 90% 90%, #184a63, transparent 60%), linear-gradient(160deg, #0d2c27, #0a1c22); }
.auth-card h1 { font-size: 1.6rem; } .auth-card .muted { color: #5d6863; }
.auth-card input { background: #fff; color: #111816; border-color: #dcdad3; } .auth-card label { color: #3b4541; }
.auth-logo { font-weight: 800; color: #0f7a64; letter-spacing: -.02em; font-size: 1.1rem; }
.auth-form { display: grid; gap: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; } .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.gbtn svg { width: 18px; height: 18px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "hero" "side" "feats" "foot"; grid-template-rows: auto; padding: 20px 18px 24px; gap: 0; }
  .auth-hero { padding: 32px 0 22px; } .feats { grid-template-columns: 1fr; gap: 14px; margin: 28px 0 8px; }
  .auth-side { justify-self: stretch; max-width: none; } .demo-card { display: none; }
  .auth-bg::after { background: linear-gradient(180deg, rgb(6 22 19 / .55) 0%, rgb(6 22 19 / .78) 50%, rgb(6 22 19 / .92) 100%); }
}

@media (max-width: 1100px) { .work { grid-template-columns: minmax(0, 1fr); } .work .chat { display: none; } .work.chat-open .chat { display: flex; }
  .fab { display: inline-flex; position: fixed; right: 18px; bottom: 84px; z-index: 20; box-shadow: var(--shadow-lg); padding: 12px 18px; }
  .work.chat-open .chat { position: fixed; inset: 0; z-index: 40; height: 100dvh; border-radius: 0; top: 0; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 10; justify-content: space-between; align-items: center; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .bottomnav a { display: grid; justify-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); padding: 4px 10px; }
  .bottomnav a.active { color: var(--accent); } .bottomnav svg { width: 22px; height: 22px; }
  .main { padding: 16px 16px 90px; }
  h1 { font-size: 1.4rem; }
  .kpis { gap: 8px; } .kpi { padding: 10px 12px; } .kpi b { font-size: 1.2rem; }
  .banner { height: 190px; border-radius: 16px; } .banner .over { left: 14px; right: 14px; bottom: 12px; }
  .factgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: 1fr; }
  .lgrid, .grid { grid-template-columns: minmax(0, 1fr); }
}

.glass input { background: rgb(255 255 255 / .92); color: #111816; border-color: transparent; }
.glass .err { color: #ffb4a8; font-size: .85rem; min-height: 1em; }

/* ---------- spec MVP additions ---------- */
.chip { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.demo { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.ai { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.must { background: var(--ink); color: var(--surface); border-color: transparent; }
.note-bar { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 14px; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px; background: var(--surface-2); color: var(--ink-2); }
.alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.demo { background: repeating-linear-gradient(135deg, var(--warn-soft) 0 12px, var(--surface) 12px 24px); color: var(--warn); border: 1px solid var(--warn-soft); }
.warn-text { color: var(--warn); }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .86rem; color: var(--ink-2); margin: -4px 2px 12px; }
.err-line { font-size: .8rem; color: var(--bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats .hot b { color: var(--accent); }
.wcard .cover { position: relative; display: block; color: #fff; }
.wcard .actions { gap: 6px; }
.new-card { display: grid; place-content: center; text-align: center; gap: 8px; padding: 28px; min-height: 220px; color: var(--ink); border-style: dashed; }
.new-card:hover { border-color: var(--accent); text-decoration: none; }
blockquote.request { margin: 4px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: .92rem; color: var(--ink-2); }
.panel { display: grid; gap: 12px; }
.interp { margin-top: 16px; }
.crit { display: grid; gap: 12px; }
.crit fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.crit legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.span2 { grid-column: span 2; }
.inline { display: flex; gap: 6px; align-items: center; }
.inline input { min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 500; }
.check input { width: auto; }
.rules { display: grid; gap: 6px; }
.rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.rule button { margin-left: auto; }
.photo.placeholder { background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); display: grid; place-items: center; }
.photo.placeholder .shade { background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / .35)); }
.ph-inner { display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; padding: 12px; font-size: .8rem; }
.ph-inner svg { width: 34px; height: 34px; opacity: .6; }
.placeholder.big .ph-inner b { color: var(--ink-2); font-size: 1rem; }
.demo-tag { position: absolute; bottom: 38px; right: 10px; background: var(--bad); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; }
.sheet .gallery .demo-tag { right: 12px; bottom: 30px; }
.lcard.dim { opacity: .72; }
.reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: .84rem; color: var(--ink-2); }
.critlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.critlist li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: .88rem; }
.critlist li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .78rem; }
.critlist li b { display: block; font-weight: 600; } .critlist li span { color: var(--muted); font-size: .82rem; }
.crit-ok i { background: var(--accent-soft); color: var(--accent); }
.crit-bad i { background: var(--bad-soft); color: var(--bad); }
.crit-unk i { background: var(--surface-3); color: var(--muted); }
.dtabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; width: max-content; }
.dtabs button { border: 0; background: transparent; color: var(--muted); padding: 5px 12px; font-size: .86rem; }
.dtabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.embed-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.embed-wrap iframe { width: 100%; height: 520px; border: 0; display: block; }
.locgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.locgrid figure { margin: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.locgrid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.locgrid figcaption { font-size: .72rem; color: var(--muted); padding: 4px 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th { text-align: left; font-size: .74rem; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel .tbl { display: block; overflow-x: auto; }
@media (max-width: 720px) {
  .three, .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2 { grid-column: span 2; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .embed-wrap iframe { height: 420px; }
}

.feed-head { grid-column: 1 / -1; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 2px -4px; }
