/* site.css for pickleinjury.com. The one stylesheet for the whole site.
   Loaded by layout.php with the ?v=YYYYMMDD cache busting query.
   Stoplight tokens are reserved for return-to-play meaning, tool output,
   and form error text. They are never decorative. */

:root {
  /* surfaces and ink */
  --ink: #191636;
  --ink-muted: #5B5884; /* separators and secondary text on light surfaces, 6.6:1 on white */
  --white: #FFFFFF;
  --panel: #F1F1F9;
  --line: #C9C8E0;
  /* brand */
  --indigo-900: #211C5E;
  --indigo-700: #2E2A72;
  --indigo-600: #3D35A9;
  --indigo-100: #E8E7F7;
  --magenta-700: #A61E70;
  --magenta-500: #D6409F;
  --magenta-100: #FBE7F3;
  /* stoplight, reserved for return-to-play meaning only */
  --rtp-red: #B42318;
  --rtp-red-tint: #FEF3F2;
  --rtp-amber: #B54708;
  --rtp-amber-tint: #FFFAEB;
  --rtp-green: #027A48;
  --rtp-green-tint: #ECFDF3;
  /* type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Atkinson Hyperlegible", Verdana, sans-serif;
  /* type scale, equal to the literals the site shipped with (13px floor, 14px labels, 18px body) */
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-body: 1.125rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: 1.75rem;
  --fs-h1: clamp(2.25rem, 5vw, 3.5rem);
  --fs-display: 3rem;
  --lh-body: 1.65;
  /* rhythm */
  --space-1: 4px;  --space-2: 8px;   --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px;  --space-7: 48px; --space-8: 64px;
  --space-9: 96px;
  --radius: 4px;
  --radius-chip: 2px;
  --container: 1200px;
  --measure: 720px;
}

/* Base and floors. html 100 percent, body 18px over 1.65, nothing below
   13px anywhere, 14px working minimum for labels, nav 16px. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--white);
}
img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font-display); color: var(--indigo-700); margin: 0 0 var(--space-4); }
h1 { font-weight: 700; font-size: var(--fs-h1); line-height: 1.08; text-wrap: balance; }
h2 { font-weight: 700; font-size: var(--fs-h2); line-height: 1.15; text-wrap: pretty; }
h3 { font-weight: 600; font-size: var(--fs-h3); line-height: 1.25; text-wrap: pretty; }
p, ul, ol { margin: 0 0 var(--space-4); }
.lead { font-size: var(--fs-lead); line-height: 1.6; text-wrap: pretty; }
.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-sm);
}
sup.cite { font-size: 0.75em; line-height: 0; }
sup.cite a { text-decoration: none; }

a { color: var(--indigo-600); }
a:hover { text-decoration-thickness: 2px; }
/* Body-copy links only (unclassed anchors): visited darkens one step, active one more, same hue. */
a:not([class]):visited { color: var(--indigo-700); }
a:not([class]):active { color: var(--indigo-900); }

/* Tables: ruled rows in the card-border line, display type in the header row, no zebra. */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-5);
  font-size: var(--fs-base);
}
main th, main td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid var(--line);
}
main th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--indigo-700);
  border-bottom: 3px solid var(--indigo-700);
}
main td:first-child { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--indigo-600);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--indigo-700);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Layout: 1200px container with 20px gutters, 720px article measure,
   64px section padding dropping to 48px under 768px. */
.container { max-width: var(--container); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.measure { max-width: var(--measure); }
.band { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.band-indigo { background: var(--indigo-900); color: var(--white); }
.band-indigo h1, .band-indigo h2, .band-indigo h3 { color: var(--white); }
.band-indigo a { color: var(--white); }
.band-indigo :focus-visible { outline-color: var(--white); }
.band-panel { background: var(--panel); }
.band-magenta-tint { background: var(--magenta-100); }
.band-indigo-tint { background: var(--indigo-100); }

/* Court-line rule: 3px indigo above each h2 on white sections. */
main h2 {
  border-top: 3px solid var(--indigo-700);
  padding-top: var(--space-3);
}
.band-indigo h2, .rtp-banner h2, .no-rule h2, h2.no-rule { border-top: 0; padding-top: 0; }

/* Buttons: 48px minimum touch target, 4px radius, no shadows. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-base);
  text-decoration: none;
  cursor: pointer;
  border: 0;
}
.btn:active { translate: 0 1px; }
.btn-primary { background: var(--magenta-700); color: var(--white); }
.btn-primary:hover, .btn-primary:active { background: #981C67; }
.btn-primary:visited { color: var(--white); }
.btn-secondary {
  background: var(--white);
  border: 2px solid var(--indigo-600);
  color: var(--indigo-600);
}
.btn-secondary:hover, .btn-secondary:active { background: var(--indigo-100); }
.btn-secondary:visited { color: var(--indigo-600); }

/* Header: selector-first, sticky, white, 2px line bottom. */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 2px solid var(--line);
  z-index: 50;
}
.header-deck1 {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1;
  color: var(--ink);
}
.brand-sub { display: block; font-size: var(--fs-sm); color: var(--ink); }
.hurt-selector { flex: 1 1 auto; max-width: 360px; margin: 0; }
.hurt-selector label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: var(--space-1); }
.hurt-row { display: flex; gap: var(--space-2); }
.hurt-row select {
  flex: 1 1 auto;
  min-height: 48px;
  border: 2px solid var(--indigo-700);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--white);
  padding: 0 var(--space-2);
  margin: 0;
}
.hurt-row .btn { min-width: 64px; }
.header-cta { margin-left: auto; flex: none; }
.nav-toggle {
  display: none;
  min-height: 48px;
  min-width: 48px;
  border: 2px solid var(--indigo-700);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--indigo-700);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-base);
  cursor: pointer;
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--indigo-100); }
.header-deck2 { border-top: 1px solid var(--line); }
.nav-rail { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.nav-rail a {
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--ink);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 3px solid transparent;
}
.nav-rail a:hover, .nav-rail a:active { color: var(--indigo-600); }
.nav-rail a[aria-current] { border-bottom-color: var(--indigo-700); color: var(--indigo-700); }

