/* DRN Console, Redesign 03 (handoff 03, Design Study 03).
 * Loaded after app.css. The shell, the tokens and the shared components;
 * existing page components keep their app.css rules and are re-grounded
 * here onto the warm light reading surface.
 * Palette from the DRN Enterprises kit. Fonts are the licensed local files
 * already declared in app.css (Cormorant Garamond, Inter). */

:root {
  --navy: #0D1B2A; --slate: #374151; --sage: #5B6B5A; --sand: #D9C9B3;
  --paper: #F8F7F4; --ink: #172737; --muted: #5f6a67; --line: #e4e4de;
  --card: #ffffff; --soft: #eeeee8; --sage-tint: #edf1ea; --sage-border: #d5ddd0;
  --sage-dark: #42533f; --side: 238px; --radius: 12px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", Arial, sans-serif;
}

/* --- ground ------------------------------------------------------------ */
html[data-ground="light"], html[data-ground="light"] body {
  background: var(--paper); color: var(--ink);
}
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

.shell03 { min-height: 100vh; }
.rail-toggle { position: absolute; opacity: 0; pointer-events: none; }

/* --- sidebar ------------------------------------------------------------ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; background: var(--navy); color: var(--paper);
  padding: 20px 18px 16px; height: 100dvh; box-sizing: border-box;
}
.brand { display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 6px 8px 20px; margin-bottom: 16px; text-decoration: none;
  border-bottom: 1px solid #f8f7f41f; flex-shrink: 0; }
.brandmark { width: 158px; max-width: 100%; height: auto; display: block; }
.brandname { font: 400 27px/1.12 var(--serif); letter-spacing: -.3px; color: var(--paper); white-space: nowrap; margin-top: 2px; }
.brandtag { font-size: 9px; letter-spacing: 2.2px; margin-top: 7px; color: var(--sand); }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 3px; scrollbar-width: thin; scrollbar-color: #58695d transparent; }
.navlabel { font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; color: #aab3ad; margin: 4px 12px 8px; font-weight: 600; }
.navitem { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 0 12px; border-radius: 8px; color: #e8eae6; text-decoration: none; font-size: 14px; }
.navitem .icon { color: #c9cfc9; }
.navitem.active { background: var(--sage); color: var(--paper); }
.navitem.active .icon { color: var(--paper); }
.navitem.active::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; border-radius: 1px; background: var(--sand); }
.navitem:hover:not(.active) { background: #5b6b5a35; }
.navitem:focus-visible { outline: 2px solid var(--sand); outline-offset: -2px; }
.pinlabel { margin-top: 20px; }
.pinnav { display: flex; flex-direction: column; }
.pinnav a { color: #cfd4cf; text-decoration: none; font-size: 12.5px; padding: 7px 12px; border-radius: 6px; min-height: 30px; }
.pinnav a:hover { background: #5b6b5a35; color: var(--paper); }
.systemnav { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f8f7f41f; }
.systemnav .navitem { font-size: 13px; }
.sidebarfoot { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 13px 8px 0; border-top: 1px solid #f8f7f41f; margin-top: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #f8f7f45c; display: grid; place-items: center; font-size: 10px; flex-shrink: 0; }
.who { display: flex; flex-direction: column; min-width: 0; font-size: 12px; }
.who small { color: #aab3ad; font-size: 10px; }
.sidebarfoot form { margin-left: auto; }
.linkish { background: none; border: 0; color: #cfd4cf; font: inherit; font-size: 11px; text-decoration: underline; cursor: pointer; padding: 6px; }
.mobile-close, .scrim { display: none; }

/* --- content column + top bar ----------------------------------------- */
.content { margin-left: var(--side); min-width: 0; }
.topbar { display: flex; align-items: center; gap: 18px; height: 74px; padding: 0 36px;
  border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.search { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 420px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); padding: 10px 0; min-height: 44px; }
