/* Forethos interface. Outdoor Connect colours (navy #0D3B66, sky #47B5FF), serif for counsel, sans for controls.
   System fonts only: the Runtime makes no requests outside the installation. */
:root {
  --paper: #F6F4EF; --surface: #FFFFFF; --ink: #17212C; --muted: #5E6976; --faint: #8A939D; --line: #E3DED3;
  --navy: #0D3B66; --accent: #1F5E96; --sky: #47B5FF; --wash: #EEF3F8; --warn: #9A6412;
  --side: #0B2A47; --side-ink: #E9EFF5; --side-muted: #8EA4BA; --side-line: rgba(255,255,255,.09); --side-hover: rgba(255,255,255,.06);
  --shadow: 0 1px 2px rgba(16,32,48,.05), 0 8px 28px rgba(16,32,48,.07);
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E141B; --surface: #151D27; --ink: #E6EBF1; --muted: #9AA6B3; --faint: #6F7B88; --line: #253140;
    --navy: #A9D2FF; --accent: #7FBDF5; --wash: #1A2633; --warn: #E0A54A;
    --side: #08121D; --side-line: rgba(255,255,255,.07);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans);
       -webkit-font-smoothing: antialiased; }
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Sidebar */
.side { width: 272px; flex: none; display: flex; flex-direction: column; background: var(--side); color: var(--side-ink);
        padding: 18px 14px 14px; }
.side.hidden { display: none; }
/* The approved logo keeps its navy lettering, so on dark surfaces it sits on a discreet white plate. */
.plate { background: #fff; border-radius: 12px; padding: 12px 16px; display: flex; justify-content: center; }
.plate img { display: block; width: 100%; height: auto; }
.side .plate { margin: 0 2px 20px; padding: 10px 14px; }
.mark { width: 22px; height: 22px; flex: none; }
.newchat { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-radius: 10px;
           border: 1px solid rgba(71,181,255,.35); background: rgba(71,181,255,.08); color: #fff; font-weight: 500; }
.newchat:hover { background: rgba(71,181,255,.16); }
.newchat span { color: var(--sky); font-size: 17px; line-height: 1; }
.side-label { margin: 24px 10px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); }
nav#chats { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
nav#chats a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 13.5px;
              opacity: .82; border-left: 2px solid transparent; }
