/* ============================================
   CARE TEAM AREA
   The public page, applying, shared packets, and the workspace. The workspace is deliberately plain and
   dense: no hero, no mascot, no animation beyond a loading placeholder. Built for a laptop, works on a phone.
   ============================================ */

[hidden] { display: none !important; }

/* ---------- shared ---------- */
.ct-page { max-width: 1040px; margin: 0 auto; padding: 32px 16px 56px; color: var(--brand-ink, #1f1636); }
.ct-page h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.2; margin: 0 0 10px; }
.ct-page h2 { font-size: 22px; margin: 0 0 10px; }
.ct-lead { font-size: 17px; line-height: 1.6; color: var(--text-medium, #4b4266); max-width: 680px; margin: 0 0 20px; }
.ct-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(91, 47, 184, 0.35); background: #fff; color: var(--brand, #5b2fb8); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; font-family: inherit; }
.ct-btn:hover { background: var(--brand-soft, #f4effe); }
.ct-btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.ct-btn-primary { background: var(--brand, #5b2fb8); border-color: var(--brand, #5b2fb8); color: #fff; }
.ct-btn-primary:hover { background: var(--brand-dark, #3f1f86); }
.ct-btn-danger { color: #a3271c; border-color: rgba(163, 39, 28, 0.4); }
.ct-btn-danger:hover { background: #fdecea; }
.ct-big { min-height: 48px; font-size: 16px; padding: 10px 22px; }
.ct-wide { width: 100%; }
.ct-link { background: none; border: none; padding: 6px 2px; color: var(--brand, #5b2fb8); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: underline; font-family: inherit; }
.ct-hint { font-size: 13px; line-height: 1.45; color: var(--text-light, #6b6385); margin: 4px 0 0; }
.ct-notice { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff7e6; color: #5a3a06; font-size: 14px; line-height: 1.45; }
.ct-field { display: block; }
.ct-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ct-field input, .ct-field select, .ct-field textarea, .ct-searchbar input, .ct-searchbar select, .ct-ask textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid rgba(91, 47, 184, 0.28); border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: inherit; }
.ct-field-error { display: block; color: #a3271c; font-size: 13px; margin-top: 4px; }
.ct-attest { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.ct-attest input { margin-top: 3px; flex: none; width: 18px; height: 18px; }

/* ---------- public page ---------- */
.ct-hero { background: var(--brand-ink, #1f1636); color: #fff; }
.ct-hero-inner { max-width: 1040px; margin: 0 auto; padding: 44px 16px; }
.ct-hero h1 { color: #fff; font-size: clamp(28px, 5.5vw, 42px); line-height: 1.15; margin: 0 0 12px; max-width: 760px; }
.ct-hero p { color: rgba(255, 255, 255, 0.86); font-size: 18px; line-height: 1.55; max-width: 680px; margin: 0 0 22px; }
.ct-hero .ct-btn-primary { background: #fff; color: var(--brand-ink, #1f1636); border-color: #fff; }
.ct-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 18px 0 36px; }
.ct-card { border: 1px solid rgba(91, 47, 184, 0.16); border-radius: 12px; padding: 18px; background: #fff; }
.ct-card h3 { margin: 0 0 6px; font-size: 17px; }
.ct-card p { margin: 0; line-height: 1.55; color: var(--text-medium, #4b4266); font-size: 15px; }
.ct-steps { list-style: none; counter-reset: s; padding: 0; margin: 18px 0 36px; display: grid; gap: 12px; }
.ct-steps li { counter-increment: s; padding-left: 44px; position: relative; line-height: 1.5; }
.ct-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand, #5b2fb8); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ct-steps strong { display: block; }
.ct-trust { background: var(--brand-soft, #f4effe); border-radius: 12px; padding: 18px; line-height: 1.6; }
.ct-trust h2 { font-size: 19px; }
.ct-trust p { margin: 0; }
.ct-form { display: grid; gap: 14px; max-width: 560px; }
.ct-status { border: 1px solid rgba(91, 47, 184, 0.16); border-radius: 12px; padding: 22px; background: #fff; max-width: 620px; }
.ct-status h2 { margin: 0 0 8px; }
.ct-status p { margin: 0 0 14px; line-height: 1.55; }

/* ---------- workspace ---------- */
.ct-app { background: #f7f6fa; min-height: 70vh; color: var(--brand-ink, #1f1636); padding-bottom: 130px; }
.ct-top { background: #fff; border-bottom: 1px solid rgba(91, 47, 184, 0.14); }
.ct-top-inner { max-width: 1480px; margin: 0 auto; padding: 14px 16px 0; }
.ct-title { font-size: 21px; margin: 0; }
.ct-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-light, #6b6385); }
.ct-tabs { display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.ct-tabs::-webkit-scrollbar { display: none; }
.ct-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 10px 12px; min-height: 44px; font: inherit; font-weight: 700; font-size: 15px; color: var(--text-medium, #4b4266); cursor: pointer; white-space: nowrap; }
.ct-tab.is-active { color: var(--brand, #5b2fb8); border-bottom-color: var(--brand, #5b2fb8); }
.ct-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand, #5b2fb8); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.ct-body { max-width: 1480px; margin: 0 auto; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ct-main { min-width: 0; }
.ct-search-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.ct-filters { display: none; gap: 10px; background: #fff; border: 1px solid rgba(91, 47, 184, 0.14); border-radius: 10px; padding: 12px; }
.ct-filters.is-open { display: grid; }
.ct-checks { border: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.ct-checks legend { font-size: 13px; font-weight: 700; margin-bottom: 4px; padding: 0; }
.ct-checks label { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.ct-checks input { width: 17px; height: 17px; }
.ct-searchbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ct-searchbar select { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.ct-searchbar input { grid-column: 1 / -1; min-height: 44px; }
.ct-ask { background: #fff; border: 1px solid rgba(91, 47, 184, 0.14); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.ct-ask summary { font-weight: 700; cursor: pointer; font-size: 15px; min-height: 26px; }
.ct-ask-form { display: grid; gap: 8px; margin-top: 8px; }
.ct-ask-reply { margin: 10px 0 0; line-height: 1.5; font-size: 15px; }
.ct-resultcount { margin: 12px 0 8px; font-size: 14px; font-weight: 700; color: var(--text-medium, #4b4266); }
.ct-rows, .ct-list { display: grid; gap: 8px; }
.ct-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; background: #fff; border: 1px solid rgba(91, 47, 184, 0.14); border-radius: 10px; padding: 12px 14px; }
.ct-row-stack { grid-template-columns: minmax(0, 1fr); }
.ct-row-title { font-size: 16px; line-height: 1.3; margin: 0; }
.ct-row-title a { color: inherit; text-decoration: none; }
.ct-row-title a:hover { color: var(--brand, #5b2fb8); text-decoration: underline; }
.ct-row-meta { margin: 2px 0 0; font-size: 13px; color: var(--text-light, #6b6385); }
.ct-row-summary { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-medium, #4b4266); }
.ct-row-contact { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; overflow-wrap: anywhere; }
.ct-row-contact a { color: var(--brand, #5b2fb8); }
.ct-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ct-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-add { min-width: 74px; }
.ct-add.is-on { background: var(--brand, #5b2fb8); color: #fff; }
.ct-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ct-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #efeaf9; color: #4b3a78; }
.ct-tag-good { background: #e3f4ea; color: #1c6b3c; }
.ct-tag-warn { background: #fdecea; color: #8f2318; }
.ct-empty { padding: 26px 16px; text-align: center; background: #fff; border: 1px dashed rgba(91, 47, 184, 0.3); border-radius: 10px; color: var(--text-medium, #4b4266); }
.ct-more { margin-top: 10px; width: 100%; }
.ct-skel-row { display: block; }
.ct-skel { height: 62px; border-radius: 8px; background: linear-gradient(100deg, #efeaf9 30%, #f9f6ff 50%, #efeaf9 70%); background-size: 200% 100%; animation: ctShimmer 1.4s linear infinite; }
@keyframes ctShimmer { from { background-position: 180% 0; } to { background-position: -20% 0; } }

/* tray: a sheet on a phone, a column on a wide screen */
.ct-tray { position: fixed; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(27, 20, 64, 0.3); padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 2500; display: none; }
.ct-tray.is-open { display: block; }
.ct-tray-head { display: flex; align-items: center; gap: 10px; }
.ct-tray-head h2 { font-size: 17px; margin: 0; flex: 1; }
.ct-tray-close { background: none; border: none; font-size: 26px; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: inherit; }
.ct-tray-items { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.ct-tray-items li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid rgba(91, 47, 184, 0.1); }
.ct-tray-remove { background: none; border: none; font-size: 20px; width: 36px; height: 36px; cursor: pointer; color: var(--text-light, #6b6385); flex: none; }
.ct-packet-form { display: grid; gap: 10px; margin-top: 10px; }
.ct-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ct-ready { margin-top: 12px; padding: 12px; border-radius: 10px; background: #e3f4ea; }
.ct-ready h3 { margin: 0; font-size: 16px; }
.ct-ready .ct-row-actions { margin-top: 8px; }
.ct-traybar { position: fixed; left: 16px; right: 16px; bottom: calc(65px + env(safe-area-inset-bottom, 0px) + 10px); min-height: 48px; border: none; border-radius: 10px; background: var(--brand, #5b2fb8); color: #fff; font: inherit; font-weight: 700; cursor: pointer; z-index: 1030; box-shadow: 0 6px 18px rgba(63, 31, 134, 0.35); }
.ct-traybar .ct-count { background: #fff; color: var(--brand, #5b2fb8); }

.ct-dialog { border: none; border-radius: 12px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: 88vh; color: var(--brand-ink, #1f1636); }
.ct-dialog::backdrop { background: rgba(27, 20, 64, 0.5); }
.ct-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; border-bottom: 1px solid rgba(91, 47, 184, 0.14); position: sticky; top: 0; background: #fff; }
.ct-dialog-head h2 { font-size: 18px; margin: 0; }
.ct-dialog-body { padding: 14px 18px 18px; }
.ct-dialog-sub { margin: 0 0 4px; font-weight: 700; }
.ct-qr { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.ct-compare-wrap { overflow-x: auto; }
.ct-compare { border-collapse: collapse; width: 100%; font-size: 14px; }
.ct-compare th, .ct-compare td { border: 1px solid rgba(91, 47, 184, 0.16); padding: 8px; text-align: left; vertical-align: top; min-width: 130px; line-height: 1.4; }
.ct-compare tr:first-child th { background: var(--brand-soft, #f4effe); }

/* ---------- shared packet page ---------- */
.pk { max-width: 780px; margin: 0 auto; padding: 28px 16px 60px; color: var(--brand-ink, #1f1636); }
.pk h1 { font-size: clamp(25px, 5vw, 34px); margin: 0 0 6px; }
.pk-meta { margin: 0; color: var(--text-medium, #4b4266); font-size: 15px; line-height: 1.5; }
.pk-note { margin: 14px 0 0; padding: 12px 14px; background: var(--brand-soft, #f4effe); border-radius: 10px; line-height: 1.55; }
.pk-note strong { display: block; font-size: 13px; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pk-item { border: 1px solid rgba(91, 47, 184, 0.16); border-radius: 12px; padding: 16px; margin-top: 12px; break-inside: avoid; }
.pk-item h2 { font-size: 19px; margin: 0; line-height: 1.3; }
.pk-where { font-size: 13px; color: var(--text-light, #6b6385); margin: 2px 0 8px; }
.pk-item p { line-height: 1.55; }
.pk-fact { margin: 6px 0 0; font-size: 15px; }
.pk-contact { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; overflow-wrap: anywhere; }
.pk-contact a { color: var(--brand, #5b2fb8); font-weight: 700; }
.pk-checked { margin: 8px 0 0; font-size: 13px; color: var(--text-light, #6b6385); }
.pk-disclaimer { margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--text-light, #6b6385); }

/* Lists on the Saved Resources page */
.received-lists { margin: 0 0 24px; display: grid; gap: 10px; }
.received-lists h2 { font-size: 20px; margin: 0; }
.received-card { background: #fff; border: 1px solid rgba(91, 47, 184, 0.18); border-radius: 12px; padding: 14px; }
.received-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; }
.received-card ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.shared-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.shared-links { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 640px) {
  .ct-grid { grid-template-columns: repeat(2, 1fr); }
  .ct-searchbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ct-searchbar input { grid-column: auto; }
}
@media (min-width: 960px) {
  .ct-grid { grid-template-columns: repeat(3, 1fr); }
  .ct-search-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .ct-filters { display: grid; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
  .ct-filter-toggle { display: none; }
  .ct-searchbar { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 1200px) {
  .ct-app { padding-bottom: 24px; }
  .ct-body { grid-template-columns: minmax(0, 1fr) 320px; }
  .ct-tray { display: block; position: sticky; top: 84px; left: auto; right: auto; bottom: auto; max-height: calc(100vh - 100px); border-radius: 10px; box-shadow: none; border: 1px solid rgba(91, 47, 184, 0.14); z-index: 1; }
  .ct-tray-close { display: none; }
  .ct-traybar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ct-skel { animation: none; } }

@media print {
  .navbar, .bottom-nav, footer, .pk-actions, .site-footer, .cc-sheet, .announcement-banner, .social-sidebar { display: none !important; }
  .pk { padding: 0; max-width: none; }
  .pk-item { border-color: #999; }
  .pk a { color: #000; }
}

.ct-found { border: 2px solid var(--brand, #5b2fb8); border-radius: 10px; padding: 12px; margin: 10px 0 14px; }
.ct-found h3 { margin: 0 0 4px; font-size: 16px; }
.ct-found-row { border-top: 1px solid rgba(91, 47, 184, 0.14); padding: 10px 0; }
.ct-found-row p { margin: 0 0 6px; overflow-wrap: anywhere; }
.ct-found-value { font-weight: 700; }

/* Contact links in each result (website, phone, email) are easy to tap: at least 24px tall (WCAG 2.2). */
.ct-row-contact a { display: inline-flex; align-items: center; min-height: 24px; }
