:root {
  --ink: #1f2a37; --muted: #5a6470; --paper: #f7f9fb; --surface: #fff;
  --green: #1d5aa6; --green-2: #17b1a6; --mint: #dff2f1; --line: #e6e9ed;
  --amber: #f6e7c5; --red: #9b3f3a; --shadow: 0 16px 45px rgba(29,90,166,.10);
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); font-size: 17px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 95% 0, #e2eef7 0, transparent 30rem), var(--paper); }
button, input { font: inherit; }
button, .button { min-height: 48px; border-radius: 12px; border: 0; cursor: pointer; font-weight: 700; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #e29e43; outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; background: white; padding: .8rem; z-index: 20; }
.skip-link:focus { top: 1rem; }
.topbar { height: 82px; padding: 0 max(5vw, 1.25rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(247,249,251,.9); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand-logo { height: 48px; width: auto; mix-blend-mode: multiply; }
.brand strong, .brand small { display: block; }.brand small { color: var(--muted); font-size: .72rem; margin-top: .1rem; }
.wordmark { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.wm-blue { color: var(--green); }.wm-teal { color: var(--green-2); }
.privacy-pill { font-size: .8rem; background: var(--mint); color: var(--green); border-radius: 99px; padding: .45rem .8rem; font-weight: 700; }
main { width: min(1120px, 90vw); margin: 0 auto; padding: 4rem 0 6rem; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; margin-bottom: 4rem; }
.eyebrow { color: var(--green-2); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800; }
h1 { font-family: Poppins, sans-serif; font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; margin: .7rem 0 1.2rem; font-weight: 600; }
.lead { color: var(--muted); font-size: 1.15rem; line-height: 1.65; max-width: 42rem; }
.start-card { background: var(--green); color: white; padding: 2rem; border-radius: 26px; box-shadow: var(--shadow); }
.start-card h2 { margin: 0 0 .5rem; font-family: Poppins, sans-serif; font-weight: 500; font-size: 1.65rem; }
.start-card p { color: #d7e6f5; line-height: 1.5; }
.primary { background: var(--green-2); color: #fff; padding: .8rem 1.2rem; width: 100%; margin-top: .5rem; }
.primary:hover { background: #2cc4b9; }.secondary { background: var(--mint); color: var(--green); padding: .65rem 1rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.section-heading h2 { font-family: Poppins, sans-serif; font-size: 2rem; font-weight: 500; margin: 0; }
.section-heading p { color: var(--muted); margin: 0; }
.visit-list { display: grid; gap: .75rem; }
.visit { display: grid; grid-template-columns: 58px 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; color: inherit; text-decoration: none; transition: .2s; }
.visit:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #b8cbc5; }
.date-box { text-align: center; color: var(--green); border-right: 1px solid var(--line); padding-right: 1rem; }.date-box strong,.date-box span { display: block; }.date-box strong { font-size: 1.4rem; }.date-box span { font-size: .7rem; text-transform: uppercase; }
.visit h3 { margin: 0 0 .25rem; font-size: 1rem; }.visit p { margin: 0; color: var(--muted); font-size: .86rem; }
.status { font-size: .75rem; border-radius: 99px; padding: .4rem .7rem; text-transform: capitalize; background: #edf1ef; }.status.complete { background: var(--mint); }.status.failed { background: #f5deda; color: var(--red); }.status.processing { background: var(--amber); }
.empty { border: 1px dashed #afbfba; border-radius: 18px; text-align: center; padding: 3rem 1rem; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(15,34,31,.65); display: grid; place-items: center; padding: 1rem; z-index: 10; }
.modal[hidden] { display: none; }.modal-card { background: white; width: min(600px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 24px; padding: 2rem; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: start; }.modal h2 { margin: 0; font-family: Poppins, sans-serif; font-weight: 500; font-size: 2rem; }.icon-button { background: #edf1ef; width: 44px; font-size: 1.3rem; }
.notice { background: var(--amber); color: #5c4824; border-radius: 12px; padding: .8rem 1rem; font-size: .82rem; line-height: 1.5; margin: 1rem 0; }
.field { margin: 1rem 0; }.field label { display: block; margin-bottom: .35rem; font-weight: 700; font-size: .85rem; }.field input, .field select { width: 100%; border: 1px solid #aebdb9; border-radius: 10px; padding: .75rem; min-height: 48px; font: inherit; background: white; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }.file-drop { border: 2px dashed #99aaa5; border-radius: 14px; padding: 1.25rem; text-align: center; background: #f8faf8; }.file-drop input { max-width: 100%; }
.back { color: var(--green); font-weight: 700; text-decoration: none; }.report-head { margin: 2rem 0; display: flex; justify-content: space-between; align-items: start; gap: 1rem; }.report-head h1 { font-size: clamp(2.2rem,5vw,3.8rem); margin-bottom: .5rem; }.meta { color: var(--muted); }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }.report-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; }.report-card.wide { grid-column: 1/-1; }.report-card h2 { font-family: Poppins, sans-serif; font-weight: 500; margin: 0 0 1rem; font-size: 1.45rem; }.report-card p { line-height: 1.65; }.report-card ul { padding-left: 1.2rem; }.report-card li { margin: .7rem 0; line-height: 1.5; }.disclaimer { border-left: 4px solid #d69b45; padding: .8rem 1rem; background: #fff9ec; color: #5e513d; margin-bottom: 1rem; }
details { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; margin-top: 1rem; } summary { cursor: pointer; font-weight: 700; }.transcript { white-space: pre-wrap; line-height: 1.7; color: #465b56; }
.loading { text-align: center; padding: 5rem 1rem; }.spinner { margin: 0 auto 1rem; width: 44px; height: 44px; border: 4px solid var(--mint); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 1rem; bottom: 1rem; background: #1f2a37; color: white; border-radius: 10px; padding: .8rem 1rem; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events:none; }#toast.show { opacity: 1; transform: none; }
.checklist { list-style: none; padding: 0; margin: 0; }
.check-item { display: flex; align-items: flex-start; gap: .8rem; padding: .7rem .5rem; border-radius: 10px; cursor: pointer; line-height: 1.5; }
.check-item:hover { background: var(--paper); }
.check-item input { width: 26px; height: 26px; flex-shrink: 0; margin-top: .1rem; accent-color: var(--green-2); cursor: pointer; }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.source-line { font-size: .78rem; text-decoration: none; display: inline-block; margin-top: .15rem; }
.todo-li { display: flex; align-items: flex-start; gap: .5rem; }
.todo-li .check-item { flex: 1; }
.todo-li .remind { margin-top: .5rem; flex-shrink: 0; }
.reminder-text { font-size: 1.05rem; line-height: 1.5; border-left: 3px solid var(--green-2); padding-left: 1rem; margin: 1rem 0; }
#reminder-modal .chips { margin-bottom: .5rem; }
.check-item.done .source-line { text-decoration: none; }
.report-actions { display: flex; align-items: center; gap: .75rem; }
.danger { background: #f5deda; color: var(--red); }
.app-footer { text-align: center; padding: 1.5rem 0 2rem; color: var(--muted); font-size: .75rem; }
.app-footer #install-app { display: block; margin: 0 auto .8rem; }
@media print {
  .topbar, .back, .report-actions, #toast, .app-footer, details { display: none !important; }
  body { background: white; }
  main { width: 100%; padding: 0; }
  .report-grid { display: block; }
  .report-card { border: 1px solid #ccc; break-inside: avoid; margin-bottom: .75rem; }
  .check-item input { accent-color: black; }
}
.aside-link { text-align: center; margin: 1rem 0 0; }
.aside-link a { color: #d7e6f5; font-size: .9rem; }
.qr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 12px; margin: .5rem 0; }
.qr-large { width: 260px; height: 260px; }
.share-row { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.share-row .qr { flex-shrink: 0; }
.invite-body { text-align: center; }
.invite-url code { word-break: break-all; font-size: .8rem; }
.mfa-steps { padding-left: 1.2rem; }
#mfa-card { margin-top: 1.5rem; }
#mfa-card code { background: var(--paper); padding: .2rem .4rem; border-radius: 6px; font-size: .85rem; }
.login-brand { text-align: center; }
.login-brand .lead { margin: 0 auto; max-width: 34rem; }
.login-logo { width: min(430px, 90%); mix-blend-mode: multiply; margin-bottom: .5rem; }
.choice-row { display: grid; gap: .75rem; }
.big-choice { width: 100%; min-height: 60px; font-size: 1.1rem; }
.source-hint { text-align: center; margin: .5rem 0 0; }
.recording-panel { text-align: center; padding: .5rem 0; }
.recording-panel audio { width: 100%; margin: .75rem 0; }
.recording-panel .secondary { margin-top: .5rem; }
.rec-status { font-weight: 800; color: var(--red); display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .25rem 0; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.rec-timer { font-size: 3.2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: .25rem 0 .5rem; color: var(--ink); }
.topnav { display: flex; align-items: center; gap: 1rem; }
.nav-user { font-weight: 700; font-size: .9rem; }
.nav-link { color: var(--green); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.nav-link:hover { text-decoration: underline; }
.nav-button { background: var(--mint); color: var(--green); padding: .5rem .9rem; min-height: 40px; font-size: .9rem; white-space: nowrap; }
.tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { padding: .7rem 1.1rem; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.tab.active { color: var(--green); border-bottom-color: var(--green); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: .5rem .75rem; border-bottom: 1px solid var(--line); }
.table td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .actions { white-space: nowrap; }
.small { min-height: 38px; font-size: .82rem; padding: .45rem .8rem; margin: 0 .2rem .2rem 0; }
.error-text { color: var(--red); }
.admin-grid { display: grid; gap: 1rem; }
.chat-log { display: flex; flex-direction: column; gap: .6rem; min-height: 220px; margin-bottom: 1rem; }
#chat-widget { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
#chat-widget[hidden] { display: none; }
#chat-bubble { width: 62px; height: 62px; border-radius: 50%; background: var(--green); color: white; font-size: 1.6rem; box-shadow: var(--shadow); }
#chat-bubble:hover { background: #17498a; }
#chat-panel { width: min(380px, calc(100vw - 2rem)); height: min(540px, calc(100vh - 7rem)); background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
#chat-panel[hidden] { display: none; }
.chat-panel-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .6rem .7rem 1rem; background: var(--green); color: white; }
.chat-panel-head .icon-button { background: rgba(255,255,255,.15); color: white; }
#chat-panel .chat-log { flex: 1; overflow-y: auto; padding: 1rem; margin: 0; min-height: 0; }
#chat-panel .ask-row { padding: .6rem; border-top: 1px solid var(--line); }
#chat-panel .ask-row input { min-height: 46px; }
#chat-panel .ask-row .primary { padding: .6rem 1.1rem; }
@media print { #chat-widget { display: none !important; } }
.bubble { padding: .8rem 1.1rem; border-radius: 16px; max-width: 85%; line-height: 1.55; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--green); color: white; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ask-row { display: flex; gap: .6rem; }
.ask-row input { flex: 1; border: 1px solid #aebdb9; border-radius: 12px; padding: .75rem; min-height: 52px; }
.ask-row .primary { width: auto; margin-top: 0; padding: .8rem 1.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tl-year-label { font-family: Poppins, sans-serif; font-weight: 600; font-size: 2.2rem; color: var(--green); margin: 1.75rem 0 .75rem; }
.tl-visit { margin-bottom: 1rem; }
.tl-title { color: inherit; text-decoration: none; display: block; margin-bottom: .25rem; }
.tl-title:hover strong { color: var(--green); }
.chain { list-style: none; padding: 0; margin: .5rem 0 0; }
.chain li { padding: .3rem 0; line-height: 1.5; }
.chain li + li::before { content: '↓'; display: block; color: var(--green-2); font-weight: 700; padding: 0 0 .4rem; }
.term { display: inline; background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-weight: inherit; color: var(--green); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; border-radius: 0; text-align: left; }
.term:hover { color: var(--green-2); }
.explain-body { font-size: 1.15rem; line-height: 1.65; border-left: 3px solid var(--green-2); padding-left: 1rem; margin: 1.25rem 0; }
@media print { .term { text-decoration: none; color: inherit; } }
.test-row { align-items: end; }
.test-row .secondary { margin-bottom: 1rem; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; align-items: end; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; margin: .5rem 0; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.report-card.stat { text-align: center; }
.report-card.stat h2 { font-size: 2.2rem; margin-bottom: .25rem; }
.report-card.stat h2 small { color: var(--muted); font-size: 1.1rem; }
.report-card.stat p { color: var(--muted); margin: 0; font-size: .85rem; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; gap: 1.5rem; }.privacy-pill { display:none; } main { width:min(92vw,1120px); padding-top:2.5rem; }.field-row,.report-grid,.field-row-3 { grid-template-columns:1fr; }.stat-row { grid-template-columns:1fr 1fr; }.nav-user { display:none; }
  .topbar { height: auto; flex-wrap: wrap; padding: .6rem max(4vw, 1rem); row-gap: .2rem; }
  .brand small { display: none; }
  .brand-logo { height: 38px; }
  .topnav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: .2rem .9rem; padding: .2rem 0 .4rem; }
  .topnav .nav-button { margin-left: auto; }
  .nav-link { padding: .55rem .3rem; min-height: 44px; display: inline-flex; align-items: center; }
  .nav-button { min-height: 44px; }.report-card.wide { grid-column:auto; }.report-head { display:block; }.visit { grid-template-columns:50px 1fr; }.visit .status { grid-column:2; justify-self:start; }.section-heading { align-items:start; flex-direction:column; } }

