/* Daher Law Group Staff Tools. Heritage Ivory palette shared with the Internal-Data Repository. */
:root {
  color-scheme: light only;
  --ivory: #F7F2E9;
  --panel: rgba(255,254,249,.94);
  --tan: #EFE8DA;
  --line: rgba(156,131,75,.28);
  --line-soft: rgba(156,131,75,.18);
  --gold: #B4A068;
  --gold-deep: #8E7B47;
  --navy: #060839;
  --navy-2: #12163F;
  --claret: #9E1B1E;
  --ink: #1F2430;
  --ink-2: #4A5060;
  --muted: #6E7484;
  --ok: #2E6B3E;
  --warn-bg: #FFF7E6;
  --warn-line: #E9CF9B;
  --danger-bg: #FBEDED;
  --serif: 'Cinzel', Georgia, serif;
  --sans: 'Open Sans', system-ui, sans-serif;
  --label: 'Oswald', var(--sans);
  --radius: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 48px rgba(27,23,15,.075);
  --shadow-hover: 0 1px 0 rgba(255,255,255,.9) inset, 0 24px 60px rgba(27,23,15,.11);
  --ease: cubic-bezier(.2,.8,.2,1);
  --gold-rule: rgba(176,147,76,.85);
  --fs-label: 12px; --fs-body: 15.5px; --fs-card-title: 24px; --fs-h1: 32px; --fs-display: 38px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--sans); font-size: var(--fs-body); line-height: 1.5; color: var(--ink); background: var(--ivory); display: flex; flex-direction: column; min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.75), rgba(255,255,255,0) 420px),
              radial-gradient(circle at 12% 18%, rgba(182,155,91,.08), rgba(182,155,91,0) 360px); }