nav#chats a .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav#chats a .d { display: block; font-size: 11px; color: var(--side-muted); margin-top: 1px; }
nav#chats a:hover { background: var(--side-hover); opacity: 1; }
nav#chats a.active { background: var(--side-hover); opacity: 1; border-left-color: var(--sky); border-radius: 0 8px 8px 0; }
.status { margin-top: 12px; padding: 12px 10px 2px; border-top: 1px solid var(--side-line); font-size: 11.5px; line-height: 1.6; color: var(--side-muted); }
.status b { color: var(--side-ink); font-weight: 500; }
.status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; margin-right: 6px; vertical-align: 1px; }
.status.bad .dot { background: #F0B44C; }

/* Stage */
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--paper); }
.icon { border: 0; background: none; font-size: 18px; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.icon:hover { background: var(--wash); }
.crumb { flex: 1; min-width: 0; font: 500 15px/1.3 var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counsel { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.counsel select { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); background: var(--surface);
                  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
main { flex: 1; overflow-y: auto; padding: 36px 28px 24px; scroll-behavior: smooth; }
main > * { max-width: 820px; margin-left: auto; margin-right: auto; }

/* Welcome */
.welcome { text-align: center; padding: 7vh 0 0; }
.welcome .plate { display: inline-flex; width: min(360px, 80%); padding: 0; background: none; }
@media (prefers-color-scheme: dark) { .welcome .plate { background: #fff; padding: 14px 20px; } .memo-head .mark { background: #fff; border-radius: 5px; padding: 2px; } }
.welcome h1 { font: 500 34px/1.2 var(--serif); margin: 20px 0 10px; color: var(--ink); letter-spacing: -.005em; }
.welcome p.lede { font: 17px/1.6 var(--serif); color: var(--muted); max-width: 620px; margin: 0 auto 34px; }
.starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.starter { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 16px 18px; transition: border-color .15s, transform .15s; }
.starter:hover { border-color: var(--accent); transform: translateY(-1px); }
.starter b { display: block; font: 600 15px/1.3 var(--serif); color: var(--navy); margin-bottom: 4px; }
.starter span { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Question and counsel */
.msg.user { margin: 6px auto 22px; padding-left: 16px; border-left: 2px solid var(--sky); }
.msg.user .label, .memo-head .label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.msg.user .q { font: 19px/1.5 var(--serif); color: var(--ink); white-space: pre-wrap; }
.msg.assistant { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
                 margin-bottom: 36px; overflow: hidden; }
.memo-head { display: flex; align-items: center; gap: 10px; padding: 14px 28px; border-bottom: 1px solid var(--line); }
.memo-head .mark { width: 24px; height: 24px; }
.memo-head .who { font: 600 15px/1 var(--serif); color: var(--navy); }
.memo-head .badge { margin-left: auto; font-size: 11.5px; color: var(--accent); background: var(--wash); border-radius: 999px; padding: 3px 10px; }
.memo-head .badge + .badge { margin-left: 6px; }
.memo-head .badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.memo { padding: 8px 40px 18px; font: 17px/1.68 var(--serif); }
.memo h1, .memo h2, .memo h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }
.memo h1 { font-size: 27px; font-weight: 500; margin: 22px 0 10px; }
.memo h2 { font-size: 21px; font-weight: 600; margin: 30px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.memo h1 + h2, .memo hr + h2, .memo > h2:first-child { border-top: 0; padding-top: 0; }
.memo h3 { font-size: 17.5px; font-weight: 600; margin: 22px 0 6px; }
.memo p { margin: 0 0 14px; }
.memo ul, .memo ol { margin: 0 0 14px; padding-left: 1.3em; }
.memo li { margin-bottom: 6px; }
.memo li::marker { color: var(--accent); }
.memo strong { font-weight: 650; color: var(--ink); }
.memo a { color: var(--accent); text-decoration-color: rgba(31,94,150,.35); text-underline-offset: 2px; }
.memo a.file { display: inline-flex; align-items: center; gap: 6px; font: 500 13.5px var(--sans); padding: 5px 10px; border-radius: 8px;
               background: var(--wash); text-decoration: none; }
.memo .tablewrap { overflow-x: auto; margin: 14px 0 18px; }
.memo table { border-collapse: collapse; width: 100%; font: 13.5px/1.45 var(--sans); font-variant-numeric: tabular-nums; }
.memo th { text-align: left; font-weight: 600; color: var(--navy); border-bottom: 2px solid var(--navy); padding: 8px 10px; vertical-align: bottom; }
.memo td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.memo tr:nth-child(even) td { background: color-mix(in srgb, var(--wash) 55%, transparent); }
.memo blockquote { margin: 0 0 14px; padding: 4px 0 4px 18px; border-left: 3px solid var(--sky); color: var(--muted); font-style: italic; }
.memo hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.memo code { font: 13.5px ui-monospace, Menlo, monospace; background: var(--wash); padding: 1px 5px; border-radius: 4px; }
.memo .err { color: var(--warn); font-family: var(--sans); font-size: 14px; }

/* Research trail */
details.trail { margin: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--wash) 45%, var(--surface)); font-size: 13px; }
details.trail summary { list-style: none; cursor: pointer; padding: 10px 28px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
details.trail summary::-webkit-details-marker { display: none; }
details.trail summary::after { content: "▾"; margin-left: auto; color: var(--faint); transition: transform .15s; }
details.trail[open] summary::after { transform: rotate(180deg); }
details.trail .now { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
details.trail .count { color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
details.trail ol { margin: 0; padding: 4px 28px 14px 50px; max-height: 320px; overflow-y: auto; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
details.trail li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
details.trail li.check { color: var(--accent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); flex: none; animation: pulse 1.4s ease-in-out infinite; }
.done-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DB37E; flex: none; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } main { scroll-behavior: auto; } }

/* Footer of an answer */
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 28px 14px; border-top: 1px solid var(--line);
           font-size: 12px; color: var(--faint); }
.actions .meta { margin-right: auto; }
.actions .exp { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-left: 8px; }
.actions button { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 6px 12px;
                  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.actions button:hover { border-color: var(--accent); color: var(--accent); }
.actions button svg { width: 14px; height: 14px; }

/* Composer */
.composer { padding: 10px 28px 14px; background: linear-gradient(to bottom, transparent, var(--paper) 30%); }
.composer > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.composer .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px 10px; }
.composer .box:focus-within { border-color: var(--accent); }
textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font: 16.5px/1.55 var(--serif); padding: 4px 4px 8px;
           max-height: 40vh; }
textarea::placeholder { color: var(--faint); }
.tools { display: flex; align-items: center; gap: 12px; }
.attach { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; padding: 5px 8px; border-radius: 8px; }
.attach:hover { background: var(--wash); color: var(--ink); }
.attach svg { width: 16px; height: 16px; }
.hint { font-size: 12px; color: var(--faint); margin-left: auto; }
.send { border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 500; padding: 9px 16px; }
@media (prefers-color-scheme: dark) { .send { background: #2C6BA8; } }
.send:hover { filter: brightness(1.12); }
.send:disabled { opacity: .45; cursor: default; filter: none; }
.attached { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.attached:empty { display: none; }
.attached .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--wash); border-radius: 999px; padding: 3px 4px 3px 10px; margin: 0 6px 4px 0; }
.attached .chip.note { padding-right: 10px; background: none; }
.attached .remove { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.attached .remove:hover { background: var(--line); color: var(--ink); }
.fineprint { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 8px; }

/* Sign-in */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); padding: 30px 32px; width: min(380px, 92vw);
         box-shadow: var(--shadow); text-align: center; }
dialog::backdrop { background: rgba(8,18,29,.55); backdrop-filter: blur(3px); }
dialog .plate { padding: 0 8px; }
.dlg-title { font: 500 19px/1.35 var(--serif); margin: 18px 0 6px; }
.dlg-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
dialog input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 14px; }
dialog .send { width: 100%; padding: 11px; }
dialog input { margin-bottom: 10px; }
.dlg-error { color: var(--warn); font-size: 13px; min-height: 1em; margin: 0 0 10px; }
.dlg-buttons { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.dlg-buttons .send { width: auto; padding: 9px 18px; }
dialog .link.small { display: block; margin: 12px auto 0; font-size: 12.5px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }

/* Engagement, evidence, account */
.engagement { display: flex; gap: 6px; padding: 0 2px; }
.engagement select { flex: 1; min-width: 0; background: rgba(255,255,255,.06); color: var(--side-ink); border: 1px solid var(--side-line);
                     border-radius: 8px; padding: 7px 8px; font-size: 13px; }
.engagement select option { color: #17212C; }
.icon-side { border: 1px solid var(--side-line); background: rgba(255,255,255,.06); color: var(--sky); border-radius: 8px; width: 34px; font-size: 16px; }
.evidence { font-size: 11.5px; color: var(--side-muted); padding: 6px 4px 14px; line-height: 1.45; }
.evidence:empty { padding-bottom: 8px; }
.side-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--side-line); }
.side-foot .status { margin: 0; padding: 0 2px 8px; border: 0; }
.who-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 0 2px; }
.side .link { color: var(--sky); }
.expert { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--side-muted); padding: 8px 2px 0; }
nav#chats .empty { font-size: 12.5px; color: var(--side-muted); padding: 6px 10px; }

/* Top bar, privacy, documents drawer */
.topbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-size: 13px; color: var(--ink); }
.topbtn:hover { border-color: var(--accent); color: var(--accent); }
.privacy { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.privacy::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); flex: none; }
.privacy.local::before { background: #3DB37E; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
          box-shadow: -12px 0 40px rgba(16,32,48,.12); z-index: 6; display: flex; flex-direction: column; }
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line);
               font: 600 16px var(--serif); color: var(--navy); }
