/* Layout: the website's linen nav + evergreen hero, then a working studio of cards. Square-cornered, hairline borders, gold used sparingly. */
:root {
  --bg: #E7E3DB;          /* linen */
  --surface: #F6F4EF;     /* card */
  --surface-2: #EFECE6;
  --ink: #262B1F;         /* evergreen */
  --ink-2: #4F5345;
  --ink-3: #6B6E60;
  --line: #D3CDC0;
  --gold: #C9A276;        /* champagne, decorative */
  --gold-ink: #85602F;    /* gold that reads as text on linen */
  --btn-bg: #262B1F;
  --btn-ink: #E7E3DB;
  --hero-bg: #262B1F;
  --hero-ink: #E7E3DB;
  --hero-ink-2: #B9BBA8;
  --hero-line: #3E4533;
  --good: #3D6B3A;
  --good-bg: #E1E8D9;
  --warn: #8E5A0C;
  --warn-bg: #F1E3C8;
  --bad: #9A3328;
  --bad-bg: #F2DCD5;
  --c-instagram: #A8760F;
  --c-tiktok: #2A78A8;
  --c-youtube: #9A2E4E;
  --bar: #6F7A5A;
  --shadow: 0 1px 0 rgba(38,43,31,.04), 0 8px 24px -12px rgba(38,43,31,.18);
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Jost", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1F2319; --surface: #2B3023; --surface-2: #323828; --ink: #E7E3DB; --ink-2: #C3C4B4; --ink-3: #9C9E8D;
  --line: #3E4533; --gold: #C9A276; --gold-ink: #D7B68C; --btn-bg: #E7E3DB; --btn-ink: #262B1F;
  --hero-bg: #2B3023; --hero-ink: #E7E3DB; --hero-ink-2: #B9BBA8; --hero-line: #444C38;
  --good: #9CC48F; --good-bg: #2F3E2A; --warn: #E2B566; --warn-bg: #42361F; --bad: #E79483; --bad-bg: #4A2C26;
  --c-instagram: #B38829; --c-tiktok: #4A95D2; --c-youtube: #CC5F80; --bar: #A3AD8C;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 28px -14px rgba(0,0,0,.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #1F2319; --surface: #2B3023; --surface-2: #323828; --ink: #E7E3DB; --ink-2: #C3C4B4; --ink-3: #9C9E8D;
  --line: #3E4533; --gold: #C9A276; --gold-ink: #D7B68C; --btn-bg: #E7E3DB; --btn-ink: #262B1F;
  --hero-bg: #2B3023; --hero-ink: #E7E3DB; --hero-ink-2: #B9BBA8; --hero-line: #444C38;
  --good: #9CC48F; --good-bg: #2F3E2A; --warn: #E2B566; --warn-bg: #42361F; --bad: #E79483; --bad-bg: #4A2C26;
  --c-instagram: #B38829; --c-tiktok: #4A95D2; --c-youtube: #CC5F80; --bar: #A3AD8C;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 28px -14px rgba(0,0,0,.6); color-scheme: dark; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.5; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.75rem; line-height: 1.15; }
h3 { font-size: 1.2rem; font-weight: 400; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ——— Top bar & nav (echoes houseoftrim.co) ——— */
.topbar { background: var(--hero-bg); color: var(--hero-ink-2); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; flex-wrap: wrap; }
.topbar b { color: var(--hero-ink); font-weight: 500; }
header.nav { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
header.nav .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; justify-self: center; text-decoration: none; color: var(--ink); }
.brand svg { width: 26px; height: 44px; color: var(--gold); flex: none; }
.brand .wm { font-family: var(--f-display); font-weight: 300; font-size: 22px; letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.brand .wm small { font-size: 13px; font-style: italic; letter-spacing: 0; }
.brand .sub { display: block; font-family: var(--f-body); font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 8px 10px; font: 500 12.5px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; border-bottom: 1px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.tabs button:hover { color: var(--ink); }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
select, input, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 8px 10px; min-width: 0; }
select { padding-right: 28px; }
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg); border-radius: 0; padding: 11px 18px; font: 500 12px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-3); filter: none; }
.btn.small { padding: 8px 12px; font-size: 11px; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.iconbtn { background: none; border: 1px solid var(--line); width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); border-radius: 0; }
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }

