/* Brand: Trusted Transformation Solutions (black + pelican orange).
   --accent is a deeper orange so text and white-on-orange buttons stay readable;
   --brand is the bright logo orange, used only for decoration. */
:root {
  --paper: #f7f6f3;
  --card: #ffffff;
  --ink: #141414;
  --ink-soft: #5b5b5b;
  --rule: #e4e1dc;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-wash: #fdeee5;
  --brand: #f05a1a;
  --brass: #c2410c;
  --error: #b42318;
  --shadow: 0 1px 2px rgba(20, 20, 20, .06), 0 6px 18px rgba(20, 20, 20, .06);
  --shadow-lift: 0 2px 4px rgba(20, 20, 20, .08), 0 14px 30px rgba(20, 20, 20, .12);
  --serif: "Oswald", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121212;
    --card: #1c1c1c;
    --ink: #f2f2f2;
    --ink-soft: #a9a9a9;
    --rule: #2f2f2f;
    --accent: #ff7a3d;
    --accent-ink: #141414;
    --accent-wash: #3a2214;
    --brand: #ff7a3d;
    --brass: #ff7a3d;
    --error: #ff8f8f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lift: 0 10px 26px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
button, input { font: inherit; color: inherit; }
main { max-width: 640px; margin: 0 auto; padding: 40px 16px 56px; }

/* masthead */
.firm { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 7vw, 46px); line-height: 1.08; margin: 8px 0 10px; letter-spacing: -.01em; }
.lede { margin: 0; color: var(--ink-soft); max-width: 34em; }
.mock { display: inline-block; margin: 14px 0 0; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent); }
.mock[hidden], .flash[hidden] { display: none; }
.masthead { margin-bottom: 28px; }

/* attorney chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px 18px; scrollbar-width: thin; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--card); cursor: pointer; font-size: 14px; white-space: nowrap;
}
.chip:hover { border-color: var(--ink-soft); }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.flash { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #fdf0e1; color: #7a4a12; font-size: 14px; }
@media (prefers-color-scheme: dark) { .flash { background: #3a2c1a; color: #f3cf9c; } }

.section-title { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0 0 12px; }

/* soonest cards */
.soonest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .soonest { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slot-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 16px 16px 14px; border-radius: 12px; border: 1px solid var(--rule);
  background: var(--card); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.slot-card:hover, .slot-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--accent); outline: none; }
.slot-card .day { font-size: 14px; color: var(--ink-soft); }
.slot-card .time { font-family: var(--serif); font-size: 28px; line-height: 1.15; margin-top: 2px; font-variant-numeric: lining-nums; }
.slot-card .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.slot-card .badge {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-wash); padding: 2px 8px; border-radius: 999px;
}
.slot-card.first { border-color: var(--accent); }
.skeleton { height: 104px; border-radius: 12px; background: linear-gradient(90deg, var(--rule) 0%, var(--card) 50%, var(--rule) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; opacity: .7; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .slot-card { transition: none; } }
.empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed var(--rule); border-radius: 12px; color: var(--ink-soft); text-align: center; }

