/* Athletics Cook Islands - content components:
   notices, data tables, personal best lists, pathways and forms. */

/* A visible flag for content that is not finished yet. These must all be
   gone before launch - grep for "notice" to find them. */
.notice {
  border-left: 4px solid #e0a800;
  background: #fff9e6;
  padding: 1rem 1.25rem;
  border-radius: 0 10px 10px 0;
  margin: 2rem 0;
}
.notice p:last-child { margin-bottom: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: .95rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table thead th {
  background: var(--muted-bg);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.data-table tbody tr:hover { background: var(--muted-bg); }
.data-table th[scope="row"] { font-weight: 600; }

.pb-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .3rem; }
.pb-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.pb-list span { color: var(--ink-soft); }
.pb-list strong { font-variant-numeric: tabular-nums; }

.pathway {
  list-style: none; counter-reset: step;
  margin: 1.5rem 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.pathway li {
  counter-increment: step;
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1.2rem;
  background: var(--muted-bg); border: 1px solid var(--line);
  border-radius: 999px; font-weight: 700;
}
.pathway li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-700); color: #fff; font-size: .8rem;
}

/* ---------- forms ---------- */
.form { margin-top: 2.5rem; }
.form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0 0 1.75rem;
}
.form legend {
  font-weight: 800; font-size: 1.05rem; padding: 0 .5rem;
}
.field { margin: 0 0 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field label,
.label-like { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field abbr { color: #b3261e; text-decoration: none; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--green-700); }
.field-row { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.hint { color: var(--ink-soft); font-size: .9rem; }

.check { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; font-size: .95rem; }
.check input { margin-top: .3rem; flex: none; width: 18px; height: 18px; accent-color: var(--green-700); }
.check-grid { display: grid; gap: .2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- filters ---------- */
.filters {
  display: grid; gap: 0 1.25rem; align-items: end;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  margin: 2.5rem 0 1rem;
  padding: 1.25rem;
  background: var(--muted-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters .field { margin-bottom: 0; }
.field-reset { display: flex; align-items: flex-end; }
.btn-quiet {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); padding: .7rem 1.2rem;
}
.btn-quiet:hover { border-color: var(--brand); color: var(--green-700); }
.filter-count { color: var(--ink-soft); font-size: .9rem; margin: 0 0 .5rem; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--ink-soft); }
.records-table .mark { font-variant-numeric: tabular-nums; font-weight: 700; }

@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .filters .field:first-child { grid-column: 1 / -1; }
}

/* ---------- athlete photographs ---------- */
.athlete-photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  object-position: center 25%;
  background: var(--muted-bg);
}
.athlete-monogram {
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--green-800), var(--brand));
  color: #fff; font-size: 2.6rem; font-weight: 800; letter-spacing: .03em;
}
.athlete-hero {
  display: grid; gap: 2.5rem;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  align-items: start;
  margin-bottom: 2.5rem;
}
.athlete-hero .athlete-photo,
.athlete-hero .athlete-monogram { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .athlete-hero { grid-template-columns: 1fr; }
  .athlete-hero > figure { max-width: 240px; }
}

/* Honeypot. Hidden from people, visible to the bots that fill everything in. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Flash messages on the public side. */
.flash { padding: 1rem 1.25rem; border-radius: 10px; margin: 0 0 1.5rem; }
.flash-ok  { background: #e8f7ee; border-left: 4px solid var(--brand); }
.flash-bad { background: #fdecea; border-left: 4px solid #b3261e; }

/* ---------- testimonials ---------- */
.quote {
  margin: 2rem 0 2.5rem;
  padding: 2rem;
  background: var(--muted-bg);
  border-left: 5px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote-photo {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin-bottom: 1.25rem;
}
.quote blockquote { margin: 0; font-size: 1.08rem; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { margin-top: 1.25rem; display: flex; flex-direction: column; }
.quote figcaption strong { font-weight: 800; }
.quote figcaption span { color: var(--ink-soft); font-size: .92rem; }

.records-table .wind { font-weight: 400; color: var(--ink-soft); font-size: .85em; }
.records-table .vacant { color: var(--ink-soft); font-style: italic; }
.records-table tr.is-vacant td { background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.015) 8px, rgba(0,0,0,.015) 16px); }
.records-table time { white-space: nowrap; }

/* ---------- about page ---------- */
.value-lead { font-weight: 700; color: var(--ink) !important; }

.priority-list { list-style: none; counter-reset: p; margin: 0; padding: 0; }
.priority-list li {
  counter-increment: p;
  position: relative;
  padding: 0 0 1.75rem 3.5rem;
  border-left: 2px solid var(--line);
  margin-left: 1.1rem;
}
.priority-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.priority-list li::before {
  content: counter(p);
  position: absolute; left: -1.1rem; top: 0;
  display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800;
}
.priority-list h3 { margin-top: .2rem; }
.priority-list p { color: var(--ink-soft); }

.card-link-block { text-decoration: none; color: inherit; }
.card-link-block h3 { color: var(--green-700); }

/* ---------- document lists ---------- */
.doc-list { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: .6rem; }
.doc-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem;
  padding: 1rem 1.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  border-left: 4px solid var(--brand);
}
.doc-list li > a { font-weight: 700; text-decoration: none; }
.doc-list li > a:hover { text-decoration: underline; }
.doc-list li > a::before { content: "\1F4C4"; margin-right: .5rem; }
.doc-list span { color: var(--ink-soft); font-size: .88rem; }

/* ---------- policy pages ---------- */
.policy-meta {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 2rem 0; padding: 1.25rem;
  background: var(--muted-bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.policy-meta dt { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.policy-meta dd { margin: .2rem 0 0; font-weight: 700; }

.policy-contents {
  margin: 2.5rem 0; padding: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.policy-contents h2 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.policy-contents ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.policy-contents li { margin-bottom: .35rem; break-inside: avoid; }
.policy-contents a { text-decoration: none; }
.policy-contents a:hover { text-decoration: underline; }
@media (max-width: 600px) { .policy-contents ol { columns: 1; } }

.policy-section { scroll-margin-top: 96px; padding-top: 1rem; }
.policy-section h2 { font-size: 1.35rem; margin-top: 2rem; }
.policy-section p, .policy-section li { color: var(--ink); }
.policy-section ul { margin-bottom: 1.2rem; }

/* ---------- national teams ---------- */
.team { margin: 3rem 0; }
.team h2 { margin-bottom: .1rem; }
.team .hint { margin-bottom: 1rem; }
.team-officials { color: var(--ink-soft); font-size: .95rem; }

/* ---------- progression charts ---------- */
.progression-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 2.5rem;
}
.progression {
  margin: 0; padding: 1.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.progression figcaption {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem;
  margin-bottom: .5rem;
}
.progression figcaption strong { font-size: 1.05rem; }
.progression figcaption span { color: var(--accent-dark); font-size: .85rem; font-weight: 700; }
.prog-chart { width: 100%; height: auto; overflow: visible; }
.prog-line { stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.prog-dot { fill: #fff; stroke: var(--brand); stroke-width: 2.5; }
.prog-dot-best { fill: var(--brand); }
.prog-mark { font-size: 12px; font-weight: 700; fill: var(--ink); }
.prog-season { font-size: 11px; fill: var(--ink-soft); }

/* ---------- live results ---------- */
.live-panel {
  margin: 2rem 0 3rem; padding: 1.5rem;
  border: 2px dashed var(--brand); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,166,90,.06), transparent);
}
.live-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: .5rem;
}
.live-label::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-soft);
}
.live-panel.is-live { border-style: solid; }
.live-panel.is-live .live-label::before { background: #d92b2b; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.live-panel p:last-child { margin-bottom: 0; }

.pipeline { counter-reset: s; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.pipeline li {
  counter-increment: s; position: relative;
  padding: 0 0 1.25rem 3rem; border-left: 2px solid var(--line); margin-left: .9rem;
}
.pipeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pipeline li::before {
  content: counter(s); position: absolute; left: -.9rem; top: -.15rem;
  display: grid; place-items: center; width: 1.8rem; height: 1.8rem;
  border-radius: 50%; background: var(--green-800); color: #fff;
  font-size: .85rem; font-weight: 800;
}

.records-table .derived {
  font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 4px;
  padding: .05rem .3rem; margin-left: .4rem;
  text-decoration: none; cursor: help; white-space: nowrap;
}
abbr.derived { text-decoration: none; }
