/* CONTINUITY by Saint + Wilde — a working atelier with an editorial eye. */
@font-face { font-family: 'Bodoni Moda'; font-weight: 400; font-style: normal; src: url(/static/fonts/bodoni-moda-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; font-weight: 400; font-style: italic; src: url(/static/fonts/bodoni-moda-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; font-weight: 500; font-style: normal; src: url(/static/fonts/bodoni-moda-latin-500-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; font-weight: 500; font-style: italic; src: url(/static/fonts/bodoni-moda-latin-500-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; font-weight: 600; font-style: normal; src: url(/static/fonts/bodoni-moda-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Jost'; font-weight: 300; src: url(/static/fonts/jost-latin-300-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Jost'; font-weight: 400; src: url(/static/fonts/jost-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Jost'; font-weight: 400; font-style: italic; src: url(/static/fonts/jost-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Jost'; font-weight: 500; src: url(/static/fonts/jost-latin-500-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Jost'; font-weight: 600; src: url(/static/fonts/jost-latin-600-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --ivory: #F5EFE4; --ivory-2: #EDE5D6; --paper: #FBF8F2; --ink: #16130F; --ink-2: #3A342C;
  --muted: #6F665A; --rule: #D6CBB9; --rule-strong: #16130F; --oxblood: #5E1B20; --oxblood-2: #7A2A2F;
  --ox-wash: #F1E2DE; --ok: #2F4A35; --ok-wash: #E3EADF; --warn: #7A5418; --warn-wash: #F4E8CF;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
  --deco: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%235E1B20' stroke-width='.7'%3E%3Cpath d='M-24 24a24 24 0 0 1 48 0M-18 24a18 18 0 0 1 36 0M-12 24a12 12 0 0 1 24 0M-6 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M24 24a24 24 0 0 1 48 0M30 24a18 18 0 0 1 36 0M36 24a12 12 0 0 1 24 0M42 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M0 48a24 24 0 0 1 48 0M6 48a18 18 0 0 1 36 0M12 48a12 12 0 0 1 24 0M18 48a6 6 0 0 1 12 0'/%3E%3C/g%3E%3C/svg%3E");
  --deco-ivory: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23C9B79B' stroke-width='.7'%3E%3Cpath d='M-24 24a24 24 0 0 1 48 0M-18 24a18 18 0 0 1 36 0M-12 24a12 12 0 0 1 24 0M-6 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M24 24a24 24 0 0 1 48 0M30 24a18 18 0 0 1 36 0M36 24a12 12 0 0 1 24 0M42 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M0 48a24 24 0 0 1 48 0M6 48a18 18 0 0 1 36 0M12 48a12 12 0 0 1 24 0M18 48a6 6 0 0 1 12 0'/%3E%3C/g%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 15.5px; line-height: 1.55; font-weight: 400; }
a { color: var(--ink); text-decoration-color: var(--oxblood); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--oxblood); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 500; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
code, pre { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
pre { background: var(--paper); border: 1px solid var(--rule); padding: 14px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* ── Frame ─────────────────────────────── */
.sample-ribbon { background: var(--ink); color: var(--ivory); font-size: 12px; letter-spacing: .08em; text-align: center; padding: 6px 16px; }
.sample-ribbon b { color: #E9C9C4; font-weight: 500; }
.masthead { border-bottom: 1px solid var(--rule-strong); background: var(--ivory); position: sticky; top: 0; z-index: 10; }
.masthead-inner { max-width: 1320px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 30px; min-height: 64px; }
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.wordmark .w1 { font-family: var(--serif); font-size: 20px; letter-spacing: .24em; font-weight: 500; }
.wordmark .w2 { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 12px; letter-spacing: .08em; white-space: nowrap; text-transform: uppercase; color: var(--ink-2); padding: 22px 0 19px; border-bottom: 2px solid transparent; }
.nav a.on, .nav a:hover { color: var(--ink); border-bottom-color: var(--oxblood); }
.who { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.who form { margin: 0; }
.who button { background: none; border: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--oxblood); cursor: pointer; font: inherit; padding: 0; }
.ws-chip { border: 1px solid var(--rule); padding: 3px 10px; color: var(--ink-2); }
main { max-width: 1320px; margin: 0 auto; padding: 44px 32px 96px; }
main.narrow { max-width: 860px; }
main.mid { max-width: 1060px; }
.footer { border-top: 1px solid var(--rule); max-width: 1320px; margin: 0 auto; padding: 18px 32px 40px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.masthead.admin .masthead-inner { flex-wrap: wrap; row-gap: 0; padding-top: 12px; }
.masthead.admin .wordmark { flex: 1; }
.masthead.admin .nav { order: 3; flex-basis: 100%; border-top: 1px solid var(--rule); gap: 26px; }
.masthead.admin .nav a { padding: 13px 0 11px; }

/* ── Type ──────────────────────────────── */
.eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
.eyebrow.ox { color: var(--oxblood); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 18px; }
.display em, .provocation em { font-style: italic; }
.h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.2; }
.h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.25; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: .04em; }
.serif { font-family: var(--serif); }
.provocation { font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1.18; letter-spacing: -.005em; }

/* ── Structure ─────────────────────────── */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; border-bottom: 1px solid var(--rule-strong); padding-bottom: 22px; margin-bottom: 34px; flex-wrap: wrap; }
.page-head .display { margin-bottom: 4px; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.grid-side-l { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .grid-2, .grid-3, .grid-side, .grid-side-l { grid-template-columns: 1fr; } .masthead-inner { flex-wrap: wrap; gap: 12px; padding: 10px 16px; } .nav a { padding: 6px 0; } main { padding: 28px 16px 72px; } }
.rule { border-top: 1px solid var(--rule); }
.rule-ink { border-top: 1px solid var(--ink); }
.section { padding: 26px 0; border-top: 1px solid var(--rule); }
.panel { background: var(--paper); border: 1px solid var(--rule); padding: 24px 26px; }
.panel + .panel { margin-top: 18px; }
.panel.ink { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.panel.ink a { color: var(--ivory); }
.panel.ox { border-color: var(--oxblood); box-shadow: inset 3px 0 0 var(--oxblood); }
.panel.warn { background: var(--warn-wash); border-color: #D9C08F; }
.panel.ok { background: var(--ok-wash); border-color: #B9C8B1; }
.deco-band { height: 14px; background-image: var(--deco); background-size: 28px 28px; opacity: .55; }
.deco-block { background-color: var(--ink); background-image: var(--deco-ivory); background-size: 56px 56px; }
.stack > * + * { margin-top: 14px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.kv dd { margin: 0; }

/* ── Controls ──────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; padding: 11px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--ivory); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--oxblood); border-color: var(--oxblood); color: var(--ivory); }
.btn.ox { background: var(--oxblood); border-color: var(--oxblood); }
.btn.ox:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--ivory); }
.btn.small { padding: 7px 12px; font-size: 11.5px; }
.btn.danger { background: transparent; color: var(--oxblood); border-color: var(--oxblood); }
.btn.danger:hover { background: var(--oxblood); color: var(--ivory); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--oxblood); cursor: pointer; }
form.inline { display: inline; margin: 0; }
label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }
.field { margin-bottom: 22px; }
.field .hint { font-size: 13px; color: var(--muted); margin: -2px 0 8px; text-transform: none; letter-spacing: 0; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-bottom-color: var(--ink-2); padding: 10px 12px; border-radius: 0; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--oxblood); outline-offset: -1px; }
input[type=file] { font: inherit; font-size: 13.5px; }
.check { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14.5px; font-weight: 400; color: var(--ink); }
.choice-row { display: flex; gap: 18px; flex-wrap: wrap; }
fieldset { border: 1px solid var(--rule); padding: 18px 20px 6px; margin: 0 0 22px; }
legend { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 0 8px; color: var(--ink-2); font-weight: 500; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; padding: 16px; background: var(--paper); border: 1px solid var(--rule); }
.filters > div { flex: 1 1 150px; max-width: 280px; }
.filters label { font-size: 10.5px; }
.filters input, .filters select { padding: 7px 9px; font-size: 13.5px; }

/* ── Tags, status ─────────────────────── */
.tag { display: inline-block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--rule); color: var(--ink-2); background: var(--paper); font-weight: 500; white-space: nowrap; vertical-align: middle; }
.tag.ox { border-color: var(--oxblood); color: var(--oxblood); }
.tag.ink { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.tag.ok { border-color: #7F9A78; color: var(--ok); background: var(--ok-wash); }
.tag.warn { border-color: #C9A35E; color: var(--warn); background: var(--warn-wash); }
.tag.sample { border-style: dashed; border-color: var(--oxblood); color: var(--oxblood); background: transparent; }
.flash { padding: 12px 16px; border: 1px solid var(--ink); background: var(--paper); margin-bottom: 26px; font-size: 14px; }
.flash.err { border-color: var(--oxblood); color: var(--oxblood); background: var(--ox-wash); }

/* ── Tables ───────────────────────────── */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--ink); padding: 8px 10px; white-space: nowrap; }
table.data td { border-bottom: 1px solid var(--rule); padding: 11px 10px; vertical-align: top; }
table.data tr:hover td { background: rgba(255,255,255,.45); }
table.data td.id { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ── Tabs ─────────────────────────────── */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 10px 0; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--oxblood); }
.tabs a .count { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* ── Login ────────────────────────────── */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; min-height: 100dvh; }
.login .art { padding: 64px; color: var(--ivory); display: flex; flex-direction: column; justify-content: space-between; }
.login .art .display { color: var(--ivory); font-size: clamp(34px, 4vw, 58px); max-width: 15ch; }
.login .form { padding: 64px; display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .art, .login .form { padding: 36px 20px; } }

/* ── Project / intake ─────────────────── */
.project-list { border-top: 1px solid var(--ink); }
.project-row { display: grid; grid-template-columns: 1fr 180px 180px 120px; gap: 20px; padding: 20px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; align-items: baseline; }
.project-row:hover { background: var(--paper); }
.project-row .name { font-family: var(--serif); font-size: 22px; }
@media (max-width: 800px) { .project-row { grid-template-columns: 1fr; gap: 4px; } }
.route-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ink); }
.route-choice a { padding: 38px 34px; text-decoration: none; display: block; background: var(--paper); }
.route-choice a + a { border-left: 1px solid var(--ink); }
.route-choice a:hover { background: var(--ink); color: var(--ivory); }
.route-choice a:hover .muted { color: #CFC5B4; }
.route-choice .h2 { margin-bottom: 8px; }
@media (max-width: 760px) { .route-choice { grid-template-columns: 1fr; } .route-choice a + a { border-left: 0; border-top: 1px solid var(--ink); } }
.qnum { font-family: var(--serif); font-size: 15px; color: var(--oxblood); margin-right: 8px; }
.extracted { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--rule); padding: 2px 0 2px 10px; margin: 6px 0 0; }
.extracted.found { border-left-color: var(--ok); }
.extracted.missing { border-left-color: var(--oxblood); color: var(--oxblood); }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumb { width: 150px; border: 1px solid var(--rule); background: var(--paper); font-size: 12px; }
.thumb img { display: block; width: 100%; height: 110px; object-fit: cover; }
.thumb .doc { height: 110px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; color: var(--muted); background: var(--ivory-2); }
.thumb div.cap { padding: 6px 8px; word-break: break-word; }
.steps { display: flex; gap: 0; margin-bottom: 30px; border: 1px solid var(--rule); flex-wrap: wrap; }
.steps span { flex: 1; padding: 10px 14px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--rule); min-width: 120px; }
.steps span:last-child { border-right: 0; }
.steps span.on { color: var(--ivory); background: var(--ink); }
.steps span.done { color: var(--ink); }

/* ── Previews: editorial concept pages ─ */
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.concept { background: var(--paper); border: 1px solid var(--ink); display: flex; flex-direction: column; position: relative; }
.concept .top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--rule); }
.concept .num { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--oxblood); }
.concept .body { padding: 26px 24px 22px; flex: 1; display: flex; flex-direction: column; gap: 18px; }
.concept .provocation { font-size: 26px; margin: 0; }
.concept .lens { border-top: 1px solid var(--rule); padding-top: 12px; }
.concept .lens p { margin: 0; font-size: 14.5px; }
.concept .foot { padding: 16px 22px; border-top: 1px solid var(--ink); background: var(--ivory); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.concept.provisional { border-style: dashed; }
.concept.selected { box-shadow: 6px 6px 0 var(--oxblood); }
.concept .deco-band { position: absolute; left: 0; right: 0; bottom: 0; }

/* ── Brief document ──────────────────── */
.brief-doc { background: var(--paper); border: 1px solid var(--ink); }
.brief-cover { padding: 46px 56px 40px; position: relative; }
.brief-cover .deco-strip { height: 22px; margin: -46px -56px 34px; }
.brief-cover .provocation { font-size: clamp(30px, 3.6vw, 46px); margin: 18px 0 0; max-width: 24ch; }
.brief-details { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.brief-details div { padding: 14px 20px; border-right: 1px solid var(--rule); font-size: 13.5px; }
.brief-details div:nth-child(3n) { border-right: 0; }
.brief-details div:nth-child(n+4) { border-top: 1px solid var(--rule); }
.brief-details .k { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 3px; }
@media (max-width: 760px) { .brief-details { grid-template-columns: 1fr; } .brief-details div { border-right: 0; border-top: 1px solid var(--rule); } .brief-cover { padding: 30px 20px; } .brief-cover .deco-strip { margin: -30px -20px 24px; } }
.brief-body { padding: 10px 56px 46px; }
@media (max-width: 760px) { .brief-body { padding: 10px 20px 30px; } }
.bsec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 30px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.bsec:last-child { border-bottom: 0; }
.bsec h2 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.15; margin: 0; }
.bsec h2 .n { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .18em; color: var(--oxblood); margin-bottom: 6px; }
.bsec h3 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 18px 0 6px; font-weight: 600; }
.bsec h3:first-child { margin-top: 0; }
.bsec p { max-width: 70ch; }
@media (max-width: 760px) { .bsec { grid-template-columns: 1fr; gap: 10px; } }
.mmm { border-top: 1px solid var(--rule); }
.mmm > div { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 18px; }
.mmm > div > h3 { margin: 3px 0 0; }
.mmm > div:last-child { border-bottom: 0; }
@media (max-width: 760px) { .mmm > div { grid-template-columns: 1fr; gap: 4px; } }
.assignment { border: 1px solid var(--oxblood); box-shadow: inset 4px 0 0 var(--oxblood); padding: 18px 22px; font-size: 17px; background: var(--ivory); margin: 4px 0 10px; }
.confirm-item { padding: 12px 0; border-top: 1px solid var(--rule); }
.confirm-item:first-child { border-top: 0; padding-top: 0; }
.source-notes { font-size: 13px; color: var(--ink-2); }
.source-notes li { margin-bottom: 5px; }
.label-interp { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--oxblood); }
.diff-new { background: #E7EEDC; }
.versions { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.versions li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 1px solid var(--rule); position: relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 16px; width: 7px; height: 7px; background: var(--ivory); border: 1px solid var(--oxblood); transform: rotate(45deg); }

/* ── Admin archive ───────────────────── */
.admin-hero { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); margin-bottom: 34px; }
.admin-hero div { padding: 18px 20px; border-right: 1px solid var(--rule); }
.admin-hero div:last-child { border-right: 0; }
.admin-hero .n { font-family: var(--serif); font-size: 36px; line-height: 1; }
@media (max-width: 800px) { .admin-hero { grid-template-columns: 1fr 1fr; } }
.record-head { border-bottom: 1px solid var(--ink); padding-bottom: 18px; margin-bottom: 26px; }
.record-fields { border-top: 1px solid var(--ink); }
.record-fields .rf { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.record-fields .rf .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
@media (max-width: 760px) { .record-fields .rf { grid-template-columns: 1fr; gap: 4px; } }
.proposal { border: 1px solid var(--ink); background: var(--paper); margin-bottom: 22px; }
.proposal .ph { padding: 14px 18px; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.proposal .pb { padding: 18px; }
.proposal .pf { padding: 14px 18px; border-top: 1px solid var(--rule); background: var(--ivory); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
details.edit > summary { cursor: pointer; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); list-style: none; }
details.edit > summary::before { content: '+ '; color: var(--oxblood); }
details[open].edit > summary::before { content: '− '; }
.diff-table td { font-size: 13px; }
.diff-table .old { color: var(--oxblood); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ── Wilder ──────────────────────────── */
.wilder { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
@media (max-width: 960px) { .wilder { grid-template-columns: 1fr; } }
.chat { border-top: 1px solid var(--ink); }
.msg { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.msg.user .who-l { color: var(--muted); }
.msg .who-l { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.msg.wilder-a .who-l { color: var(--oxblood); }
.msg.user .text { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.msg .text p { margin-bottom: .7em; }
.cites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cite { font-size: 12px; border: 1px solid var(--ink); padding: 4px 9px; text-decoration: none; background: var(--paper); }
.cite:hover { background: var(--ink); color: var(--ivory); }
.cite .d { color: var(--muted); }
.cite:hover .d { color: #CFC5B4; }

.empty { padding: 44px; text-align: center; border: 1px dashed var(--rule); color: var(--muted); }
.empty .h3 { color: var(--ink); }
.mt0 { margin-top: 0; } .mt1 { margin-top: 10px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 34px; } .mb0 { margin-bottom: 0; } .mb2 { margin-bottom: 20px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.badge { display: inline-block; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--oxblood); color: var(--ivory); font-size: 10px; letter-spacing: 0; text-align: center; vertical-align: 1px; }
.dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--ink); background: var(--paper); margin-bottom: 30px; }
.dash-tile { padding: 20px 22px; border-right: 1px solid var(--rule); }
.dash-tile:last-child { border-right: 0; }
.dash-tile .n { font-family: var(--serif); font-size: 40px; line-height: 1.1; }
.dash-list { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 12px; }
.mb1 { margin-bottom: 10px; }
@media (max-width: 900px) { .dashboard { grid-template-columns: 1fr; } .dash-tile { border-right: 0; border-bottom: 1px solid var(--rule); } }
.wilder-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 260px; gap: 36px; align-items: start; }
@media (max-width: 1100px) { .wilder-layout { grid-template-columns: 1fr; } }
.threads { border-right: 1px solid var(--rule); padding-right: 22px; }
.thread-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 10px 12px; border-left: 2px solid transparent; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--rule); }
.thread-link.on { border-left-color: var(--oxblood); background: var(--paper); }
.thread-link:hover { background: var(--paper); }
.cite.web { border-style: dashed; }

/* ── Sign-in: noir luxe ───────────────── */
.login-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 45%, #221d17 0%, #16130F 55%, #0d0b09 100%); color: #EFE6D6; align-items: center; text-align: center; }
.login-art::before { content: ''; position: absolute; inset: 0; background-image: var(--deco-ivory); background-size: 84px 84px; opacity: .07; -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 32%, #000 75%); mask-image: radial-gradient(circle at 50% 50%, transparent 0 32%, #000 75%); }
.login-frame { position: absolute; inset: 26px; border: 1px solid rgba(201,183,155,.35); pointer-events: none; }
.login-frame::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(201,183,155,.14); }
.login-top, .login-center, .login-foot { position: relative; z-index: 1; }
.login-top .wordmark { justify-content: center; }
.login-top .w1 { color: #F5EFE4; }
.login-top .w2 { color: #B9A88C; }
.login-center { max-width: 560px; margin: 0 auto; }
.login-fan { width: 96px; color: #C9B79B; opacity: .8; display: block; margin: 0 auto 26px; }
.login-eyebrow { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: #B9A88C; margin: 0 0 22px; }
.login-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.08; color: #F7F1E6; margin: 0; letter-spacing: -.005em; }
.login-title em { font-style: italic; color: #E9D9C9; }
.login-rule { width: 56px; height: 1px; background: #8E2F35; margin: 30px auto 18px; }
.login-note { font-family: var(--serif); font-style: italic; font-size: 17px; color: #CFC2AD; margin: 0; }
.login-foot { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8F8370; margin: 0; }

/* ── Industry news ───────────────────── */
.grid-side-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .grid-side-wide { grid-template-columns: 1fr; } }
.news-panel { border-top: 1px solid var(--ink); padding-top: 14px; }
.news-mini { margin-top: 6px; }
.news-row { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.news-row .serif { font-size: 17px; line-height: 1.3; }
.news-row:hover .serif { color: var(--oxblood); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--rule); text-decoration: none; background: var(--paper); }
.chip.on, .chip:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.news-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: start; }
@media (max-width: 960px) { .news-grid { grid-template-columns: 1fr; } }
.story { border-top: 1px solid var(--ink); padding: 16px 0 18px; }
.story.lead { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; padding-bottom: 28px; }
.story.lead:not(:has(.story-img)) { grid-template-columns: 1fr; }
.story-img { display: block; aspect-ratio: 4 / 3; margin-bottom: 12px; overflow: hidden; background: var(--ivory-2); }
.story-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
.story.lead .story-img { margin: 0; aspect-ratio: 3 / 2; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
@media (max-width: 760px) { .story.lead { grid-template-columns: 1fr; } }

.client-row { display: grid; grid-template-columns: 1.4fr 1fr 110px 170px; gap: 18px; padding: 18px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; align-items: center; }
.client-row:hover { background: var(--paper); }
.client-row .name { font-family: var(--serif); font-size: 22px; }
@media (max-width: 800px) { .client-row { grid-template-columns: 1fr; gap: 4px; } }
.user-card { border: 1px solid var(--rule); background: var(--paper); padding: 16px 18px; margin-bottom: 12px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin: 14px 0 18px; }
.gal { margin: 0; background: var(--paper); border: 1px solid var(--rule); }
.gal img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gal figcaption { padding: 8px 10px; font-size: 13px; }
.gal details { padding: 0 10px 10px; }
.gal.archived { opacity: .5; }
.upload-strip { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--rule); background: var(--paper); }
.item-thumb { display: block; max-width: 220px; max-height: 160px; object-fit: cover; border: 1px solid var(--rule); margin: 8px 0; }

.why { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--oxblood); line-height: 1.35; }
.news-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .news-cols { grid-template-columns: 1fr; } }

.roomy { padding: 34px 38px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .roomy { padding: 22px 18px; } }
.other-input { display: none; }
select.with-other:has(option[value="__other"]:checked) + .other-input, .other-input.show { display: block; }

.log-card { margin-top: 0; }
.log-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.log-card .spread { margin-bottom: 8px; }

.grid-2 > .panel, .grid-2 > .stack-col { margin-top: 0; }
.stack-col { display: flex; flex-direction: column; gap: 18px; }
.stack-col > .panel + .panel { margin-top: 0; }

/* ── Profile pictures and brand logos ─────────────────── */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; border: 1px solid var(--rule); background: var(--paper); }
.avatar.initials { background: var(--ink); color: var(--ivory, #F5EFE4); font-family: var(--serif); letter-spacing: .04em; border-color: var(--ink); }
.acct-link { display: inline-flex; align-items: center; gap: 8px; }
.ws-chip.has-logo { display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 4px; }
.ws-chip .brand-logo { height: 22px; width: auto; max-width: 90px; object-fit: contain; }
.brand-logo.head-logo { display: block; height: 48px; width: auto; max-width: 180px; object-fit: contain; margin: 0 0 12px auto; }
.logo-preview { background: var(--paper); border: 1px solid var(--rule); padding: 18px; display: flex; justify-content: center; }
.logo-preview .brand-logo { max-height: 80px; max-width: 100%; object-fit: contain; }
.photo-row { display: flex; gap: 20px; align-items: flex-start; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.people li:last-child { border-bottom: 0; }
.people li.off { opacity: .55; }
.person { display: flex; gap: 12px; align-items: center; }
.client-name { display: flex; gap: 14px; align-items: center; }
.client-row .row-logo { width: 52px; height: 52px; object-fit: contain; background: var(--paper); border: 1px solid var(--rule); padding: 6px; flex: none; }
.logo-blank { width: 52px; height: 52px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); font-family: var(--serif); font-size: 22px; color: var(--muted); }
.msg .who-l .avatar { margin-right: 8px; }
button.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--oxblood); cursor: pointer; font: inherit; }
.page-head.with-logo { align-items: center; }
.page-head.with-logo > .head-logo-wrap { flex: none; margin-right: 28px; }
.brand-logo.head-logo { display: block; height: 88px; width: auto; max-width: 200px; margin: 0; object-fit: contain; }
.brand-logo.default { background: #010B13; aspect-ratio: 1; width: auto; object-fit: cover; }
.brand-logo.head-logo.default { width: 88px; }
.ws-chip .brand-logo.default { width: 22px; height: 22px; }
.client-row .row-logo.default { padding: 0; }
.logo-preview { min-width: 120px; }
.logo-preview .brand-logo.default { height: 80px; width: 80px; }
.page-head.with-logo > div:nth-child(2) { flex: 1; min-width: 260px; }

/* ── Access & Usage ─────────────────────────────────────── */
.meter-row { margin-top: 16px; }
.meter { height: 6px; background: var(--ivory-2); border: 1px solid var(--rule); margin: 6px 0 4px; }
.meter span { display: block; height: 100%; background: var(--oxblood); }
.panel.cost { padding: 14px 18px; }

/* ── Review with Wilder ─────────────────────────────────── */
.review-list .review-point { border-left: 2px solid var(--rule); padding: 4px 0 4px 14px; margin-bottom: 14px; }
.review-list.keep .review-point { border-left-color: #6f8a6a; }
.review-list.drift .review-point { border-left-color: var(--oxblood); }
.review-list.clarify .review-point { border-left-color: #b08a3c; }
.edit-diff { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.edit-diff .was { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(94,27,32,.45); }
.edit-diff .now { color: var(--ink); }
label.check select, label.check input[type=file] { margin-left: 6px; }

/* ── Ask Wilder attachments ─────────────────────────────── */
.attach-field { display: flex; align-items: center; gap: 12px; margin: -4px 0 12px; flex-wrap: wrap; }
.attach-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--rule-strong, var(--rule)); padding: 6px 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.attach-btn::before { content: '+'; color: var(--oxblood); }
.attach-btn input { display: none; }
.attach-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--paper); padding: 4px 10px 4px 4px; font-size: 12px; text-decoration: none; color: var(--ink); }
.attach-chip img { width: 34px; height: 34px; object-fit: cover; }
.attach-chip .doc { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--ivory); font-size: 9px; letter-spacing: .1em; }
/* Messages: logos beside each message and in the conversation list */
.msg-row { display: flex; gap: 14px; align-items: flex-start; }
.msg-row .msg-body { flex: 1; min-width: 0; }
.msg-logo { width: 36px; height: 36px; object-fit: contain; background: var(--paper); border: 1px solid var(--rule); padding: 4px; flex: none; border-radius: 2px; }
.msg-logo.default { padding: 0; }
.msg-list .logo-cell { width: 44px; padding-right: 0; }
.msg-list .msg-logo { width: 30px; height: 30px; padding: 3px; }
.msg-list .msg-logo.default { padding: 0; }
.msg-logo.initials { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; letter-spacing: .04em; color: var(--ink); box-sizing: border-box; }
.msg-list .msg-logo.initials { font-size: 12px; }
/* Brand Workspace dashboard */
.dash-continue { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash-continue .h3 a { text-decoration: none; }
.dash-welcome { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .dash-welcome { grid-template-columns: 1fr; } }
.dash-start .h2 { margin-bottom: 6px; }
.dash-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
@media (max-width: 560px) { .dash-routes { grid-template-columns: 1fr; } }
.route-btn { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px; background: var(--paper); border: 1px solid var(--ink); cursor: pointer; font: inherit; color: var(--ink); }
.route-btn:hover, .route-btn:focus-visible { background: var(--ink); color: var(--paper); }
.route-btn:hover .muted, .route-btn:focus-visible .muted { color: var(--paper); opacity: .8; }
.route-btn .h3 { margin: 0; }
.dash-meter { padding: 10px 0; border-top: 1px solid var(--rule); }
.dash-items { list-style: none; padding: 0; margin: 0; }
.dash-items li a { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.dash-items li a:hover .cta { text-decoration: underline; }
.dash-items .tag { justify-self: start; }
@media (max-width: 700px) { .dash-items li a { grid-template-columns: 1fr; gap: 6px; } }
.dash-acc { border-top: 1px solid var(--ink); }
details.acc { border-bottom: 1px solid var(--rule); padding: 0; }
details.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 18px; padding: 18px 0; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: '+'; color: var(--oxblood); font-size: 18px; width: 14px; }
details[open].acc > summary::before { content: '−'; }
details.acc > :not(summary) { margin-left: 32px; max-width: 760px; }
details.acc[open] { padding-bottom: 18px; }
.dash-path { padding-left: 20px; }
.dash-path li { margin-bottom: 10px; }
.dash-spaces dt { margin-top: 12px; font-weight: 600; }
.dash-spaces dd { margin: 4px 0 0; }
.dash-examples { padding-left: 18px; }
.dash-examples li { margin-bottom: 6px; }
.grid-side aside .dash-routes { grid-template-columns: 1fr; }
.grid-side aside .route-btn { padding: 14px 16px; }
.dash-projects .project-row { grid-template-columns: 1fr 140px 80px 120px; gap: 14px; padding: 14px 4px; }
.dash-projects .project-row .name { font-size: 20px; }

/* Mobile menu: on small screens the header links fold behind a hamburger button (works without JavaScript). */
.menu { display: contents; }
.nav-toggle-input, .nav-toggle { display: none; }
@media (max-width: 860px) {
  .masthead-inner, .masthead.admin .masthead-inner { flex-wrap: wrap; gap: 0; padding: 10px 16px; min-height: 56px; }
  .wordmark, .masthead.admin .wordmark { flex: 1; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px; cursor: pointer; align-items: center; }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .nav-toggle-input:checked + .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle-input:checked + .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked + .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .menu { display: none; flex-basis: 100%; border-top: 1px solid var(--rule); margin-top: 10px; padding: 6px 0 14px; }
  .nav-toggle-input:checked ~ .menu { display: block; }
  .menu .nav, .masthead.admin .menu .nav { display: flex; flex-direction: column; gap: 0; border-top: 0; }
  .menu .nav a, .masthead.admin .menu .nav a { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
  .menu .nav a.on, .masthead.admin .menu .nav a.on { border-bottom-color: var(--rule); color: var(--ink); box-shadow: inset 3px 0 0 var(--oxblood); padding-left: 12px; }
  .menu .who { flex-wrap: wrap; white-space: normal; gap: 14px 18px; padding-top: 14px; font-size: 13.5px; }
}
