/* Freeman Law client portal. Quiet, legible, unhurried: a law office, not an app store.
   Colours come from /portal/brand.css (the firm's settings); these are the fallbacks. No inline styles anywhere:
   the Content-Security-Policy forbids them. */

@font-face { font-family: "EB Garamond"; src: url("/portal/garamond.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/portal/garamond-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --brand: #0c3c3d; --accent: #0c6c68;
  --paper: #f6f5f1; --card: #ffffff; --ink: #1d2626; --muted: #5d6b6b; --faint: #8a9696;
  --line: #e3e1da; --line-strong: #cfccc3; --wash: #eef4f3;
  --good: #1f7a4d; --warn: #9a6500; --bad: #a3322a;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(17, 38, 38, .05), 0 4px 16px rgba(17, 38, 38, .06);
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--brand); margin: 0 0 .4em; letter-spacing: .005em; }
h1 { font-size: 2.1rem; line-height: 1.15; }
h2 { font-size: 1.55rem; line-height: 1.2; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; }
.hidden { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.serif { font-family: var(--serif); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.noscript { padding: 2rem; text-align: center; }

/* --- boot and the sign-in pages --- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { width: 220px; opacity: .85; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.gate-side { background: var(--brand); color: #eaf2f1; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.gate-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.02); }
.gate-side h1 { color: #fff; font-size: 2.6rem; max-width: 12em; }
.gate-side p { color: #c7dbd9; max-width: 30em; }
.gate-logo { width: 200px; filter: brightness(0) invert(1); opacity: .95; }
.gate-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; color: #d8e7e5; }
.gate-points li { display: flex; gap: 10px; align-items: flex-start; }
.gate-points .ico { width: 18px; height: 18px; margin-top: 3px; color: #8fd0c8; }
.gate-main { display: grid; place-items: center; padding: 40px 24px; }
.gate-card { width: 100%; max-width: 420px; }
.gate-card .mobile-logo { display: none; width: 180px; margin-bottom: 28px; }
.gate-foot { margin-top: 28px; font-size: .85rem; color: var(--muted); }

/* --- form controls --- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field .help { font-size: .8rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); outline: none; }
textarea.input { min-height: 110px; resize: vertical; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.radio-row { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--wash); }
.choice input { accent-color: var(--accent); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; min-height: 44px; }
.btn:hover { background: color-mix(in srgb, var(--brand) 86%, black); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--wash); }
.btn.quiet { background: transparent; color: var(--accent); padding: 8px 10px; min-height: 0; }
.btn.quiet:hover { background: var(--wash); }
.btn.small { padding: 7px 14px; min-height: 36px; font-size: .9rem; }
.btn.danger { background: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem; border: 1px solid; }
.alert.error { background: #fbefed; border-color: #efc9c4; color: var(--bad); }
.alert.ok { background: #ecf6f0; border-color: #c3e2d0; color: var(--good); }
.alert.info { background: var(--wash); border-color: #cfe1de; color: var(--brand); }

/* --- the signed-in shell --- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.nav { background: var(--card); border-right: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.nav-logo { width: 168px; margin: 4px 10px 24px; }
.matter-pick { margin: 0 4px 20px; }
.matter-pick select { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--paper); font-weight: 600; }
.matter-pick .number { font-size: .8rem; color: var(--muted); margin: 6px 4px 0; }
.nav a.item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a.item:hover { background: var(--paper); }
.nav a.item.on { background: var(--wash); color: var(--brand); font-weight: 650; }
.nav a.item svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.nav .badge { margin-left: auto; }
.nav-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.nav-foot .who { font-size: .9rem; padding: 0 12px 8px; }
.nav-foot .who strong { display: block; }

.main { padding: 36px clamp(20px, 4vw, 56px) 80px; max-width: 1120px; width: 100%; }
.page-head { margin-bottom: 26px; }
.page-head .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 46em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.main > * + * { margin-top: 16px; }
.main > .page-head + * { margin-top: 0; }
.card h3 { margin-bottom: .3em; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(17,38,38,.10); }
.tile .k { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; }
.tile .v { font-family: var(--serif); font-size: 1.6rem; color: var(--brand); line-height: 1.2; }
.tile .s { font-size: .9rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.pill.good { background: #ecf6f0; color: var(--good); border-color: #c3e2d0; }
.pill.warn { background: #fdf4e3; color: var(--warn); border-color: #f0dcb0; }
.pill.info { background: var(--wash); color: var(--accent); border-color: #cfe1de; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; overflow-wrap: anywhere; }
.list .meta { font-size: .85rem; color: var(--muted); }
.file-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--wash); color: var(--accent); display: grid; place-items: center; flex: none; }
.file-ico svg { width: 20px; height: 20px; }

/* progress tracker */
.track { list-style: none; margin: 0; padding: 0; position: relative; }
.track li { position: relative; padding: 0 0 26px 44px; }
.track li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child::before { display: none; }
.track .dot { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; display: grid; place-items: center; }
.track li.done .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.track li.done::before { background: var(--accent); }
.track li.current .dot { border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); }
.track li.current .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.track .t { font-weight: 650; }
.track li.upcoming .t { color: var(--muted); font-weight: 500; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); border-radius: 999px; }
.w0{width:0}.w10{width:10%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w40{width:40%}.w50{width:50%}.w60{width:60%}.w70{width:70%}.w75{width:75%}.w80{width:80%}.w90{width:90%}.w100{width:100%}

/* messages */
.thread { display: flex; flex-direction: column; gap: 14px; padding: 6px 2px 18px; max-height: 58vh; overflow-y: auto; }
.bubble { max-width: min(560px, 85%); padding: 12px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--brand); color: #f1f7f6; border-color: var(--brand); border-bottom-right-radius: 6px; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble .who { font-size: .78rem; opacity: .75; margin-bottom: 4px; font-weight: 650; }
.bubble.mine a { color: #fff; }
.bubble audio, .bubble video { display: block; margin-top: 8px; max-width: 100%; border-radius: 10px; }
.composer { border-top: 1px solid var(--line); padding-top: 14px; }
.composer textarea { min-height: 80px; }
.rec { display: flex; align-items: center; gap: 10px; color: var(--bad); font-weight: 650; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: breathe 1s infinite; }
.rec video { width: 180px; border-radius: 10px; }

/* uploads */
.drop { margin-bottom: 12px; border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 34px 20px; text-align: center; background: #fff; transition: border-color .15s, background .15s; cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--wash); }
.drop svg { width: 44px; height: 44px; color: var(--accent); }
.drop strong { display: block; font-size: 1.1rem; margin: 6px 0 2px; color: var(--brand); }
.progress-row { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.progress-row .bar { flex: 1; }

/* calendar */
.date-chip { width: 58px; flex: none; text-align: center; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #fff; }
.date-chip .m { background: var(--brand); color: #fff; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; padding: 2px 0; font-weight: 700; }
.date-chip .d { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; color: var(--brand); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot { padding: 10px 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; text-align: center; }
.slot:hover, .slot.on { border-color: var(--accent); background: var(--wash); color: var(--brand); }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.day { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; scroll-snap-align: start; }
.day .dw, .day .dm { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.day .dn { font-family: var(--serif); font-size: 1.5rem; color: var(--brand); line-height: 1.2; }
.day.on { border-color: var(--brand); background: var(--brand); }
.day.on .dw, .day.on .dm, .day.on .dn { color: #fff; }
.day-head { font-weight: 650; margin: 18px 0 8px; color: var(--brand); }

/* money */
.money { font-variant-numeric: tabular-nums; font-weight: 650; }
table.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table .num { text-align: right; }

/* questionnaire */
.q-section { margin-bottom: 26px; }
.q-section h3 { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; }
.yesno { display: flex; gap: 10px; }
.yesno label { flex: 1; text-align: center; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; background: #fff; }
.yesno label:has(input:checked) { border-color: var(--accent); background: var(--wash); color: var(--brand); font-weight: 650; }
.yesno input { position: absolute; opacity: 0; pointer-events: none; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 22px 0 6px; }

/* library */
.article { max-width: 44em; }
.article p { font-size: 1.05rem; }
.kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }

/* signing */
.doc-frame { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.sig-name { font-family: var(--serif); font-size: 1.6rem; }
.consent { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: .92rem; }

/* recovery codes, QR */
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.qr { display: block; width: 200px; height: 200px; margin: 6px auto 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; word-break: break-all; background: var(--paper); padding: 8px 10px; border-radius: 8px; font-size: .9rem; }

/* toast and modal */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; animation: rise .2s ease-out; max-width: calc(100% - 32px); }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(12, 30, 30, .45); display: grid; place-items: center; padding: 16px; z-index: 40; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 18px; padding: 26px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 900px; }

/* mobile */
.topbar { display: none; }
.tabbar { display: none; }
@media (max-width: 900px) {
  .gate { grid-template-columns: 1fr; }
  .gate-side { display: none; }
  .gate-card .mobile-logo { display: block; }
  .shell { grid-template-columns: 1fr; }
  .nav { display: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .topbar img { height: 26px; }
  .topbar select { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--paper); font-weight: 600; }
  .main { padding: 22px 16px 110px; }
  h1 { font-size: 1.7rem; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; font-size: .68rem; color: var(--muted); text-decoration: none; position: relative; }
  .tabbar a.on { color: var(--brand); font-weight: 700; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; font-size: .65rem; }
  .thread { max-height: none; }
  .bubble { max-width: 92%; }
  .doc-frame { height: 55vh; }
}
/* Documents: a folder tree beside the files, like a computer's file browser (Jason, 2026-11-06: "nested folders rather
   than just having ovals up top", "very user friendly, aesthetic"). On a phone the tree folds into a "Folders" panel. */
.docs { display: grid; grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-side { position: sticky; top: 16px; padding: 14px 10px; max-height: calc(100vh - 32px); overflow-y: auto; }
.docs-main { min-width: 0; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree-head { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 14px 10px 6px; }
.tree-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
/* Indent by depth (classes, not an inline style: the page's Content-Security-Policy allows no inline styles). The portal
   nests folders four levels below the top, so six is room to spare. */
.tree-row.d1 { padding-left: 18px; } .tree-row.d2 { padding-left: 36px; } .tree-row.d3 { padding-left: 54px; }
.tree-row.d4 { padding-left: 72px; } .tree-row.d5 { padding-left: 90px; } .tree-row.d6 { padding-left: 108px; }
.tree-row:hover { background: var(--paper); }
.tree-row.on { background: var(--wash); }
.tree-row.on .tree-name { color: var(--brand); font-weight: 600; }
.tree-twist { width: 24px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
  color: var(--faint); cursor: pointer; padding: 0; flex: none; border-radius: 6px; }
.tree-twist .ico { width: 14px; height: 14px; transition: transform .15s ease; }
.tree-twist.open .ico { transform: rotate(90deg); }
.tree-twist:hover { color: var(--accent); }
.tree-twist.none { cursor: default; }
.tree-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer;
  padding: 7px 8px 7px 2px; font: inherit; font-size: .95rem; color: var(--ink); text-align: left; border-radius: 8px; }
.tree-name .ico { width: 18px; height: 18px; color: var(--accent); }
.tree-name .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-name .n { font-size: .75rem; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 1px 8px; flex: none; }
.tree-row.on .tree-name .n { background: var(--card); }
.tree-twist:focus-visible, .tree-name:focus-visible, .tree-add:focus-visible, .folder-open:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; }
.tree-add { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line-strong);
  border-radius: 8px; background: none; color: var(--accent); font: inherit; font-size: .92rem; cursor: pointer; }
.tree-add:hover { background: var(--wash); border-color: var(--accent); }
.tree-add .ico { width: 16px; height: 16px; }
.here { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.here-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 1.05rem; min-width: 0; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs strong { font-family: var(--serif, inherit); font-size: 1.25rem; color: var(--brand); }
.crumbs .sep .ico { width: 14px; height: 14px; color: var(--faint); }
.here-actions { gap: 8px; flex-wrap: wrap; }
.tree-toggle { display: none; }
.docs-side-phone { display: none; }
.folder-row { padding: 0 !important; }
.folder-open { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 6px; border: 0; background: none; font: inherit;
  color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.folder-open:hover { background: var(--paper); }
.file-ico.folder { color: var(--accent); background: var(--wash); }
.folder-open .go .ico { width: 16px; height: 16px; color: var(--faint); }
.drop-card { transition: border-color .15s, background .15s; border: 2px solid transparent; }
.drop-card.over { border-color: var(--accent); background: var(--wash); border-style: dashed; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.doc-tools { display: grid; grid-template-columns: 1fr 200px; gap: 10px; margin-bottom: 8px; }
select.input.move { width: auto; max-width: 220px; padding: 6px 10px; font-size: .88rem; }
.encrypted-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.encrypted-note .ico { width: 16px; height: 16px; }
.list li.doc-row { flex-wrap: wrap; }
.shell > div, .main { min-width: 0; }            /* lets a long path wrap instead of widening the page */
.doc-row .grow { flex: 1 1 220px; min-width: 0; }
.doc-row .title { overflow-wrap: anywhere; }
.doc-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) {
  .doc-tools { grid-template-columns: 1fr; }
  .suggest { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .suggest .btn, .suggest span { flex: none; }
  .docs { grid-template-columns: 1fr; gap: 12px; }
  .docs-side { display: none; }
  .docs-side-phone { display: block; padding: 10px 6px; margin-bottom: 12px; }
  .tree-toggle { display: inline-flex; }
  .tree-name { padding-top: 10px; padding-bottom: 10px; }            /* a finger-sized row */
  .doc-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
  select.input.move { max-width: 100%; flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .nav, .tabbar, .topbar, .composer, .btn { display: none !important; } .shell { display: block; } }

/* A requested document in a questionnaire (a tax organizer): its state, the upload button, "I don't have this". */
.doc-request { display: grid; gap: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