main { padding-block: 24px 64px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
main > * { min-width: 0; }
.ribbon { background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); padding: 10px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14.5px; }
.ribbon b { font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head p { font-size: 14px; color: var(--ink-3); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 24px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.stack > * { min-width: 0; }

/* ——— Hero ——— */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 28px 28px 24px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.hero .eyebrow { font-family: var(--f-display); font-style: italic; color: var(--gold); font-size: 18px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.05; margin-top: 6px; }
.hero .meter-wrap { margin-top: 20px; }
.hero .meter-line { color: var(--hero-ink-2); font-size: 15px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.hero .meter-line strong { font-family: var(--f-display); font-weight: 300; font-size: 26px; color: var(--hero-ink); }
.hero .linkbtn { color: var(--gold); }
.stars { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px; max-width: 640px; }
.stars svg { width: 15px; height: 15px; }
.stars .on { color: var(--gold); }
.stars .off { color: var(--hero-line); }
.hero-orn { width: 70px; height: 116px; color: var(--gold); opacity: .9; align-self: start; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; display: grid; gap: 4px; min-width: 0; }
.kpi .v { font-family: var(--f-display); font-weight: 300; font-size: 32px; line-height: 1.1; }
.kpi .s { font-size: 13.5px; color: var(--ink-3); }

/* ——— Lists ——— */
.rows { display: grid; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; color: inherit; width: 100%; cursor: pointer; }
.row:first-child { border-top: 0; }
.row:hover .row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.row-title { font-weight: 500; }
.row-sub { font-size: 14px; color: var(--ink-3); }
.datebox { width: 46px; text-align: center; border: 1px solid var(--line); background: var(--surface-2); padding: 4px 0; line-height: 1.1; }
.datebox .m { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.datebox .d { font-family: var(--f-display); font-size: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.gold { background: transparent; color: var(--gold-ink); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.empty { text-align: center; padding: 28px 12px; display: grid; gap: 10px; justify-items: center; color: var(--ink-3); }
.empty svg { width: 34px; height: 56px; color: var(--gold); }
.empty h3 { color: var(--ink); }

/* ——— Clients ——— */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.toolbar .left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1 1 320px; }
.toolbar input[type="search"] { flex: 1 1 220px; max-width: 360px; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { background: none; border: 0; padding: 9px 14px; font: 500 11.5px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.board-scroll { overflow-x: auto; padding-bottom: 8px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 14px; min-width: 1180px; }
@media (min-width: 1240px) { .board { min-width: 0; } }
.col { background: var(--surface-2); border: 1px solid var(--line); padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 220px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.col-head h3 { font-size: 1.08rem; }
.col-head .count { font-size: 13px; color: var(--ink-3); }
.col-hint { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
.ccard { background: var(--surface); border: 1px solid var(--line); padding: 12px; display: grid; gap: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.ccard:hover { border-color: var(--gold); }
.ccard .nm { font-family: var(--f-display); font-size: 1.08rem; line-height: 1.2; }
.ccard .meta { font-size: 13px; color: var(--ink-3); }
.ccard .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ccard .price { font-weight: 500; }
.nextbtn { background: none; border: 1px solid var(--line); padding: 6px 9px; font: 500 11px/1.1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; text-align: left; }
.nextbtn:hover { border-color: var(--ink); color: var(--ink); }
.lost-note { font-size: 14px; color: var(--ink-3); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }

/* ——— Schedule ——— */
.day { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day-label .dw { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.day-label .dd { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; }
.day-label .rel { font-size: 13px; color: var(--gold-ink); }
.event { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.event + .event { margin-top: 8px; }
.event:hover { border-color: var(--gold); }
.event .nm { font-family: var(--f-display); font-size: 1.15rem; }
.event .meta { font-size: 14px; color: var(--ink-3); }
.copyline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.copyline button { background: none; border: 0; color: var(--gold-ink); font: 500 11px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; padding: 4px; }

/* ——— Social ——— */
.plat { display: grid; gap: 10px; }
.plat-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.plat-name { display: flex; align-items: center; gap: 8px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.plat .big { font-family: var(--f-display); font-weight: 300; font-size: 34px; line-height: 1; }
.plat .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.plat .stats div { display: grid; gap: 2px; }
.plat .stats .v { font-size: 17px; font-weight: 500; }
.plat .stats .k { font-size: 12px; color: var(--ink-3); }
.delta-up { color: var(--good); font-size: 14px; font-weight: 500; }
.delta-down { color: var(--bad); font-size: 14px; font-weight: 500; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { fill: var(--ink-3); font: 11.5px var(--f-body); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 10px; font-size: 13px; min-width: 150px; box-shadow: var(--shadow); z-index: 2; line-height: 1.45; }
.chart .tip b { font-weight: 500; }
.chart .tip .tr { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; display: inline-block; border-radius: 2px; }
.srcs { display: grid; gap: 14px; }
.src { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; }
.src .nm { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.src .track { position: relative; height: 22px; background: var(--surface-2); }
.src .fill { position: absolute; inset: 0 auto 0 0; background: var(--bar); border-radius: 0 4px 4px 0; }
.src .txt { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.posts { display: grid; gap: 0; }
.post { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }

/* ——— Dialogs ——— */
dialog { border: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); max-width: 100%; }
dialog::backdrop { background: rgba(20, 23, 16, .55); }
dialog.sheet { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(600px, 100%); }
dialog.modal { width: min(560px, calc(100% - 32px)); }
.dlg { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; max-height: 100dvh; }
.dlg-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-top: max(20px, env(safe-area-inset-top, 0px)); }
.dlg-head p { font-size: 14px; color: var(--ink-3); margin-top: 4px; }
.dlg-body { padding: 18px 22px; overflow-y: auto; display: grid; gap: 18px; align-content: start; }
.dlg-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
.dlg-foot .r { display: flex; gap: 10px; margin-left: auto; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span, .field > label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field small { font-size: 12.5px; color: var(--ink-3); }
fieldset { border: 1px solid var(--line); padding: 14px; margin: 0; display: grid; gap: 12px; min-width: 0; }
legend { padding: 0 6px; font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.estimate { background: var(--surface-2); border: 1px dashed var(--line); padding: 12px 14px; font-size: 14.5px; display: grid; gap: 4px; }
.estimate strong { font-family: var(--f-display); font-weight: 400; font-size: 24px; }
details.help { font-size: 14px; color: var(--ink-2); }
details.help summary { cursor: pointer; color: var(--gold-ink); }
details.help ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.sectionnote { font-size: 14px; color: var(--ink-3); }
.stagepick { display: flex; flex-wrap: wrap; gap: 6px; }
.stagepick button { border: 1px solid var(--line); background: var(--surface); padding: 7px 11px; font: 500 12.5px/1 var(--f-body); color: var(--ink-2); cursor: pointer; }
.stagepick button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--bad); }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; font-size: 14.5px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  header.nav .wrap { grid-template-columns: auto minmax(0, 1fr); }
  .tabs, .nav-right { min-width: 0; }
  .brand { justify-self: start; grid-row: 1; }
  .nav-right { grid-row: 1; grid-column: 2; }
  .tabs { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 700px) {
  .board { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .col { min-height: 0; }
}
@media (max-width: 560px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .hero-orn { display: none; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .src { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .brand .sub { display: none; }
  .card { padding: 16px; }
  .kpi .v { font-size: 26px; }
  .tabs { justify-content: space-between; }
  .tabs button { padding: 8px 4px; letter-spacing: .08em; font-size: 12px; }
  #season { max-width: 128px; padding-left: 8px; }
  .brand .wm { font-size: 19px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ccard, .event, .btn { transition: border-color .15s, filter .15s; }
}

/* ——— Hosted-app additions ——— */
html { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--bg); }
html[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
img { max-width: 100%; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); background: var(--hero-bg); color: var(--hero-ink); }
.gate-card { width: min(440px, 100%); text-align: center; display: grid; gap: 16px; justify-items: center; }
.gate-card svg.orn { width: 56px; height: 94px; color: var(--gold); }
.gate-card .wm { font-family: var(--f-display); font-weight: 300; font-size: 30px; letter-spacing: .06em; }
.gate-card .wm small { font-style: italic; font-size: 18px; letter-spacing: 0; }
.gate-card .eyebrow { font-family: var(--f-display); font-style: italic; color: var(--gold); font-size: 18px; }
.gate-card p { color: var(--hero-ink-2); }
.gate-card .btn { background: var(--hero-ink); color: var(--hero-bg); border-color: var(--hero-ink); padding: 14px 22px; }
.gate-card .linkbtn { color: var(--gold); }
.gate-card .err { color: #F2B5A8; font-size: 14px; }

.conns { display: grid; gap: 12px; }
.conn { border: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; background: var(--surface); }
.conn-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.conn-name { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.conn-what { font-size: 13.5px; color: var(--ink-3); }
.conn-status { font-size: 14px; }
.conn-err { font-size: 13px; color: var(--bad); background: var(--bad-bg); padding: 8px 10px; }
.conn-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.conn .fgrid { gap: 10px; }
.settings-section { display: grid; gap: 12px; }
.settings-section + .settings-section { border-top: 1px solid var(--line); padding-top: 18px; }
.team-list { display: flex; flex-wrap: wrap; gap: 8px; }

.webkpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mini-list { display: grid; }
.mini-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; align-items: center; }
.mini-row:first-child { border-top: 0; }
.mini-row .t { overflow-wrap: anywhere; }
.mini-row .v { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.auto-note { font-size: 13px; color: var(--good); display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 980px) { .webkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1120px) and (min-width: 981px) {
  header.nav .wrap { grid-template-columns: auto minmax(0, 1fr); }
  .brand { justify-self: start; grid-row: 1; }
  .nav-right { grid-row: 1; grid-column: 2; }
  .tabs { grid-column: 1 / -1; grid-row: 2; }
}
.legal { max-width: 680px; margin: 0 auto; padding: 48px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 10px; }
