/* The pieces the Programs hub, Diabetes, Veterans and Support pages add to the RTW-IQ template (styles-v2.css).
   Pages are generated by tools/build-program-pages.py. */

/* Four product tiles instead of RTW-IQ's five: two rows of two. */
@media (min-width: 768px) {
  .care-bento.is-four > .bento-tile { grid-column: span 3; }
}

/* Programs hub: one card per program, in the bento tile's look. */
.programs-section { scroll-margin-top: 90px; }
.program-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.program-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.program-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px #15234e14; }
.program-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.program-visual { aspect-ratio: 3 / 2; overflow: hidden; }
.program-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.program-card:hover .program-visual img { transform: scale(1.035); }
.program-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 24px 25px 25px; }
.program-copy h3 { font-size: 20px; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; }
.program-copy p { font-size: 13px; line-height: 1.65; color: var(--muted); }
.program-link { display: inline-flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; font-size: 12px; font-weight: 600; }
@media (max-width: 900px) { .program-grid { grid-template-columns: 1fr; } .program-visual { aspect-ratio: 16 / 9; } }

/* Program pages: the contact card becomes the questions to bring to your care team. */
.next-questions { display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 22px; background: var(--bg); }
.next-questions h3 { font-size: 16px; font-weight: 600; letter-spacing: -.03em; }
.next-questions ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: q; }
.next-questions li { position: relative; padding: 14px 16px 14px 52px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); font-size: 14px; line-height: 1.5; counter-increment: q; }
.next-questions li::before { content: counter(q); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 600; }
#next-steps { scroll-margin-top: 90px; }

/* Support page: the help centre sits under the template header. */
.support-shell { padding-top: 8px; padding-bottom: 40px; }
.support-shell .cs-help-page { border-top: 0; border-radius: 24px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .program-card, .program-visual img { transition: none; } .program-card:hover { transform: none; } }

/* These program photos are brighter than the RTW-IQ hero, so the text side gets a deeper shade. */
@media (min-width: 768px) {
  .program-page .hero-rtw .hero-shade { background: linear-gradient(90deg, #0d1a30d9 0%, #0d1a30a6 34%, #0d1a3033 58%, transparent 72%); }
}

/* Diabetes: ulcer risk score donut. Bands follow the Practitioner Desk scale (very low to very high). */
.ulcer-risk{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,480px);gap:64px;align-items:center;scroll-margin-top:90px;
 --risk-1:#3fbf7f;--risk-2:#9fd45a;--risk-3:#f2c94c;--risk-4:#f39a3d;--risk-5:#e2553f}
.risk-eyebrow{font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin-bottom:18px}
.risk-copy h2{font-size:clamp(36px,4.2vw,62px);line-height:1.05;letter-spacing:-.055em;font-weight:550}
.risk-copy h2 span{color:var(--muted)}
.risk-copy>p:not(.risk-eyebrow):not(.risk-note){font-size:15px;line-height:1.7;color:var(--muted);max-width:460px;margin-top:22px}
.risk-factors{list-style:none;margin:28px 0 0;padding:0;display:grid;gap:8px;max-width:460px}
.risk-factors li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px 12px 18px;border-radius:14px;background:var(--paper);font-size:14px}
.risk-pill{font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px}
.risk-pill.is-watch{background:#fdf1d6;color:#8a5a00}
.risk-pill.is-normal{background:#e1f5ea;color:#1d6b43}
:root[data-theme=dark] .risk-pill.is-watch{background:#3d3215;color:#f5d27a}
:root[data-theme=dark] .risk-pill.is-normal{background:#173a29;color:#8fdcb1}
.risk-note{font-size:12px;line-height:1.6;color:var(--muted);margin-top:16px;max-width:460px}
.risk-card{margin:0;padding:26px 28px 24px;border-radius:30px;background:var(--paper);display:flex;flex-direction:column;gap:18px}
.risk-card-top{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:600}
.risk-tag{font-size:11px;font-weight:500;color:var(--muted);background:var(--bg);padding:5px 11px;border-radius:999px}
.risk-donut{position:relative;width:min(100%,300px);margin:4px auto 0}
.risk-donut svg{display:block;width:100%;height:auto;overflow:visible}
.risk-track circle,.risk-fill circle{fill:none;stroke-width:24;stroke-linecap:butt}
.risk-track circle{opacity:.16}
.risk-knob{fill:var(--paper);stroke:var(--ink);stroke-width:4;filter:drop-shadow(0 2px 6px #15234e40)}
.risk-center{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.risk-center strong{font-size:64px;font-weight:600;letter-spacing:-.06em;line-height:1;font-variant-numeric:tabular-nums}
.risk-center small{font-size:16px;font-weight:500;letter-spacing:-.02em;color:var(--muted);margin-left:3px}
.risk-level{font-size:14px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-top:8px;color:var(--risk-4);transition:color .3s}
.risk-scale{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;font-size:10px;color:var(--muted);text-align:center}
.risk-scale span{padding-top:8px;border-top:4px solid}
.risk-scale span:nth-child(1){border-color:var(--risk-1)}.risk-scale span:nth-child(2){border-color:var(--risk-2)}.risk-scale span:nth-child(3){border-color:var(--risk-3)}.risk-scale span:nth-child(4){border-color:var(--risk-4)}.risk-scale span:nth-child(5){border-color:var(--risk-5)}
.risk-feet{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.risk-feet>div{padding:14px 16px;border-radius:16px;background:var(--bg)}
.risk-feet span{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.risk-feet i{width:8px;height:8px;border-radius:50%}
.risk-feet i.is-left{background:#b9a7f0}.risk-feet i.is-right{background:#3fb6cf}
.risk-feet strong{display:block;font-size:30px;font-weight:600;letter-spacing:-.05em;margin-top:4px;font-variant-numeric:tabular-nums}
.risk-card figcaption{font-size:12px;color:var(--muted);text-align:center}
@media(max-width:900px){.ulcer-risk{grid-template-columns:1fr;gap:36px}.risk-card{padding:22px 20px}.risk-center strong{font-size:54px}}
