/* Watchtower for Vets — claims organizer (builds on /styles.css) */
.org { display: flex; flex-direction: column; min-height: 100vh; }
.org-main { flex: 1; outline: none; }
.org-main > .wrap { max-width: 920px; padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 22px; }
.org-header .brand-by { font-weight: 600; }
.org-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--gold-light); }

.device-note { background: var(--accent); color: #fff; font-size: 15px; }
.device-note .wrap { display: flex; gap: 10px; align-items: center; padding-top: 9px; padding-bottom: 9px; }
.device-note svg { flex: none; }

.loading, .center { text-align: center; }
.muted { color: var(--ink-muted); }
.fine { font-size: 14px; color: var(--ink-muted); }
.hint { font-size: 15px; color: var(--ink-muted); }
.src { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }
.src a { color: var(--ink-muted); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-head h1 { font-weight: 800; font-size: clamp(30px, 4.4vw, 40px); overflow-wrap: anywhere; }
.page-head h1:focus { outline: none; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 23px; }
.panel.callout { background: var(--gold-wash); border-color: #E7D7B0; }
.notes { white-space: pre-wrap; color: var(--ink-soft); }
.banner { background: var(--gold-wash); border: 1px solid #E7D7B0; border-radius: 12px; padding: 12px 16px; font-size: 16px; color: #3B2E12; }
.sec-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

.welcome .how { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-soft); }
.welcome .how strong { color: var(--ink); }

/* Claim cards */
.claims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.claim-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none; }
.claim-card:hover { border-color: var(--accent); color: var(--ink); box-shadow: 0 2px 10px rgba(22, 33, 43, 0.06); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-top h2 { font-size: 22px; overflow-wrap: anywhere; }
.cc-next { font-size: 15px; font-weight: 600; color: var(--gold); }
.claim-card .meter > div, .panel .meter > div { width: 0; }

/* Evidence needs */
.need { border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.need-ok { border-left-color: var(--accent); }
.need-missing { border-left-color: var(--gold-light); background: #FDFBF6; }
.need-head { display: flex; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; }
.need-head h3 { font-size: 19px; }
.need-head .muted { font-size: 16px; }
.pill { font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #EEF0EB; color: var(--ink-soft); height: fit-content; white-space: nowrap; }
.need-ok .pill { background: #E3EEE9; color: var(--accent-dark); }
.need-missing .pill { background: var(--gold-wash); color: var(--gold); }

.facts { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.facts li { background: var(--ground); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.facts p { overflow-wrap: anywhere; }
.fact-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-size: 15px; color: var(--ink-muted); }
.fact-actions { display: flex; gap: 14px; }

.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 28px; }
.linkish:hover { color: var(--accent-dark); }

/* Deadlines */
.deadlines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dl { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 6px solid var(--accent); }
.dl > div:first-child { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl > div:first-child span { color: var(--ink-soft); font-size: 16px; }
.dl-when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.dl-when span { font-size: 15px; color: var(--ink-muted); }
.dl-soon { border-left-color: var(--gold); background: var(--gold-wash); }
.dl-soon .dl-when span { color: var(--gold); font-weight: 700; }
.dl-passed { border-left-color: var(--error); }
.dl-passed .dl-when span { color: var(--error); font-weight: 700; }
.dl-met { border-left-color: #B9C0B6; opacity: 0.8; }

.org-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.org-timeline li { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.org-timeline .t-date { font-weight: 600; font-size: 16px; }
.org-timeline .t-text { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.org-timeline small { color: var(--ink-muted); font-size: 15px; }

/* Forms */
.form-panel { gap: 18px; }
.field { border: 0; margin: 0; padding: 0; }
.field legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 6px; }
.field textarea {
  font: inherit; font-size: 18px; padding: 12px 14px; border: 1.5px solid #C9CFC6; border-radius: 10px; background: #fff; color: var(--ink); resize: vertical; width: 100%;
}
.field textarea:focus { border-color: var(--accent); outline: none; }
.field input, .field select { width: 100%; }
.choice { display: flex; gap: 10px; align-items: center; font-size: 17px; padding: 6px 0; flex-wrap: wrap; }
.choice input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }

.btn-danger { background: #fff; color: var(--error); border-color: #E2B8B1; }
.btn-danger:hover { border-color: var(--error); color: var(--error); }
.danger-zone { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 8px; }

.file-btn { position: relative; overflow: hidden; width: fit-content; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.drop.over { border-color: var(--accent); background: #F1F6F3; }

/* Records */
.records { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.records li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.rec-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 300px; }
.rec-main strong { overflow-wrap: anywhere; }
.rec-main span { font-size: 15px; color: var(--ink-muted); }
.rec-actions { display: flex; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 16px; max-width: calc(100% - 32px); transition: transform 0.25s ease; z-index: 20; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

.org-footer .wrap { max-width: 920px; flex-direction: column; gap: 8px; }

/* Your next step */
.next-card { background: var(--card); border: 2px solid var(--accent); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; box-shadow: 0 6px 18px rgba(22, 33, 43, 0.06); }
.next-done { border-color: var(--gold-light); }
.next-kicker { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.next-card h2 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; }
.next-text { font-size: 19px; color: var(--ink-soft); max-width: 640px; }
.btn-big { font-size: 20px; min-height: 56px; padding: 16px 30px; }
.next-calm { font-size: 15.5px; color: var(--ink-muted); }
.step-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.step-dots li span { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background: #EEF0EB; color: var(--ink-muted); }
.step-dots li.done span { background: var(--accent); color: #fff; }
.step-dots li.now span { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
@media (max-width: 640px) { .next-card { padding: 20px; } .btn-big { width: 100%; } }

/* Start here board */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-height: 128px; }
.tile svg { color: var(--accent); margin-bottom: 6px; }
.tile:hover { border-color: var(--accent); color: var(--ink); box-shadow: 0 2px 10px rgba(22, 33, 43, 0.07); }
.tile-title { font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.2; }
.tile-status { font-size: 14px; color: var(--ink-muted); }
.tile-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile-primary svg, .tile-primary .tile-status { color: #DCEBE4; }
.tile-primary:hover { background: var(--accent-dark); color: #fff; }
.tile-alert { border-color: var(--gold-light); background: var(--gold-wash); }
.tile-alert .tile-status { color: var(--gold); font-weight: 700; }
.sec-title { font-size: 24px; margin-top: 6px; }
@media (max-width: 760px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile { min-height: 116px; padding: 14px; } .tile-title { font-size: 17px; } }

/* Handoff, calculator, journal */
.lead-text { font-size: 19px; color: var(--ink-soft); max-width: 720px; }
.ready-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 6px 18px; font-size: 16px; color: var(--ink-muted); }
.ready-list li.ok { color: var(--accent-dark); font-weight: 600; }
.ho-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ho-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--ground); border-radius: 10px; padding: 10px 14px; }
.ho-list li > div { overflow-wrap: anywhere; }
.ho-list small { display: block; color: var(--ink-muted); font-size: 15px; }
.ho-form { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ho-form .two-col { width: 100%; }
.surv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.surv-list li { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.surv-list li p { font-size: 16px; color: var(--ink-soft); }
.surv-check { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-muted); flex: none; width: 58px; text-align: center; }
.surv-check input { width: 24px; height: 24px; accent-color: var(--accent); }
.calc-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.calc-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.calc-row select { font: inherit; font-size: 18px; padding: 10px 12px; border: 1.5px solid #C9CFC6; border-radius: 10px; background: #fff; min-width: 120px; }
.calc-result { display: flex; flex-direction: column; gap: 2px; background: #E3EEE9; border-radius: 14px; padding: 16px 20px; }
.calc-result span { font-weight: 700; color: var(--accent-dark); }
.calc-result strong { font-family: var(--display); font-size: 48px; font-weight: 800; line-height: 1.1; }
.calc-result small { color: var(--ink-soft); font-size: 15px; }
.journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.journal li { background: var(--ground); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.j-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.j-sev { font-weight: 700; color: var(--gold); }
.j-head .linkish { margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.print-only { display: none; }
@media print {
  .site-header, .device-note, .org-footer, .no-print, .toast, .skip-link { display: none !important; }
  .print-only { display: block; }
  body, .org-main { background: #fff; }
  .panel { border: 1px solid #999; break-inside: avoid; }
  .org-main > .wrap { padding: 0; max-width: none; }
  a { color: #000; }
}

/* Help */
.help-item { border-top: 1px solid var(--line); padding: 10px 0; }
.help-item summary { cursor: pointer; font-weight: 700; font-size: 18px; min-height: 36px; display: flex; align-items: center; gap: 10px; list-style: none; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::before { content: '+'; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #E3EEE9; color: var(--accent-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.help-item[open] summary::before { content: '\2212'; }
.help-item ol { margin: 8px 0 4px; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-soft); }
.help-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.form-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.form-list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.form-list .h-title { font-weight: 600; font-size: 16px; }
.form-list .h-use { font-size: 15px; color: var(--ink-muted); }
.panel.crisis { border-color: #E2B8B1; background: #FDF6F4; }

/* Rating codes */
.notice-public { background: #EEF3F7; border: 1px solid #CFDCE6; border-radius: 10px; padding: 12px 14px; font-size: 15px; color: var(--ink-soft); }
.code-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.code-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.code-box h3, .code-name { font-size: 19px; }
.code-box details summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: 16px; min-height: 32px; }
.levels { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.levels > li { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lv-head { display: flex; gap: 12px; align-items: flex-start; }
.lv-head p { font-size: 16px; color: var(--ink-soft); }
.lv-pct { flex: none; min-width: 52px; text-align: center; font-weight: 800; font-family: var(--display); background: #EEF0EB; border-radius: 8px; padding: 2px 6px; font-size: 16px; }
.lv-facts { margin: 0 0 0 64px; padding-left: 18px; font-size: 15px; color: var(--ink); }
.crit-tag { align-self: flex-start; font-size: 13px; font-weight: 700; color: #2B4B66; background: #EEF3F7; border-radius: 999px; padding: 2px 10px; }
.pill-ok { background: #E3EEE9; color: var(--accent-dark); }

@media (max-width: 640px) {
  .lv-facts { margin-left: 0; }
  .org-main > .wrap { padding-left: 16px; padding-right: 16px; padding-top: 22px; }
  .org-header .wrap, .device-note .wrap, .org-footer .wrap { padding-left: 16px; padding-right: 16px; }
  .org-nav { gap: 4px; font-size: 14.5px; width: 100%; justify-content: space-between; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .org-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 40px; }
  .panel { padding: 18px; }
  .org-timeline li { grid-template-columns: 1fr auto; }
  .org-timeline .t-date { grid-column: 1 / -1; }
  .dl-when { align-items: flex-start; text-align: left; }
  .page-head .row .btn { flex: 1 1 auto; }
}

@media (max-width: 350px) { .org-nav { font-size: 12.5px; gap: 2px; } .org-header .wrap { padding-left: 12px; padding-right: 12px; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
