/* Doclar Brand — one stylesheet for microsite, studio and portal. Tokens from the Doclar Brand identity kit. */
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("/fonts/noto-serif-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --ink: #142D32; --teal: #0C675B; --teal-dark: #08493f; --mint: #C6EBDD; --paper: #F7F3EA; --white: #FFFFFF;
  --ink-2: #3d5357; --ink-3: #5f7174; --line: #dcd6c8; --line-2: #e9e4d8; --warn: #8a5a00; --warn-bg: #fdf1d8; --bad: #9b2c2c; --bad-bg: #fbe6e4; --ok-bg: #e3f4ec;
  --sans: "Nimbus Sans", "TeX Gyre Heros", "Helvetica Neue", Helvetica, Arial, sans-serif; --serif: "Noto Serif", Georgia, serif;
  --r: 10px; --r-lg: 16px; --shadow: 0 1px 2px rgba(20,45,50,.06), 0 4px 16px rgba(20,45,50,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
img, svg { max-width: 100%; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; line-height: 1.2; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .5em; }
h4 { font-size: 1rem; margin: 0 0 .4em; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); margin: 0 0 .8em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hidden { display: none !important; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--teal); background: var(--teal); color: #fff; font: 700 .95rem var(--sans); padding: 11px 18px; border-radius: 8px; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--teal); }
.btn.secondary:hover { background: var(--mint); color: var(--ink); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink-3); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label { display: block; font-weight: 700; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: 1rem var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(12,103,91,.18); }
input[type=color] { width: 52px; height: 40px; border: 1.5px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal); }
fieldset { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }

/* Surfaces */
.card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.mint { background: var(--mint); border-color: transparent; }
.card.ink { background: var(--ink); color: #fff; border-color: transparent; }
.card.ink a { color: var(--mint); }
.card h3:first-child, .card h4:first-child { margin-top: 0; }
.panel { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px 18px; }
.flash { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; background: var(--ok-bg); border: 1px solid #b8e0cc; }
.flash.err { background: var(--bad-bg); border-color: #efc2bd; color: #6b1d1d; }
.flash.warn { background: var(--warn-bg); border-color: #f0d8a6; color: #5d3d00; }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.badge.live, .badge.approved, .badge.ok, .badge.included, .badge.accepted, .badge.published, .badge.approved_here { background: var(--mint); color: var(--ink); }
.badge.coming, .badge.deferred, .badge.ready, .badge.draft { background: var(--line-2); color: var(--ink-2); }
.badge.in_review, .badge.in_discovery, .badge.drafting, .badge.sent, .badge.reviewed, .badge.shared, .badge.client_confirmed, .badge.active { background: #dcebf7; color: #17405f; }
.badge.needs_review, .badge.provisional, .badge.returned, .badge.paused, .badge.awaiting_human, .badge.open { background: var(--warn-bg); color: var(--warn); }
.badge.missing, .badge.out_of_scope, .badge.failed, .badge.bad, .badge.withdrawn { background: var(--bad-bg); color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .88rem; }
.kv dd { margin: 0; }
.prose h2 { font-size: 1.4rem; margin-top: 1.4em; } .prose h3 { margin-top: 1.2em; } .prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .3em; }
details.disclose > summary { cursor: pointer; font-weight: 700; color: var(--teal); }
.empty { padding: 28px; text-align: center; color: var(--ink-3); border: 1.5px dashed var(--line); border-radius: var(--r); }

/* Microsite */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(247,243,234,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.site-head .logo img { height: 34px; width: auto; display: block; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.site-nav a:hover { color: var(--teal); }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .site-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 16px 24px 24px; border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
}
.hero { padding: 88px 0 72px; }
.hero h1 { max-width: 15ch; }
.hero .lead { font-size: 1.2rem; max-width: 60ch; color: var(--ink-2); }
.section { padding: 72px 0; }
.section.alt { background: #fff; }
.section.ink { background: var(--ink); color: #fff; }
.section.ink .eyebrow { color: var(--mint); }
.section.ink .muted { color: #b9c9c8; }
.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: #fff; border-radius: var(--r-lg); padding: 22px; border: 1px solid var(--line-2); }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 700; margin-bottom: 12px; }
.example { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
@media (max-width: 760px) { .example { grid-template-columns: 1fr; } }
.example-tabs { display: flex; flex-direction: column; gap: 6px; }
.example-tabs button { text-align: left; background: transparent; border: 1.5px solid transparent; border-radius: 10px; padding: 12px 14px; font: 700 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.example-tabs button[aria-selected=true] { background: #fff; border-color: var(--teal); }
.example-tabs button span { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-3); }
.example-panel { background: #fff; border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--line-2); min-height: 300px; }
.quote { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; margin: 0 0 14px; }
.module-tile { display: block; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); height: 100%; }
.module-tile:hover { border-color: var(--teal); color: var(--ink); }
.module-tile .num { font-weight: 700; color: var(--teal); font-size: .82rem; }
.site-foot { background: var(--ink); color: #cfdcdb; padding: 48px 0; font-size: .9rem; }
.site-foot a { color: var(--mint); }
.site-foot img { height: 28px; }
.mini-card { width: 340px; max-width: 100%; aspect-ratio: 85/55; border-radius: 10px; box-shadow: var(--shadow); background: #fff; overflow: hidden; }

/* App shell (studio and portal) */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-side { background: var(--ink); color: #dce6e5; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; font-weight: 700; }
.app-side .brand img { height: 26px; }
.app-side nav a { display: block; color: #dce6e5; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-size: .93rem; }
.app-side nav a:hover { background: rgba(198,235,221,.1); color: #fff; }
.app-side nav a.on { background: var(--mint); color: var(--ink); font-weight: 700; }
.app-side .section-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: #8fa6a5; margin: 16px 12px 6px; }
.app-side .who { margin-top: 24px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.app-main { padding: 28px 36px 64px; min-width: 0; }
.app-main h1 { font-size: 2rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .92rem; border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tabs a.on { color: var(--teal); border-bottom-color: var(--teal); }
.stat { font-family: var(--serif); font-size: 2rem; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: static; height: auto; }
  .app-side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .app-main { padding: 20px 16px 48px; }
}

/* Project map */
.map-phase { margin-bottom: 24px; }
.map-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.map-item { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.map-item.out_of_scope, .map-item.deferred { background: #fbfaf6; }
.map-item:hover { border-color: var(--teal); color: var(--ink); }
.map-item .title { font-weight: 700; }

/* Consultation */
.consult { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .consult { grid-template-columns: 1fr; } }
.chat { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 560px; max-height: 78vh; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 12px 15px; border-radius: 14px; white-space: pre-wrap; line-height: 1.5; }
.msg.assistant { background: var(--paper); align-self: flex-start; border-top-left-radius: 4px; }
.msg.client, .msg.specialist { background: var(--teal); color: #fff; align-self: flex-end; border-top-right-radius: 4px; }
.msg.specialist { background: var(--ink); }
.msg.system { align-self: center; background: transparent; color: var(--ink-3); font-size: .85rem; text-align: center; }
.msg.suggestion { background: var(--mint); align-self: flex-start; font-size: .92rem; }
.msg .meta { display: block; font-size: .72rem; opacity: .75; margin-top: 6px; }
.msg .summary { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .92rem; }
.chat-form { border-top: 1px solid var(--line-2); padding: 14px; display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { min-height: 52px; max-height: 200px; }
.typing { align-self: flex-start; color: var(--ink-3); font-size: .9rem; }
.evidence-item { border-left: 3px solid var(--teal); padding: 6px 10px; background: #fff; border-radius: 0 6px 6px 0; margin-bottom: 8px; font-size: .9rem; }
.evidence-item.assumption { border-left-color: var(--warn); }
.evidence-item.participant_view { border-left-color: #5b7fa6; }
.evidence-item .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }

/* Options and recommendations */
.option { border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; }
.option.recommended { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,103,91,.1); }
.provenance { font-size: .78rem; color: var(--ink-3); }

/* Visual identity */
.swatch { border-radius: 10px; height: 74px; display: flex; align-items: flex-end; padding: 8px 10px; font-weight: 700; font-size: .82rem; border: 1px solid rgba(0,0,0,.06); }
.contrast-cell { font-size: .8rem; text-align: center; padding: 8px 4px; border-radius: 6px; }
.preview-frame { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; display: grid; place-items: center; min-height: 160px; }
.card-preview svg { width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); background: #fff; }

/* Digital business card */
.dcard { max-width: 440px; margin: 0 auto; padding: 32px 20px 48px; }
.dcard .top { border-radius: 20px; padding: 28px; color: #fff; }
.dcard .actions { display: grid; gap: 10px; margin-top: 18px; }
.dcard .line { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: #fff; border-radius: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--line-2); }

@media print { .site-head, .app-side, .btn, .no-print { display: none !important; } .app { display: block; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