/* Breadcrumbs: 14px, muted separator, links padded to a comfortable inline target. */
.breadcrumbs { padding: var(--space-3) 0; font-size: var(--fs-sm); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--ink-muted); }
.breadcrumbs a { display: inline-block; padding: var(--space-1) 0; }

/* Stat tile: white card, 2px line border, tabular numerals, three up. */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.stat-tile {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.stat-numeral {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-display);
  line-height: 1.1;
  color: var(--indigo-700);
}
.stat-label { font-size: var(--fs-base); }

/* Injury card: whole card is the link, duotone icon, hover border only. */
.injury-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-5); }
.injury-card {
  display: block;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--ink);
}
.injury-card:hover { border-color: var(--indigo-600); }
.injury-icon { display: block; width: 32px; height: 32px; margin-bottom: var(--space-2); }
.injury-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  color: var(--indigo-700);
  margin-bottom: var(--space-1);
}
.injury-hook { display: block; font-size: var(--fs-base); }

/* RTP status banner: the only stoplight surface outside tools and form
   errors. Full width strip, 6px left rule, state word in display type. */
.rtp-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-left: 6px solid;
  border-radius: var(--radius);
  margin: var(--space-5) 0;
}
.rtp-banner .rtp-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rtp-banner.rtp-red { background: var(--rtp-red-tint); border-left-color: var(--rtp-red); }
.rtp-banner.rtp-red .rtp-word { color: var(--rtp-red); }
.rtp-banner.rtp-amber { background: var(--rtp-amber-tint); border-left-color: var(--rtp-amber); }
.rtp-banner.rtp-amber .rtp-word { color: var(--rtp-amber); }
.rtp-banner.rtp-green { background: var(--rtp-green-tint); border-left-color: var(--rtp-green); }
.rtp-banner.rtp-green .rtp-word { color: var(--rtp-green); }
.rtp-banner .rtp-meaning { color: var(--ink); }

/* Tool result states reuse the stoplight tokens in their semantic home. */
.tool-result.rtp-red { background: var(--rtp-red-tint); border-left: 6px solid var(--rtp-red); }
.tool-result.rtp-amber { background: var(--rtp-amber-tint); border-left: 6px solid var(--rtp-amber); }
.tool-result.rtp-green { background: var(--rtp-green-tint); border-left: 6px solid var(--rtp-green); }
.tool-result { padding: var(--space-4) var(--space-5); border-radius: var(--radius); }

/* FAQ accordion: native details and summary, no JS required. */
.faq-item { border-bottom: 2px solid var(--line); }
.faq-item summary {
  font-weight: 700;
  font-size: var(--fs-body);
  padding: var(--space-4) var(--space-7) var(--space-4) 0;
  cursor: pointer;
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  color: var(--magenta-700);
  transition: rotate 0.15s ease;
}
.faq-item[open] summary::after { rotate: 45deg; }
.faq-answer { padding-bottom: var(--space-4); max-width: var(--measure); }

/* Tool panel: cool panel, indigo border, labels above inputs. */
.tool-panel {
  background: var(--panel);
  border: 2px solid var(--indigo-700);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.tool-panel label, form label { display: block; font-weight: 700; font-size: var(--fs-base); margin-bottom: var(--space-1); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--indigo-700); /* same frame as the header selector; 12:1 against white and panel */
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  min-height: 48px;
  width: 100%;
  margin-bottom: var(--space-4);
}
textarea { min-height: 120px; }
input:hover, select:hover, textarea:hover { border-color: var(--indigo-600); }
input:focus, select:focus, textarea:focus { border-color: var(--indigo-600); }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
/* Form error text may use the stoplight red because an error message is
   not decorative. */