.login-body::before { display: none; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; line-height: 1.2; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.12; letter-spacing: .005em; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
p { text-wrap: pretty; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .nowrap { white-space: nowrap; } .num { text-align: right; font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.eyebrow { font-family: var(--label); text-transform: uppercase; letter-spacing: .13em; font-size: var(--fs-label); color: var(--gold-deep); }
.section-title { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.small-link { font-family: var(--sans); font-size: .82rem; font-weight: 400; }
.backlink { display: inline-block; font-size: .88rem; color: var(--muted); text-decoration: none; margin-bottom: 14px; }
.backlink:hover { color: var(--claret); }
.sep { color: var(--line); }
.mono-ish { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); }

/* top bar */
.topbar { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: var(--navy); color: #E9E4D6; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand-mark { width: 32px; height: 32px; }
.brand-firm { font-family: var(--serif); font-size: .95rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #F6F1E4; }
.brand-sep { width: 1px; height: 18px; background: var(--gold); opacity: .7; }
.brand-app { font-size: .82rem; color: #D8D2C2; }
.topbar-right { display: flex; align-items: center; gap: 18px; font-size: .84rem; color: #D8D2C2; }
.topbar-link { color: #D8D2C2; text-decoration: none; } .topbar-link:hover { color: #fff; }
.topbar-user.topbar-link { border-bottom: 1px dotted rgba(216,210,194,.6); }
.linkbtn { background: none; border: 1px solid var(--gold); color: #E9E4D6; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-family: var(--label); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.linkbtn:hover { background: rgba(255,255,255,.08); color: #fff; }

/* layout */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.page { padding: 28px 40px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }
.page.narrow { max-width: 900px; }
.flash { background: var(--tan); border-left: 4px solid var(--gold); padding: 10px 16px; margin: 16px 40px 0; }
.alert { background: var(--danger-bg); border-left: 4px solid var(--claret); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.alert.soft { background: var(--warn-bg); border-left-color: var(--gold); font-size: .9rem; }
.empty { color: var(--muted); font-style: italic; margin: 14px 0; }
.fineprint { font-size: .8rem; color: var(--muted); }
.lede { color: var(--ink-2); max-width: 64ch; margin-top: 10px; }
.tool-head { margin-bottom: 22px; }
.tool-head h1 { margin-top: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--label); font-size: .88rem; letter-spacing: .08em; text-transform: uppercase; padding: 0 20px; min-height: 42px; border-radius: 6px; border: 1.5px solid var(--navy); background: var(--panel); color: var(--navy); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 120ms ease, background-color 180ms ease, border-color 180ms ease; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--tan); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(5,7,58,.18); }
.btn-primary:hover { background: var(--navy-2); border-color: var(--gold); transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn-ghost { border-color: rgba(156,131,75,.45); color: var(--ink-2); }
.btn-big { min-height: 50px; padding: 0 26px; font-size: .95rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.linklike { background: none; border: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- home / hub ---------- */
.home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 40px 48px; max-width: 1240px; width: 100%; margin: 0 auto; }
.home-head { text-align: center; display: flex; flex-direction: column; gap: 12px; }
.home-title { font-size: var(--fs-display); }
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; width: 100%; }
.door { display: flex; flex-direction: column; gap: 16px; padding: 32px 30px; min-height: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform 160ms var(--ease), box-shadow 240ms var(--ease), border-color 160ms ease; }
.door::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--gold); transition: width 160ms ease; }
a.door:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(176,147,76,.58); }
a.door:hover::before { width: 3px; }
a.door:active { transform: translateY(-1px) scale(.995); }
.door.soon { opacity: .68; cursor: default; border-style: dashed; box-shadow: none; }
.door-ico { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--tan); color: var(--navy); }
.door-ico svg { width: 28px; height: 28px; }
.door-title { font-family: var(--serif); font-size: var(--fs-card-title); font-weight: 600; }
.door-desc { font-size: .95rem; line-height: 1.5; color: var(--ink-2); flex: 1; max-width: 62ch; }
.door-go { font-family: var(--label); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--claret); }
.door-go small { font-family: var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .78rem; }
.door-go::after { content: "\2192"; display: inline-block; margin-left: .35em; transition: transform 160ms ease; }
.door-go.soon { color: var(--gold-deep); } .door-go.soon::after { content: none; }
a.door:hover .door-go::after { transform: translateX(3px); }
.home-recent { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.home-recent a { color: var(--navy); }
.home-recent-label { font-family: var(--label); letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; color: var(--gold-deep); }
.home-foot { height: 44px; flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- transcriber: upload ---------- */
.upload { display: flex; flex-direction: column; gap: 18px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 260px; padding: 36px 24px; background: var(--panel); border: 2px dashed rgba(156,131,75,.55); border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; text-align: center; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease); }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--gold); background: #FFFDF7; }
.dropzone.over { border-color: var(--navy); border-style: solid; background: #FFFDF7; transform: scale(1.01); }
.dropzone.busy { pointer-events: none; opacity: .7; }
.dz-ico { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--tan); color: var(--navy); }
.dz-ico svg { width: 32px; height: 32px; }
.dz-text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dz-text strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.dz-text span { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-family: var(--label); }
.dz-hint { font-size: .82rem; color: var(--muted); }
.mode { border: 0; }
.mode legend { margin-bottom: 8px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; transition: border-color 160ms ease, box-shadow 160ms ease; height: 100%; }
.seg span b { font-family: var(--label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .86rem; color: var(--navy); }
.seg span small { font-size: .84rem; color: var(--ink-2); line-height: 1.45; }
.seg input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy), 0 6px 18px rgba(5,7,58,.08); background: #FFFDF7; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.upload-status { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; background: var(--tan); border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft); }
.bar.big { height: 12px; margin: 8px 0 4px; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--navy)); border-radius: 999px; transition: width 400ms var(--ease); }
.status-line { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.recent { margin-top: 36px; }

/* ---------- job page ---------- */
.outcome-card { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--gold-rule); border-radius: 14px; padding: 32px 36px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.outcome-card h1 { font-size: 26px; }
.ready { display: flex; align-items: center; gap: 8px; font-family: var(--label); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.ready svg { width: 20px; height: 20px; }
.ready svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 300ms ease-out 40ms forwards; }
.savename { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; font-size: .9rem; overflow-wrap: anywhere; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: .86rem; color: var(--muted); }
.download-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rule { border: 0; border-top: 1px solid var(--line); }
.summary h2 { margin-bottom: 10px; }
.summary p { margin: 0 0 10px; max-width: 70ch; }
.summary .from { color: var(--ink-2); }
.summary .legibility { font-style: italic; color: var(--ink-2); }
.tight { margin: 0 0 10px 22px; } .tight li { margin: 3px 0; max-width: 70ch; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; font-size: .92rem; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; background: transparent; transition: background-color 200ms ease, border-color 200ms ease; }
.steps li.done { color: var(--ink-2); } .steps li.done::before { background: var(--gold); border-color: var(--gold); }
.steps li.now { color: var(--navy); font-weight: 600; } .steps li.now::before { background: var(--navy); border-color: var(--navy); animation: pulse 1.2s ease-in-out infinite; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs:empty { display: none; }
.thumbs.done { margin: 22px 0 6px; }
.thumb { position: relative; width: 88px; aspect-ratio: 17 / 22; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(27,23,15,.08); animation: pop 220ms var(--ease) backwards; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb span { position: absolute; right: 4px; bottom: 4px; font-size: .68rem; background: rgba(6,8,57,.8); color: #fff; padding: 1px 6px; border-radius: 999px; }
a.thumb:hover { border-color: var(--gold); }
.know { margin-top: 14px; }
.know summary { cursor: pointer; font-weight: 600; font-size: .95rem; padding: 10px 0; }
.transcript { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.component { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.component h3 { margin-bottom: 8px; } .component h3 small { display: block; font-family: var(--sans); font-weight: 400; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.component h4 { font-family: var(--label); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; color: var(--gold-deep); margin: 14px 0 6px; }
.tx { white-space: pre-wrap; font-family: var(--sans); font-size: .95rem; line-height: 1.6; color: var(--ink); max-width: 72ch; }
.outcome-links { display: flex; justify-content: center; gap: 26px; font-size: .92rem; margin-top: 26px; }
.outcome-links a, .outcome-links .linklike { color: var(--navy); text-decoration: none; background-image: linear-gradient(var(--claret), var(--claret)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 200ms ease; padding-bottom: 1px; }
.outcome-links a:hover, .outcome-links .linklike:hover { background-size: 100% 1px; }
.errpage { max-width: 640px; padding-top: 60px; } .errpage h1 { margin-bottom: 10px; } .errpage p { margin-bottom: 18px; }

/* tables */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; border-radius: 10px; }
table.data { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.data th { background: var(--tan); text-align: left; padding: 8px 10px; font-family: var(--label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; color: var(--ink-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tbody tr:hover td { background: #FAF6ED; }
table.data.list { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
td.wrap { white-space: normal; max-width: 44ch; min-width: 18ch; }
.status-pill { display: inline-block; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; padding: 4px 10px; border-radius: 999px; background: var(--tan); color: var(--ink-2); white-space: nowrap; }
.status-pill.done { background: #E3EFE6; color: var(--ok); }
.status-pill.error { background: var(--danger-bg); color: var(--claret); }
.status-pill.running, .status-pill.queued { background: var(--warn-bg); color: var(--gold-deep); }

/* account */
.form-card .login-form { max-width: 460px; margin-top: 6px; }
.form-card .login-form .download-row { margin-top: 10px; }
.form-card .login-form .btn { justify-content: center; margin-top: 0; }
.login-form .hint { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, var(--panel) 0%, var(--ivory) 60%); }
.login-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--gold-rule); border-radius: 14px; padding: 34px 36px; box-shadow: var(--shadow); text-align: center; }
.login-logo { height: 84px; width: auto; margin: 0 auto 14px; display: block; }
.login-title { font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.login-sub { color: var(--muted); font-size: .82rem; margin: 8px 0 20px; }
.login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-form label { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.login-form input { font: inherit; font-family: var(--sans); font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ivory); color: var(--ink); }
.login-form input:focus { border-color: var(--gold); }
.login-form .btn { justify-content: center; margin-top: 6px; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.rise { animation: rise 320ms var(--ease) backwards; }
html.returning .rise { animation: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
@media (hover: none) { a.door:hover, .btn-primary:hover { transform: none; } }

@media (max-width: 900px) {
  .topbar { padding: 0 16px; } .brand-app, .brand-sep, .topbar-user { display: none; }
  .brand-firm { font-size: .78rem; white-space: nowrap; }
  .home { padding: 28px 16px; gap: 28px; } .home-title { font-size: 32px; }
  .doors { grid-template-columns: 1fr; gap: 14px; } .door { min-height: 0; padding: 24px 22px; }
  .home-recent { flex-direction: column; gap: 6px; } .home-recent .sep { display: none; }
  .home-foot { height: auto; padding: 10px 16px; flex-wrap: wrap; row-gap: 4px; text-align: center; }
  .page { padding: 20px 16px 40px; } .flash { margin: 12px 16px 0; }
  .segmented { grid-template-columns: 1fr; }
  .dropzone { min-height: 200px; padding: 26px 16px; }
  .outcome-card { padding: 22px 20px; } .outcome-card h1 { font-size: 22px; }
  .download-row { flex-direction: column; align-items: stretch; } .download-row .btn { justify-content: center; }
  .download-row form { display: contents; }
  .thumb { width: 64px; }
}

/* ---------- manager ---------- */
.mgr-section { margin-top: 30px; }
.mgr-section h2 { margin-bottom: 4px; }
.mgr-section .sub { color: var(--muted); font-size: .88rem; margin-bottom: 12px; max-width: 70ch; }
table.data td.who { white-space: normal; min-width: 16ch; } table.data td.who .small { display: block; }
table.data th.c, table.data td.c { text-align: center; }
.grant { display: inline-flex; align-items: center; gap: 6px; }
.grant form { display: inline; }
.pill-on, .pill-off, .pill-admin { display: inline-block; font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; padding: 3px 9px; border-radius: 999px; }
.pill-on { background: #E3EFE6; color: var(--ok); } .pill-off { background: var(--tan); color: var(--muted); } .pill-admin { background: var(--navy); color: #fff; }
.pill-lock { color: var(--muted); font-size: .72rem; }
.tinybtn { background: none; border: 1px solid var(--line); color: var(--ink-2); font-family: var(--label); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; cursor: pointer; }
.tinybtn:hover { border-color: var(--gold); background: var(--tan); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0 14px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; color: var(--ink-2); }
.filters select, .filters input { font: inherit; font-family: var(--sans); font-size: .92rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); min-width: 160px; }
.filters .btn { min-height: 36px; }
td.detail { white-space: normal; max-width: 52ch; color: var(--ink-2); font-size: .85rem; }
tr.bad td { background: var(--danger-bg); }
@media (max-width: 900px) { .filters label { flex: 1 1 100%; } .filters select, .filters input { width: 100%; } }

/* account page */
.tool-head .sub { color: var(--muted); font-size: .9rem; margin-top: 8px; max-width: 70ch; }
.tool-head .sub a { color: var(--claret); }
#password .outcome-card { gap: 10px; }
#password .outcome-card h2 { margin: 0; }
table.data td.detail { max-width: 52ch; overflow-wrap: anywhere; }