.drawer-body { overflow-y: auto; padding: 8px 20px 20px; }
.docgroup { padding: 14px 0; border-bottom: 1px solid var(--line); }
.doctitle { font: 600 15px/1.35 var(--serif); color: var(--ink); margin-bottom: 8px; }
.docrow { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 12.5px; color: var(--muted); }
.docrow .docmeta { flex: 1; min-width: 0; }
.docrow button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 30px; height: 28px; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.docrow button:hover { border-color: var(--accent); color: var(--accent); }
.docrow button svg { width: 14px; height: 14px; }
.kind { font-size: 11px; border-radius: 999px; padding: 2px 8px; background: var(--wash); color: var(--accent); white-space: nowrap; }
.kind.endorsed { background: color-mix(in srgb, #3DB37E 15%, transparent); color: #2E8A60; }
.kind.notes { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.empty { color: var(--muted); font-size: 13.5px; }

/* Answers: waiting, endorsement */
.memo .waiting { color: var(--faint); font: italic 15px var(--serif); }
.memo-head .badge.ok { color: #2E8A60; background: color-mix(in srgb, #3DB37E 15%, transparent); }
.actions .endorse { margin-left: 8px; background: var(--navy); color: #fff; border-color: var(--navy); }
.actions .endorse:hover { color: #fff; filter: brightness(1.12); }
.attached .chip.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.welcome .context { font-size: 13px; color: var(--accent); margin: -18px 0 26px; }

/* The client's portal */
body.portal-mode .side, body.portal-mode .stage { display: none; }
.portal { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.portal[hidden] { display: none; }
.portal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.portal-head img { height: 44px; }
@media (prefers-color-scheme: dark) { .portal-head { background: #fff; color: #17212C; } }
.portal-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 24px; }
.portal-eng { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 28px; margin-bottom: 24px; }
.portal-eng h2 { font: 500 24px/1.25 var(--serif); color: var(--navy); margin: 0; }
.portal-client { color: var(--muted); margin: 4px 0 10px; }
.portal .fineprint { padding: 18px; }

@media (max-width: 860px) {
  .side { position: fixed; inset: 0 auto 0 0; z-index: 5; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .topbar, main, .composer { padding-left: 16px; padding-right: 16px; }
  .counsel span { display: none; }
  .counsel select { max-width: 44vw; }
  .memo { padding: 6px 20px 14px; font-size: 16.5px; }
  .memo-head, details.trail summary, .actions { padding-left: 20px; padding-right: 20px; }
  .starters { grid-template-columns: 1fr; }
  .welcome h1 { font-size: 27px; }
  .hint, .privacy { display: none; }
  .send { margin-left: auto; }
}

/* Clients, sharing and credits */
.credits { font-size: 11.5px; color: var(--side-muted); padding: 0 2px 8px; }
.credits.low { color: #F0B44C; } .credits.paused, .credits.ended { color: #F07A6A; }
.link.org { display: block; color: var(--sky); font-size: 12.5px; padding: 0 2px 8px; }
.link.org[hidden], .credits[hidden] { display: none; }   /* only the client administrator sees Organisation */
.people label { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.people input { width: auto; margin: 0; }
.people .r { margin-left: auto; color: var(--faint); font-size: 12px; }
/* The organisation page, for the client administrator */
.orgpage { position: fixed; inset: 0; z-index: 20; background: var(--paper); overflow: auto; }
.org-top { display: flex; align-items: center; gap: 22px; padding: 18px 40px; background: var(--side); color: var(--side-ink); }
.org-top h1 { margin: 0; font: 500 24px/1.2 var(--serif); }
.org-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); }
.back { border: 1px solid var(--side-line); background: rgba(255,255,255,.06); color: var(--side-ink); border-radius: 8px; padding: 7px 12px; font-size: 13px; }
.org { max-width: 1080px; margin: 0 auto; padding: 26px 40px 60px; }
.org .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.org .tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.org .tile .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.org .tile .v { font: 600 26px/1.25 var(--serif); color: var(--navy); margin: 4px 0 2px; }
.org .tile .n { font-size: 12.5px; color: var(--muted); }
.org .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.org .card h2 { font: 600 17px/1.3 var(--serif); color: var(--navy); margin: 0 0 4px; }
.org .card .sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.org table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.org th { text-align: left; font-weight: 600; color: var(--faint); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.org td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.org tr:last-child td { border-bottom: 0; }
.org td .muted, .org .muted { color: var(--faint); font-size: 12px; }
.org .pill { display: inline-block; font-size: 11.5px; border-radius: 999px; padding: 2px 9px; background: var(--wash); color: var(--accent); white-space: nowrap; }
.org .pill.ok { background: color-mix(in srgb, #2E9E5B 14%, transparent); color: #1F7A45; }
.org .pill.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.org .pill.bad { background: color-mix(in srgb, #C0392B 12%, transparent); color: #A3261B; }
.org .pill.grey { background: var(--paper); color: var(--faint); }
.org .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; margin: 2px 4px 2px 0; font-size: 12.5px; }
.org .chip button { border: 0; background: none; color: var(--faint); font-size: 14px; padding: 0 4px; cursor: pointer; }
.org .chip.oc { border-color: var(--warn); }
.org .grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.org label.f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.org input, .org select { width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 13.5px; }
.org td select { width: auto; max-width: 190px; }
.org .send { width: auto; padding: 9px 16px; white-space: nowrap; }
.org .btnline { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.org .btnline.danger { color: #A3261B; }
.org .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.org .notice { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 18px; }
.org .notice.info { background: var(--wash); border-color: var(--line); }
.org .linkbox { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.org .linkbox code { flex: 1; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; }
.org .empty { color: var(--faint); font-size: 13px; margin: 6px 0 0; }
@media (max-width: 860px) { .org { padding: 18px 16px 40px; } .org .tiles { grid-template-columns: 1fr; } .org .grid { grid-template-columns: 1fr; } .org-top { padding: 14px 16px; } }
.paused-note { color: var(--warn); }