.field-error, .form-error { color: var(--rtp-red); font-weight: 700; font-size: var(--fs-base); }

/* Cite this page box. */
.cite-box {
  background: var(--indigo-100);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.cite-line { font-family: var(--font-display); font-size: var(--fs-body); }

/* Inline SVG charts: axis labels 14px, no library, values at bar ends. */
.chart text { font-family: var(--font-body); font-size: var(--fs-sm); fill: var(--ink); }
.chart-takeaway { max-width: var(--measure); }

/* Reviewer block. */
.reviewer-block {
  background: var(--panel);
  border-left: 3px solid var(--indigo-700);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  font-size: var(--fs-base);
}
.reviewer-block p { margin: 0; }

/* Red flag box: emergency guidance, brand ink and indigo, not stoplight. */
.red-flag-box {
  background: var(--white);
  border: 3px solid var(--indigo-900);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}
.red-flag-box h2 {
  border-top: 0;
  padding-top: 0;
  font-size: var(--fs-h3);
  color: var(--indigo-900);
}

/* Key West Concierge Orthopedics call to action. */
.kwco-cta {
  background: var(--indigo-100);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}
.kwco-cta h2 { border-top: 0; padding-top: 0; }
.kwco-cta .cta-contact { font-weight: 700; }

/* CourtReady band. */
.courtready-band { text-align: left; }
.courtready-band .band-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); }
.courtready-band p { margin: 0; max-width: var(--measure); }
.courtready-band h2 { margin: 0; }

/* Playability widget: brand colors only, weather is not a stoplight. */
.playability-widget {
  background: var(--panel);
  border: 2px solid var(--indigo-700);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.play-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-display);
  color: var(--indigo-700);
  line-height: 1.1;
}
.play-band { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); color: var(--magenta-700); }
.play-place { font-weight: 700; }
.play-lines { list-style: none; padding: 0; margin: var(--space-4) 0 0; }
.play-lines li { margin-bottom: var(--space-2); }
.play-joints { font-weight: 700; }
.play-credit { font-size: var(--fs-sm); margin-top: var(--space-4); }

/* Sources list. */
.sources-list { font-size: var(--fs-base); }
.sources-list li { margin-bottom: var(--space-2); }
.sources-list li:target { background: var(--indigo-100); }

/* Footer: indigo-900 color block. */
.site-footer { background: var(--indigo-900); color: var(--white); margin-top: var(--space-8); }
.site-footer a { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--white); }
.footer-groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}
.footer-groups h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lead);
  color: var(--magenta-500);
  border-top: 0;
  padding-top: 0;
  margin-bottom: var(--space-3);
}
.footer-groups ul { list-style: none; margin: 0; padding: 0; }
.footer-groups li { margin-bottom: var(--space-2); font-size: var(--fs-base); }
.footer-brand { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.footer-brand .brand-name { color: var(--white); }
.footer-mission, .footer-credential { font-size: var(--fs-base); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--fs-base);
}

/* Error page. */
.error-page { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.error-page ul { list-style: none; padding: 0; }
.error-page li { margin-bottom: var(--space-2); }

/* Split text-and-tool hero and card grid variants. */
.hero-split { display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-6); align-items: center; }
.band-indigo .tool-panel { color: var(--ink); }
.band-indigo .tool-panel h2, .band-indigo .tool-panel h3 { color: var(--indigo-700); }
.band-indigo .tool-panel a { color: var(--indigo-600); }
.band-indigo .tool-panel :focus-visible { outline-color: var(--indigo-600); }
.injury-grid-6, .injury-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Breakpoints. Under 480 single column; 480 to 767 two up cards;
   768 to 1023 condensed header; 1024 and up full construction. */
@media (max-width: 1023px) {
  .header-deck1 { flex-wrap: wrap; }
  .hurt-selector { order: 3; flex-basis: 100%; max-width: none; }
  .injury-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-split { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .band { padding-top: var(--space-7); padding-bottom: var(--space-7); }
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .header-deck2 { display: none; }
  .header-deck2.open { display: block; }
  .nav-rail { flex-direction: column; gap: 0; }
  .nav-rail a { padding: var(--space-3) 0; min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
  .nav-rail a[aria-current] { border-bottom: 1px solid var(--line); border-left: 3px solid var(--indigo-700); padding-left: var(--space-3); }
  .stat-grid { grid-template-columns: 1fr; }
  .injury-grid, .injury-grid-6, .injury-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
  .injury-grid, .injury-grid-6, .injury-grid-3 { grid-template-columns: 1fr; }
  .footer-groups { grid-template-columns: 1fr; }
  .hurt-row { flex-direction: column; }
  main th, main td { padding: var(--space-2); }
}

/* Print: guides and tool results print cleanly, chrome suppressed. */
@media print {
  .site-header, .site-footer, .nav-toggle, .courtready-band, .kwco-cta,
  .skip-link, .btn { display: none !important; }
  body { color: #000; background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: none; }
  main { max-width: none; }
}

/* Reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