/* more times */
.more-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin: 20px 0 0; padding: 8px 2px;
  border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--accent);
}
.more-toggle svg { transition: transform .2s ease; }
.more-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.more { margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.days-strip { overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: thin; }
.days { display: flex; gap: 8px; }
.day-btn {
  flex: none; width: 74px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--card); cursor: pointer; text-align: center;
}
.day-btn .dow { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.day-btn .num { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.day-btn .cnt { font-size: 11.5px; color: var(--ink-soft); }
.day-btn:hover { border-color: var(--ink-soft); }
.day-btn[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day-btn[aria-selected="true"] .dow, .day-btn[aria-selected="true"] .cnt { color: inherit; opacity: .8; }
.times { margin-top: 16px; }
.period { margin-bottom: 14px; }
.period h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--card);
  cursor: pointer; font-variant-numeric: tabular-nums;
}
.pill:hover, .pill:focus-visible { border-color: var(--accent); background: var(--accent-wash); outline: none; }
.later { display: flex; justify-content: space-between; margin-top: 6px; }
.link { border: 0; background: none; padding: 4px 0; cursor: pointer; color: var(--accent); font-weight: 600; }
.link[hidden] { display: none; }

/* details */
.picked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 12px; background: var(--accent-wash); margin-bottom: 22px;
}
.picked p { margin: 0; }
.picked-when { font-family: var(--serif); font-size: 21px; }
.picked-who { color: var(--ink-soft); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 14px; font-weight: 600; }
.field input {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.fine { font-size: 13px; color: var(--ink-soft); }
.error { color: var(--error); min-height: 1.4em; margin: 0 0 10px; }
.cta {
  width: 100%; padding: 14px 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px;
}
.cta:disabled { opacity: .6; cursor: default; }

/* done */
.done { text-align: center; padding: 28px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow); }
.seal { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.done h2 { font-family: var(--serif); font-weight: 500; font-size: 28px; margin: 12px 0 6px; }
.done-when { font-size: 18px; margin: 0; }
.done-who { color: var(--ink-soft); margin: 2px 0 8px; }

.foot { margin-top: 40px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.foot a { color: inherit; }

/* court paperwork */
.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; }
.panel { padding: 22px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.panel .section-title { margin-bottom: 6px; }
.panel-lede { margin: 0 0 18px; color: var(--ink-soft); }
.upload-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 14px 8px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer; font-weight: 600; font-size: 15px; white-space: nowrap;
}
.upload-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.upload-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pages { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.pages:empty { display: none; }
.page { position: relative; width: 76px; }
.page img, .page .pdf { width: 76px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); display: grid; place-items: center; background: var(--paper); }
.page .pdf { font-size: 12px; font-weight: 700; color: var(--brass); }
.page .cap { font-size: 11.5px; color: var(--ink-soft); text-align: center; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page .remove {
  position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); cursor: pointer;
  background: var(--ink); color: var(--paper); font-size: 15px; line-height: 20px; padding: 0;
}
#analyze { margin-top: 16px; }
#analyze[hidden] { display: none; }
.panel .fine { margin: 14px 0 0; }
.skip { display: block; margin: 18px auto 0; }
.center { text-align: center; margin: 12px 0 0; }
.reading { text-align: center; padding: 40px 20px; }
.reading[hidden] { display: none; }
.reading-title { font-family: var(--serif); font-size: 22px; margin: 14px 0 4px; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--accent-wash); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.eyebrow { margin: 0; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.doc-type { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; margin: 4px 0 14px; }
.plain p { margin: 0 0 12px; font-size: 17px; line-height: 1.6; }
.facts { margin: 18px 0; padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--rule); display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; }
.facts:empty { display: none; }
.facts dt { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding-top: 2px; }
.facts dd { margin: 0; }
.facts dd ul { margin: 0; padding-left: 18px; }
.facts .date-hi { background: var(--accent-wash); color: var(--accent); border-radius: 6px; padding: 1px 6px; font-weight: 600; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.disclaimer { font-size: 13.5px; color: var(--ink-soft); border-left: 3px solid var(--brass); padding: 2px 0 2px 12px; margin: 0 0 20px; }
.doc-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: var(--accent-wash); color: var(--accent); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.doc-note[hidden], .picked-doc[hidden] { display: none; }
.picked-doc { color: var(--accent); font-size: 13.5px; font-weight: 600; margin-top: 2px !important; }

/* stepper */
.stepper { margin: 0 0 18px; }
.stepper[hidden] { display: none; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; }
.step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
/* connector line from this step's dot to the next one */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px);
  height: 2px; border-radius: 2px; background: var(--rule);
}
.step.is-done:not(:last-child)::after { background: var(--accent); }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; border: 2px solid var(--rule); background: var(--card); color: var(--ink-soft);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.step-label { font-size: 12.5px; color: var(--ink-soft); line-height: 1.25; }
.step-label small { display: block; font-size: 11px; opacity: .8; }
.step.is-current .step-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.step.is-current .step-label { color: var(--ink); font-weight: 600; }
.step.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step button { all: unset; display: contents; cursor: pointer; }
.step button:hover .step-label { color: var(--accent); text-decoration: underline; }
.step button:focus-visible .step-dot { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .step-dot { transition: none; } }