.search input:focus { outline: none; }
.search:focus-within { color: var(--ink); }
.topright { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.private { font-size: 12px; color: var(--muted); }
.mobile-menu, .mobile-brand, .mobile-search { display: none; }

.wrap { padding: 34px 36px 60px; max-width: 1240px; box-sizing: border-box; }
.titleline { margin-bottom: 26px; }
.eyebrow { font-size: 10px; letter-spacing: 1.9px; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.page-title, .main .page-title { font: 400 40px/1.1 var(--serif); letter-spacing: -.5px; color: var(--ink); margin: 0; }
.titleline .lede-top { font-size: 14px; color: var(--muted); margin: 10px 0 0; max-width: 680px; }

/* --- shared components ----------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid var(--sage); background: var(--sage);
  color: var(--paper); text-decoration: none; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn:hover { background: #4f5e4e; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #cfd4cb; }
.btn.ghost:hover { background: var(--sage-tint); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.card03 { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card03 h2, .sectionhead h2 { font: 600 16px/1.35 var(--sans); margin: 0; color: var(--ink); }
.sage-card { background: var(--sage); color: var(--paper); border-radius: var(--radius); padding: 27px; }
.sage-card .eyebrow { color: #e8ece5; }
.sage-card h2 { font: 400 31px/1.14 var(--serif); margin: 6px 0 14px; letter-spacing: -.4px; color: var(--paper); }
.sage-card p, .sage-card li { color: #eef1ec; font-size: 12.5px; line-height: 1.65; }
.tint { background: var(--sage-tint); border-color: var(--sage-border); }
.tag { display: inline-block; font-size: 10.5px; padding: 3px 8px; border-radius: 5px; background: var(--sage-tint); color: var(--sage-dark); font-weight: 500; white-space: nowrap; }
.tag.neutral { background: var(--soft); color: var(--slate); }
.tag.warn { background: #f3ead9; color: #6b4f1f; }
.tag.off { background: #ececec; color: #505050; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(250px, 1fr); gap: 24px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.sectionhead h2 { font: 400 26px/1.2 var(--serif); letter-spacing: -.3px; }
.sectionhead a { font-size: 13px; color: var(--sage-dark); font-weight: 500; text-decoration: none; }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 118px; }
.tile:hover { border-color: var(--sage-border); background: #fbfcfa; }
.tile .icon { width: 22px; height: 22px; color: var(--sage); }
.tile b { font-size: 14.5px; font-weight: 600; margin-top: 6px; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.tile .count { margin-top: auto; font-size: 12px; color: var(--sage-dark); font-weight: 500; }
.rows { display: flex; flex-direction: column; }
.row03 { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.row03:first-child { border-top: 0; }
.row03 a { color: var(--ink); text-decoration: none; font-weight: 500; }
.row03 a:hover { text-decoration: underline; }
.row03 .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row03 .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.state { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 9px; background: var(--soft); color: var(--slate); font-size: 12.5px; line-height: 1.6; }
.state b { color: var(--ink); }
.state .icon { margin-top: 2px; color: var(--sage); }
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sage); }

/* --- re-grounding existing app.css components on the light surface ----- */
html[data-ground="light"] .card { background: var(--card); border: 1px solid var(--line); box-shadow: none; color: var(--ink); }
html[data-ground="light"] .zone-title { color: var(--ink); font: 400 24px/1.2 var(--serif); }
html[data-ground="light"] .lede, html[data-ground="light"] .lede.on-ground { color: var(--muted); }
html[data-ground="light"] .queue-line { color: var(--muted); }
html[data-ground="light"] .table th { color: var(--muted); border-color: var(--line); }
html[data-ground="light"] .table td { border-color: var(--line); color: var(--ink); }
html[data-ground="light"] .table a { color: var(--sage-dark); }

/* --- Data Room -------------------------------------------------------- */
.intake-form { padding: 25px; }
.form-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.form-top .eyebrow { color: var(--sage-dark); margin: 0; }
.dropzone { border: 2px dashed #b7c4b1; background: #f1f4ee; border-radius: 10px; padding: 24px 18px 18px; text-align: center; position: relative; }
.dropzone.is-over, .dropzone:focus-within { background: #e6eee0; border-color: var(--sage); }
.drop-form .drop { display: block; cursor: pointer; background: none; border: 0; padding: 0; color: var(--ink); }
.drop-form .drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-target .icon { width: 30px; height: 30px; color: var(--sage); margin: 0 auto 10px; display: block; }
.drop-lead { font-size: 17px; font-weight: 600; margin: 0; }
.drop-sub { font-size: 12px; color: var(--muted); margin: 6px 0 16px; }
.pick-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pick-actions .btn { min-height: 44px; }
.drop-form .drop-alt { display: inline-flex; }
.drop-form .drop-alt input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picker-help { font-size: 11.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.6; }
.file-rules { font-size: 12px; color: var(--muted); padding-top: 10px; }
.file-rules summary { cursor: pointer; min-height: 34px; display: list-item; }
.file-rules p { line-height: 1.7; margin: 4px 0 10px; }
.context-field { display: block; margin-top: 18px; }
.context-field .field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 9px; color: var(--ink); }
.context-field textarea { font: 400 15px/1.6 var(--sans); resize: vertical; min-height: 92px; width: 100%; box-sizing: border-box;
  border: 1px solid #c3cbbd; border-radius: 7px; background: #fff; padding: 12px; color: var(--ink); }
.context-help { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--sage-dark); margin: 8px 0 0; line-height: 1.6; }
.context-help .icon { width: 15px; height: 15px; margin-top: 2px; }
.submit-block { margin-top: 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.submit-block .btn { min-height: 46px; padding: 10px 24px; font-size: 14px; }
.submit-block p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.55; max-width: 360px; }
.drop-form .picked { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; color: var(--ink); }
.receipt { margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; background: var(--sage-tint); border: 1px solid var(--sage-border); color: var(--sage-dark); }
.receipt b { color: var(--ink); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 12px; }
.steps .num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #f8f7f47a; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.steps b { display: block; color: var(--paper); font-size: 13px; margin-bottom: 2px; }
.aside-stack { display: flex; flex-direction: column; gap: 18px; }
.next-run { border-top: 1px solid #f8f7f438; margin-top: 18px; padding-top: 14px; font-size: 11.5px; }
.intake-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.intake-tabs a { padding: 10px 0 12px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.intake-tabs a.on { color: var(--sage-dark); border-color: var(--sage); font-weight: 600; }
.intake-list { display: flex; flex-direction: column; gap: 10px; }
.intake-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 15px 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.intake-row .name { font-weight: 550; overflow-wrap: anywhere; }
.intake-row .name a { color: var(--ink); text-decoration: none; }
.intake-row .name a:hover { text-decoration: underline; }
.intake-row .note { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.intake-row .when { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.intake-row .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* --- Home ------------------------------------------------------------- */
.greet { font: 400 44px/1.08 var(--serif); letter-spacing: -.6px; margin: 0; }
.attention .row03 .tag { flex-shrink: 0; }
.stat { font: 400 38px/1 var(--serif); color: var(--ink); }
.stat small { font: 400 12px/1 var(--sans); color: var(--muted); margin-left: 6px; }

/* --- responsive -------------------------------------------------------- */
@media (max-width: 1190px) {
  :root { --side: 208px; }
  .wrap { padding: 26px 26px 56px; }
  .topbar { padding: 0 26px; }
  .brandmark { width: 146px; } .brandname { font-size: 25px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-row { grid-template-columns: 1fr; gap: 6px; }
  .intake-row .when { text-align: left; }
}
@media (max-height: 720px) and (min-width: 721px) {
  .brand { padding-bottom: 12px; margin-bottom: 10px; }
  .brandmark { width: 118px; } .brandname { font-size: 23px; }
}
@media (max-width: 720px) {
  :root { --side: 0px; }
  body { font-size: 15px; }
  .sidebar { width: 272px; max-width: 86vw; transform: translateX(-100%); transition: transform .2s; padding: 22px 16px 16px; }
  .rail-toggle:checked ~ .shell03 .sidebar { transform: translateX(0); }
  .rail-toggle:checked ~ .shell03 .scrim { display: block; position: fixed; inset: 0; background: #0d1b2a70; z-index: 29; }
  .mobile-close { display: grid; place-items: center; position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; color: var(--paper); cursor: pointer; }
  .content { margin-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .topbar { position: relative; height: auto; min-height: 112px; padding: 10px 14px; background: var(--navy); color: var(--paper); border: 0;
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
  .topbar .search, .topbar .topright { display: none; }
  .mobile-menu, .mobile-search { display: grid; place-items: center; width: 44px; height: 44px; color: var(--paper); cursor: pointer; }
  .mobile-brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--paper); }
  .mobile-arrow { width: 64px; height: auto; }
  .mobile-brand b { font: 400 22px/1.15 var(--serif); margin-top: 4px; font-weight: 400; }
  .mobile-brand small { font-size: 8px; letter-spacing: 2px; color: var(--sand); margin-top: 3px; }
  .wrap { padding: 22px 16px 28px; }
  .page-title, .main .page-title { font-size: 32px; }
  .greet { font-size: 34px; }
  .grid3, .grid4 { grid-template-columns: 1fr; }
  .intake-form { padding: 18px 15px; }
  .context-field textarea, .search input { font-size: 16px; }
  .sectionhead h2 { font-size: 23px; }
  .mobile-bottom { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0; z-index: 25;
    background: var(--paper); border-top: 1px solid var(--sage-border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bottom a, .mobile-bottom label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; font-size: 11px; color: var(--muted); text-decoration: none; border-radius: 9px; cursor: pointer; }
  .mobile-bottom .icon { width: 21px; height: 21px; }
  .mobile-bottom a.on { background: var(--sage-tint); color: var(--sage-dark); font-weight: 600; }
}
@media (min-width: 721px) { .mobile-bottom { display: none; } }
@media (max-width: 370px) { .wrap { padding-left: 13px; padding-right: 13px; } .greet { font-size: 30px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Data Room: capability-aware folder picking (dirpicker.js sets .has-dirpicker). */
.folder-fallback { display: none; }
html:not(.has-dirpicker) .folder-fallback { display: block; }
.drop-form .drop-alt { display: none; position: relative; margin: 0; }
.has-dirpicker .drop-form .drop-alt { display: inline-flex; }
.drop-form .dropzone.drop { display: block; background: #f1f4ee; border: 2px dashed #b7c4b1; border-radius: 10px; padding: 24px 18px 18px; margin: 0; min-height: 0; }
.drop-form .dropzone.drop.is-over { background: #e3ecdc; border-color: var(--sage); }
.drop-form .dropzone.drop.is-refused { border-color: #b38b4a; }
.drop-target { display: block; cursor: pointer; }
.drop-form .notice, .intake-form .notice { margin-top: 14px; font-size: 13px; color: #6b4f1f; background: #f7f0e3; border-radius: 8px; padding: 10px 12px; }

/* Fixes after the first screenshots. */
.systemnav { flex-shrink: 0; margin-top: 10px; padding-top: 12px; border-top: 1px solid #f8f7f41f; }
.systemnav .navitem { min-height: 40px; }
.drop-form { text-align: left; }
.drop-form .context-field { display: block; width: 100%; text-align: left; }
.drop-form .context-field textarea { display: block; width: 100%; }
.drop-form .file-rules { text-align: left; }
.drop-form .drop-alt span { text-decoration: none; color: inherit; }
.pick-actions .btn .icon { width: 17px; height: 17px; display: inline-block; margin: 0; color: currentColor; }
.drop-form .submit-block, .drop-form .context-help { justify-content: flex-start; text-align: left; }
.sidebarfoot { padding-top: 10px; }
.who b { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 820px) and (min-width: 721px) {
  .brand { padding-bottom: 12px; margin-bottom: 10px; }
  .brandmark { width: 124px; } .brandname { font-size: 24px; } .brandtag { margin-top: 5px; }
  .navitem { min-height: 38px; }
  .pinlabel { margin-top: 12px; }
}
@media (max-width: 720px) {
  .sidebar .brand { padding-bottom: 12px; margin-bottom: 10px; }
  .sidebar .brandmark { width: 112px; }
  .sidebar .brandname { font-size: 24px; }
  .navitem { min-height: 44px; }
  .pinlabel { margin-top: 12px; }
}

/* Document rows built from facts (2026-09-22). */
.doclist { display: flex; flex-direction: column; }
.docrow { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.docrow:first-child { border-top: 0; }
.docrow:hover { background: #f6f8f4; }
.docrow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.docrow-main b { font-weight: 550; font-size: 13.5px; line-height: 1.4; }
.docrow-meta { font-size: 12px; color: var(--muted); }
.docrow-file { font-size: 11px; color: #8a918e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docrow .tag { flex-shrink: 0; }
.factcard { margin-bottom: 18px; }
.factcard h2 { font: 400 26px/1.25 var(--serif); margin: 4px 0 10px; }
.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0; }
.factgrid div { background: var(--soft); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }
.factgrid b { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.keypoints { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.thinghead { font: 600 13px/1.4 var(--sans); letter-spacing: .4px; margin: 20px 0 4px; color: var(--sage-dark); }
.thinghead:first-child { margin-top: 4px; }
.docrow .when { font-size: 11.5px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.comingup { list-style: none; padding: 0; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 9px; }
.comingup a { color: var(--paper); text-decoration: none; font-size: 12.5px; line-height: 1.5; display: block; }
.comingup a:hover { text-decoration: underline; }
.comingup b { display: inline-block; min-width: 86px; font-weight: 600; }