.back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -4px; padding: 6px 8px 6px 4px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: 14px;
}
.back:hover { color: var(--accent); background: var(--accent-wash); }
.back[hidden] { display: none; }

.field-hint { font-size: 13px; color: var(--accent); }
.field-hint[hidden] { display: none; }

/* ---- reading progress ---- */
.reader { text-align: center; padding: 28px 20px 24px; }
.scan { position: relative; width: 132px; height: 168px; margin: 0 auto 18px; border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-lift); background: var(--paper); }
.scan-page { position: absolute; inset: 0; padding: 18px 14px; display: flex; flex-direction: column; gap: 9px; }
.scan-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-line { display: block; height: 6px; border-radius: 3px; background: var(--rule); }
.scan-line.w90 { width: 90%; } .scan-line.w85 { width: 85%; } .scan-line.w80 { width: 80%; } .scan-line.w75 { width: 75%; }
.scan-line.w70 { width: 70%; } .scan-line.w60 { width: 60%; } .scan-line.w50 { width: 50%; } .scan-line.w40 { width: 40%; }
.scan-beam {
  position: absolute; left: -10%; right: -10%; height: 46px; top: -46px;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent) 70%, var(--accent) 96%, transparent);
  animation: beam 1.8s cubic-bezier(.45, 0, .55, 1) infinite;
}
.scan-beam::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent); }
@keyframes beam { 0% { top: -46px; } 100% { top: 100%; } }
.reading-title { font-family: var(--serif); font-size: 22px; margin: 0 0 14px; }
.progress { position: relative; height: 12px; border-radius: 999px; background: var(--accent-wash); overflow: hidden; }
.progress-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--brass)) 70%, var(--brass));
  transition: width .25s linear;
}
.progress-fill::after { /* moving sheen */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.0) 0 12px, rgba(255,255,255,.16) 12px 24px);
  background-size: 200% 100%; animation: sheen 1.1s linear infinite;
}
.progress.complete .progress-fill { transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress.complete .progress-fill::after { animation: none; opacity: 0; }
@keyframes sheen { to { background-position: -68px 0; } }
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums; }
#progress-pct { font-weight: 700; color: var(--accent); }
.stages { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; display: grid; gap: 10px; }
.stages li { position: relative; padding-left: 30px; color: var(--ink-soft); opacity: .55; transition: opacity .3s ease, color .3s ease; }
.stages li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--rule); box-sizing: border-box; }
.stages li.is-active { opacity: 1; color: var(--ink); font-weight: 600; }
.stages li.is-active::before { border-color: var(--accent-wash); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.stages li.is-done { opacity: 1; color: var(--ink); }
.stages li.is-done::before { background: var(--accent) center / 12px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .scan-beam { animation-duration: 4s; } .progress-fill::after { animation: none; } .stages li.is-active::before { animation-duration: 3s; }
}

/* ---- summary ---- */
.doc-summary { font-size: 17px; line-height: 1.5; margin: 0 0 18px; }
.read-note { margin: -6px 0 16px; font-size: 14px; color: #7a4a12; background: #fdf0e1; padding: 8px 12px; border-radius: 8px; }
.read-note[hidden] { display: none; }
@media (prefers-color-scheme: dark) { .read-note { background: #3a2c1a; color: #f3cf9c; } }
.asks-card { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); margin-bottom: 16px; }
.asks-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.asks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ask { display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: start; }
.ask-date { border-radius: 10px; overflow: hidden; text-align: center; border: 1px solid var(--accent); background: var(--card); }
.ask-date .m { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 0; }
.ask-date .d { font-family: var(--serif); font-size: 26px; line-height: 1.1; padding-top: 2px; }
.ask-date .w { font-size: 11px; color: var(--ink-soft); padding-bottom: 4px; }
.ask-date.none { border-style: dashed; border-color: var(--rule); display: grid; place-items: center; height: 62px; color: var(--ink-soft); font-size: 11px; }
.ask-what { font-weight: 600; font-size: 16.5px; line-height: 1.35; margin: 2px 0 4px; }
.ask-meta { font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
.chip { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent); }
.chip.soon { background: #fdf0e1; color: #9a5a0f; }
.chip.past { background: #fbe7e8; color: var(--error); }
@media (prefers-color-scheme: dark) { .chip.soon { background: #3a2c1a; color: #f3cf9c; } .chip.past { background: #3a1d1f; } }
.asks-none { margin: 0; color: var(--ink-soft); }
.asks-none[hidden], .doc-warning[hidden] { display: none; }
.doc-warning { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: var(--paper); border-left: 3px solid var(--error); }
.doc-warning b { color: var(--error); }
.doc-details { margin: 0 0 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.doc-details summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14.5px; color: var(--accent); }
.doc-details .facts { margin: 0; border: 0; border-top: 1px solid var(--rule); border-radius: 0 0 12px 12px; background: none; }
#view-explain .doc-type { margin-bottom: 6px; }

/* ---- attorney step ---- */
.section-lede { margin: -6px 0 16px; color: var(--ink-soft); font-size: 14.5px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.person {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left;
  padding: 16px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.person:hover, .person:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--accent); outline: none; }
.person[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.person .avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--serif); font-size: 19px; color: var(--accent); background: var(--accent-wash); letter-spacing: .02em;
}
.person .who { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.person .role { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.person .next { font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.person .next b { display: block; color: var(--accent); font-weight: 700; font-size: 14px; }
.person .next.none b { color: var(--ink-soft); }
.person.featured { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; padding: 18px; border-color: var(--accent);
  background: linear-gradient(135deg, var(--card), var(--accent-wash)); }
.person.featured .avatar { background: var(--accent); color: var(--accent-ink); }
.person.featured .text { flex: 1; min-width: 0; }
.person .tag { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); background: var(--card); border: 1px solid var(--accent); padding: 2px 8px; border-radius: 999px; }
.person .loading { display: inline-block; width: 90px; height: 10px; border-radius: 5px; background: var(--rule); vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .person { transition: none; } }
/* six steps need a little less room per step on a phone */
@media (max-width: 420px) {
  .step-dot { width: 28px; height: 28px; font-size: 13px; }
  .step:not(:last-child)::after { top: 13px; left: calc(50% + 17px); right: calc(-50% + 17px); }
  .step-label { font-size: 11.5px; }
}
.person .who, .person .role, .person .next { display: block; }
.person.featured .next { margin-top: 6px; }
.person.featured .who { padding-right: 70px; }

.person .next .with { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.pill small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 500; margin-top: 1px; }
.pill:hover small { color: var(--accent); }
.picked-auto { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px !important; }
.picked-auto[hidden] { display: none; }

.picked .link { white-space: nowrap; }

/* form validation */
.field input::placeholder { color: var(--ink-soft); opacity: .55; }
.field-err { font-size: 13px; color: var(--error); }
.field-err[hidden] { display: none; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field input[aria-invalid="true"]:focus { outline-color: var(--error); }
.cta:disabled { opacity: .45; cursor: not-allowed; }
.center-text { text-align: center; margin-top: 10px; }
.center-text[hidden] { display: none; }

/* attorney switcher on the Other times screen */
.who-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px;
  padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.who-label { font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.who-control { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.who-control select {
  appearance: none; -webkit-appearance: none; border: 0; background: var(--accent-wash); color: var(--accent);
  font: inherit; font-weight: 700; font-size: 15px; padding: 8px 34px 8px 12px; border-radius: 999px; cursor: pointer;
  max-width: 100%; text-overflow: ellipsis;
}
.who-control select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.who-control svg { position: absolute; right: 11px; pointer-events: none; color: var(--accent); }
/* the "Soonest" badge sits on the card's top edge so it never covers the date */
.slot-card .badge { top: -9px; right: 12px; background: var(--accent); color: var(--accent-ink); }
.soonest { padding-top: 6px; }
.person:not(.featured) .next b { white-space: pre-line; }

/* two-week day picker */
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.cal-range { font-family: var(--serif); font-size: 18px; }
.cal-legend { font-size: 12.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.mini-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mini-cal .dow { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 2px; }
.mini-cal .day {
  position: relative; aspect-ratio: 1 / 1; min-height: 40px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card);
  display: grid; place-items: center; font-family: var(--serif); font-size: 18px; cursor: pointer; padding: 0;
}
.mini-cal .day::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.mini-cal .day:hover { border-color: var(--accent); }
.mini-cal .day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-cal .day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mini-cal .day[aria-pressed="true"]::after { background: var(--accent-ink); }
.mini-cal .day:disabled { cursor: default; background: transparent; border-color: transparent; color: var(--ink-soft); opacity: .45; }
.mini-cal .day:disabled::after { display: none; }
.mini-cal .day.today:not([aria-pressed="true"]) { border-color: var(--ink-soft); }
.mini-cal .blank { aspect-ratio: 1 / 1; }
.times-day { margin: 18px 0 10px; font-size: 15px; font-weight: 700; }

/* month calendar on the time screen */
.month-cal { padding: 14px 14px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month { font-family: var(--serif); font-size: 20px; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.cal-nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.month-cal .mini-cal { gap: 4px; }
.month-cal .mini-cal .day { border-color: transparent; background: var(--accent-wash); font-size: 17px; min-height: 38px; }
.month-cal .mini-cal .day:disabled { background: transparent; }
.month-cal .mini-cal .day.today { border-color: var(--ink-soft); }
.cal-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.cal-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.times-day { margin: 20px 0 10px; font-family: var(--serif); font-weight: 500; font-size: 20px; }
.times .skeleton { height: 44px; margin-bottom: 8px; }

.month-cal .mini-cal .day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.month-cal .mini-cal { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.month-cal .mini-cal .day, .month-cal .mini-cal .blank { aspect-ratio: auto; height: 46px; }

/* ---- week strip + time list ---- */
.week { padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.week-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.week-range { font-family: var(--serif); font-size: 19px; text-align: center; }
.week-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.wday {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 2px 8px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer; color: var(--ink);
}
.wday .dw { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.wday .dn { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.wday .dc { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.wday:hover:not(:disabled) { border-color: var(--accent); }
.wday:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wday[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wday[aria-pressed="true"] .dw, .wday[aria-pressed="true"] .dc { color: inherit; opacity: .9; }
.wday:disabled { cursor: default; background: transparent; border-style: dashed; opacity: .55; }
.wday:disabled .dc { color: var(--ink-soft); font-weight: 500; }
.week-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

.day-times .times-day { margin: 22px 0 8px; font-family: var(--serif); font-weight: 500; font-size: 21px; }
.slot-list { display: flex; flex-direction: column; }
.slot-group { margin: 14px 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.slot-group:first-child { margin-top: 0; }
.slot-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 14px 14px 16px; margin-bottom: 8px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--card); cursor: pointer; color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.slot-row .t { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 122px; white-space: nowrap; }
.slot-row .w { flex: 1; min-width: 0; color: var(--ink-soft); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-row svg { flex: none; color: var(--ink-soft); }
.slot-row:hover, .slot-row:focus-visible { border-color: var(--accent); background: var(--accent-wash); outline: none; }
.slot-row:hover svg, .slot-row:focus-visible svg { color: var(--accent); }
.slot-list .skeleton { height: 50px; margin-bottom: 8px; border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .slot-row { transition: none; } }

/* computer screens: week on the left, that day's times on the right */
main.wide { max-width: 940px; }
@media (min-width: 760px) {
  .picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .day-times .times-day { margin-top: 0; }
  .slot-list { max-height: 520px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
  .week { position: sticky; top: 16px; }
}

/* secondary call-to-action buttons */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font-weight: 700; font-size: 14.5px;
  cursor: pointer; white-space: nowrap;
}
.btn-secondary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.picked { flex-wrap: wrap; }
.picked > div:first-child { flex: 1 1 100%; }
.picked-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 6px; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text strong { font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Cloudflare security check: takes no space unless Cloudflare needs the visitor to click */
.ts-box { display: flex; justify-content: center; }
.ts-box:not(:empty) { margin: 12px 0 4px; }

/* step names: one word per line, centered under the number */
.step-label { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; }
.step-word { display: block; white-space: nowrap; }
.step-label small { margin-top: 2px; }
@media (max-width: 420px) { .step-label { font-size: 11px; } .step-label small { font-size: 10px; } }

/* ---- brand bar ---- */
.brandbar { background: var(--card); border-bottom: 3px solid var(--brand); }
.brandbar-inner { max-width: 640px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
main.wide ~ .brandbar .brandbar-inner, body:has(main.wide) .brandbar-inner { max-width: 940px; }
/* The logo's pelican mark, cut from the full logo image (logo text is shown as real text beside it). */
.brand-mark {
  flex: none; width: 60px; height: 45px; border-radius: 8px; background-color: #fff;
  background-image: url("logo.webp"); background-repeat: no-repeat;
  background-size: 75px 75px; background-position: -7px -5px;
}
.brand-name { margin: 0; display: flex; flex-direction: column; font-family: var(--serif); text-transform: uppercase; line-height: 1; }
.brand-name .b1 { font-weight: 700; font-size: 24px; letter-spacing: .02em; color: var(--ink); }
.brand-name .b2 { font-weight: 600; font-size: 13.5px; letter-spacing: .08em; color: var(--brand); margin-top: 3px; }
main { padding-top: 26px; }
h1 { font-weight: 600; letter-spacing: 0; }
.section-title, .doc-type, .reading-title, .times-day, .week-range, .picked-when, .done h2 { font-weight: 500; }
.progress-fill { background: linear-gradient(90deg, var(--accent), var(--brand)); }
.disclaimer { border-left-color: var(--brand); }
@media (max-width: 420px) {
  .brand-mark { width: 52px; height: 40px; background-size: 65px 65px; background-position: -6px -4px; }
  .brand-name .b1 { font-size: 21px; }
  .brand-name .b2 { font-size: 12px; }
}

/* "What to bring" on the confirmation screen */
.bring { text-align: left; margin: 16px auto 14px; padding: 12px 16px; max-width: 360px; border-radius: 10px; background: var(--accent-wash); }
.bring-title { margin: 0 0 4px; font-weight: 700; font-size: 14px; }
.bring ul { margin: 0; padding-left: 20px; font-size: 14px; }

.home-link { display: inline-block; margin-top: 4px; padding: 6px 2px; color: var(--accent); font-weight: 700; }
.home-link[hidden] { display: none; }

/* ---- attorney list: one slim row per attorney (No preference stays a larger card on top) ---- */
.people { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.person:not(.featured) {
  flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
}
.person:not(.featured):hover, .person:not(.featured):focus-visible { transform: none; }
.person:not(.featured) .avatar { width: 40px; height: 40px; font-size: 16px; }
.person:not(.featured) .text { flex: 1; min-width: 0; }
.person:not(.featured) .who { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person:not(.featured) .role { margin-top: 0; }
.person:not(.featured) .next { flex: none; max-width: 52%; text-align: right; font-size: 11.5px; line-height: 1.3; }
.person:not(.featured) .next b { white-space: normal; font-size: 13.5px; }
.person.featured { padding: 16px 18px; }
.person:not(.featured) .next { max-width: 128px; }
/* Phones: no initials circle on attorney rows (it returns on wider screens, where headshots will go). */
@media (max-width: 600px) {
  .person:not(.featured) .avatar { display: none; }
}

/* Contact step: attorney first, big and bold; then how and when */
.picked-who { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; color: var(--ink); }
.picked-when { font-family: var(--sans); font-size: 15.5px; color: var(--ink); margin-top: 4px !important; }

/* ================= phone layout: easy to tap and book ================= */
.stepper-compact { display: none; }
@media (max-width: 600px) {
  /* Slimmer header so the first button shows sooner */
  .brandbar-inner { padding: 8px 16px; }
  main { padding-top: 16px; padding-bottom: 32px; }
  h1 { font-size: 27px; margin: 0 0 6px; }
  .lede { font-size: 14.5px; line-height: 1.45; }
  .masthead { margin-bottom: 14px; }
  .mock { margin-top: 8px; font-size: 12px; }

  /* "Step 3 of 5 · Attorney" with a thin bar, instead of five circles */
  .stepper ol { display: none; }
  .stepper-compact { display: block; }
  .sc-text { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
  .sc-bar { height: 6px; border-radius: 999px; background: var(--rule); overflow: hidden; }
  .sc-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .3s ease; }
  .stepper { margin-bottom: 12px; }

  /* Full-size tap targets (at least 44px) */
  .back { min-height: 44px; padding: 8px 12px 8px 6px; margin-bottom: 8px; }
  .skip { min-height: 48px; display: flex; align-items: center; justify-content: center; width: 100%; }
  .cal-nav { width: 44px; height: 44px; }
  .btn-secondary { min-height: 46px; }
  .link { min-height: 44px; }

  /* The main button stays pinned at the bottom of the screen while scrolling */
  #to-pick, #analyze:not([hidden]) {
    position: sticky; bottom: 12px; z-index: 5; min-height: 54px; font-size: 17px;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .10), 0 4px 14px rgba(0, 0, 0, .18);
  }
  #submit:disabled { box-shadow: none; }

  /* Times as big two-column buttons */
  .slot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: none; overflow: visible; }
  .slot-group { grid-column: 1 / -1; margin: 10px 0 0; }
  .slot-group:first-child { margin-top: 0; }
  .slot-row { flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: 0; padding: 12px 8px; min-height: 60px; text-align: center; }
  .slot-row .t { min-width: 0; font-size: 17px; }
  .slot-row .w { flex: none; max-width: 100%; font-size: 12.5px; }
  .slot-row svg { display: none; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { .sc-bar i { transition: none; } }
@media (max-width: 600px) {
  /* Solid (not see-through) when disabled, since it floats over the form */
}

/* ---- time screen on computers ---- */
.pick-title { margin: 0 0 12px; }
@media (min-width: 601px) {
  /* Attorney name alone, larger (no "Times with" label) */
  .who-switch .who-label { display: none; }
  .who-text strong { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; }
  .who-switch { padding: 12px 14px 12px 18px; }
}
@media (min-width: 760px) {
  /* The day heading on the right sits level with "Select a Date and Time" on the left */
  .week { position: static; }
  .week-col { position: sticky; top: 16px; }
  .day-times .times-day { margin: 0 0 12px; font-size: 20px; line-height: 1.2; }
  .pick-title { font-size: 20px; line-height: 1.2; }
}
/* Phones too: attorney name alone and larger (no "Times with" label) */
.who-switch .who-label { display: none; }
.who-text strong { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; }
@media (min-width: 601px) { .who-text strong { font-size: 24px; } }

/* Header: same size on every step so the screen doesn't jump.
   The description always reserves two lines; each step's text fits in two lines on a phone. */
.masthead h1 { margin-bottom: 6px; }
.lede { min-height: calc(2 * 1.5em); }
@media (max-width: 600px) {
  .lede { min-height: calc(2 * 1.45em); }
}

/* ---- computers: one page width on every step, so nothing shifts between steps ---- */
@media (min-width: 760px) {
  main { max-width: 940px; }
  .brandbar-inner { max-width: 940px; }
  /* Single-column steps keep a comfortable reading width, centered under the header */
  #view-upload, #view-reading, #view-explain, #view-attorney, #view-details, #view-done {
    max-width: 680px; margin-left: auto; margin-right: auto;
  }
}
/* Always reserve the scroll bar's space, so pages that scroll don't shift sideways */
html { scrollbar-gutter: stable; }

/* Not ready yet: plainly gray, with the button saying what's missing */
#submit:disabled { opacity: 1; background: var(--rule); color: var(--ink-soft); cursor: not-allowed; box-shadow: none; }
.picked-short { display: none; }

/* ---- Contact step on phones: slimmer summary, form and button on one screen ---- */
@media (max-width: 600px) {
  main[data-view="view-details"] .back { display: none; }
  .details-title { display: none; }
  .picked { padding: 12px 14px; margin-bottom: 16px; gap: 2px; }
  .picked-who { font-size: 21px; }
  .picked-who .pw-pre { display: none; }
  .picked-when { display: none; }
  .picked-short { display: block; margin: 2px 0 0 !important; font-size: 15px; color: var(--ink); }
  .picked-auto { font-size: 12.5px; }
  .picked-actions { display: flex; gap: 18px; margin-top: 6px; }
  .picked-actions .btn-secondary {
    min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font-size: 15px;
    text-decoration: underline; text-underline-offset: 3px;
  }
  .picked-actions .btn-secondary:hover { background: none; color: var(--accent); }
  .field { margin-bottom: 10px; }
  .field input { padding: 11px 14px; }
  #submit { min-height: 54px; font-size: 17px; }
}

/* Contact step: no empty gap above the button when there's no error */
#form-error:empty { min-height: 0; margin: 0; }
.form-disclaimer { margin: 12px 0 0; text-align: center; }
@media (max-width: 600px) {
  #view-details .field { margin-bottom: 8px; }
  #view-details .field span { font-size: 13.5px; }
  #view-details .picked { margin-bottom: 12px; }
  #view-details .picked-actions { margin-top: 2px; }
  #view-details #submit { margin-top: 6px; }
}

/* ---- Review step: "About the charge" ---- */
.charges { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.charge + .charge { padding-top: 14px; border-top: 1px solid var(--rule); }
.charge-name { margin: 0 0 4px; font-weight: 700; font-size: 16px; color: var(--ink); }
.charge-meaning { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.charge-facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; font-size: 14.5px; }
.charge-facts dt { color: var(--ink-soft); font-weight: 600; }
.charge-facts dd { margin: 0; color: var(--ink); }
.charges-note { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 600px) {
  .charge-facts { grid-template-columns: 1fr; gap: 2px; }
  .charge-facts dd { margin-bottom: 6px; }
}

/* Demo notice: always visible at the top of every step */
.demo-banner { padding: 8px 16px; background: #1f1f1f; color: #fff; font-size: 13.5px; line-height: 1.4; text-align: center; }
.demo-banner strong { color: #ffb48a; }
@media (max-width: 600px) { .demo-banner { font-size: 12.5px; padding: 7px 14px; text-align: left; } }

.demo-banner a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* Phones: the numbered steps are shown (instead of "Step 3 of 5"), so a finished step can be tapped to go back. */
@media (max-width: 600px) {
  .stepper ol { display: flex; }
  .stepper-compact { display: none; }
  .stepper { margin-bottom: 14px; }
  .step { min-height: 46px; gap: 4px; }
  .step-dot { width: 28px; height: 28px; font-size: 13px; }
  .step-label { font-size: 11.5px; }
  .step-label small { display: none; }
}
/* Finished steps look tappable */
.step button .step-label { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }

/* Phones: the same demo notice in fewer words, so the Contact step still fits on one screen */
.db-short { display: none; }
@media (max-width: 600px) {
  .db-long { display: none; }
  .db-short { display: inline; }
  .demo-banner { padding: 6px 14px; line-height: 1.35; }
  .stepper { margin-bottom: 10px; }
}
