/* YBB team site. Phone first: 375px layouts, 44px targets, visible focus rings, AA contrast or better.
   The tokens below are copied from the website's design system (../../../public/css/site.css, :root).
   The header look must be kept in step with public/css/team.css at the repo root, which draws the same
   header on the two internal pages of the main site. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/poppins-latin-600-normal.woff2") format("woff2");
}

:root {
  /* Brand core */
  --ybb-deep-teal: #2D4554;
  --ybb-warm-gold: #EDB23B;
  --ybb-white: #FFFFFF;

  /* Teal ramp */
  --teal-900: #16232C;
  --teal-800: #1F323E;
  --teal-700: #2D4554;
  --teal-600: #3D5A6C;
  --teal-500: #527387;
  --teal-400: #7B95A5;
  --teal-300: #A6B8C3;
  --teal-200: #CBD8DF;
  --teal-100: #E3EBEF;
  --teal-50:  #F2F6F8;

  /* Gold ramp */
  --gold-700: #9C6C12;
  --gold-600: #C4901F;
  --gold-500: #EDB23B;
  --gold-400: #F3C86F;
  --gold-300: #F8DBA1;
  --gold-200: #FBEACA;
  --gold-100: #FDF6E7;

  /* Warm neutrals */
  --sand-100: #FAF8F5;
  --sand-200: #F1EDE7;
  --ink-900: #141A1F;
  --ink-700: #3A464E;
  --ink-600: #46535C;

  /* Semantic */
  --surface-page: var(--sand-100);
  --surface-card: var(--ybb-white);
  --text-heading: var(--ybb-deep-teal);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-600);
  --text-link: var(--teal-700);
  --border-default: var(--teal-200);
  --focus-ring: var(--gold-600);

  --font-sans: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Status colors (AA on their backgrounds) */
  --ok: #1D6A44;
  --ok-bg: #E7F4EC;
  --bad: #A3261B;
  --bad-bg: #FCECEA;
  --info-bg: var(--teal-50);

  --tap: 44px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-sans); color: var(--text-heading); font-weight: 600; line-height: 1.22; }
h1 { font-size: clamp(1.6rem, 6vw, 2.25rem); margin: 0.4rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.5rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--text-link); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--teal-900); text-decoration-thickness: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--teal-50); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }
.muted { color: var(--text-muted); }
.block { display: block; }

.wrap { max-width: 56rem; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 200;
  background: var(--gold-500); color: var(--teal-900); padding: 12px 20px; font-weight: 600; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.demo-banner { margin: 0; padding: 8px 16px; text-align: center; background: var(--gold-300); color: var(--teal-900); font-size: 0.9rem; }

/* ---------- the shared header ---------- */

.site-header { background: var(--ybb-deep-teal); color: var(--ybb-white); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.site-header :focus-visible { outline-color: var(--gold-500); }
.header-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  max-width: 56rem; margin: 0 auto; padding: 8px 16px;
}
.header-logo {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap);
  color: var(--ybb-white); text-decoration: none; font-weight: 600; font-size: 1.15rem;
}
.header-logo img { height: 36px; width: auto; }
.header-logo:hover { color: var(--gold-400); }
.tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 100px;
  background: var(--gold-500); color: var(--teal-900); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
}
.header-person { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-person form { margin: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.4); color: var(--ybb-white); font-size: 0.9rem;
}
.signout {
  min-height: var(--tap); padding: 0 16px; background: transparent; color: var(--ybb-white);
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 100px; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.signout:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* Tabs: one row under the mark, scrolling sideways when they do not fit. */
.header-tabs { max-width: 56rem; margin: 0 auto; padding: 0 16px; }
.header-tabs ul {
  display: flex; gap: 4px; margin: 0; padding: 0 0 4px; list-style: none;
  overflow-x: auto; white-space: nowrap; scrollbar-width: thin;
}
.header-tabs li { flex: 0 0 auto; }
.header-tabs a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  color: var(--teal-100); text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 7px; font-size: 0.95rem; font-weight: 400;
}
.header-tabs a:hover { color: var(--ybb-white); text-decoration-color: rgba(255, 255, 255, 0.6); }
.header-tabs a[aria-current="page"] { color: var(--ybb-white); font-weight: 600; text-decoration-color: var(--gold-400); }

/* ---------- page ---------- */

main { padding-top: 16px; padding-bottom: 48px; }
main:focus { outline: none; }
.lede { font-size: 1.1rem; color: var(--ink-700); max-width: 40rem; margin-bottom: 1.5rem; }
.crumb { margin: 0 0 4px; }
.crumb a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 600; }
.section { margin-top: 2rem; }
.foot { border-top: 1px solid var(--border-default); background: var(--ybb-white); color: var(--text-muted); font-size: 0.9rem; padding: 16px 0 24px; }
.foot p { margin: 0; }

/* ---------- buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 8px 22px;
  background: var(--ybb-white); color: var(--teal-900);
  border: 2px solid var(--teal-700); border-radius: var(--radius);
  font: inherit; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--teal-50); color: var(--teal-900); }
.button-primary { background: var(--gold-500); border-color: var(--gold-500); color: var(--teal-900); }
.button-primary:hover { background: var(--gold-400); border-color: var(--gold-400); color: var(--teal-900); }
.button-danger { background: var(--bad); border-color: var(--bad); color: var(--ybb-white); }
.button-danger:hover { background: #8A1F16; border-color: #8A1F16; color: var(--ybb-white); }
.button-small { padding: 4px 16px; font-size: 0.95rem; }
.button-block { display: flex; width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- cards, lists ---------- */

.card { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.card > :last-child { margin-bottom: 0; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
.cards .card { margin: 0; }
.tool-card h2 { margin-bottom: 4px; }
.tool-card h2 a { color: var(--text-heading); text-decoration: none; display: inline-block; min-height: var(--tap); line-height: var(--tap); }
.tool-card h2 a:hover { text-decoration: underline; }
.tool-card p { margin: 0; color: var(--ink-700); }
.form-narrow { max-width: 28rem; }

.news { list-style: none; margin: 0; padding: 0; }
.news li { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.news-what { margin: 0 0 2px; color: var(--teal-900); }
.news-meta { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.news-meta a { display: inline-block; min-height: 24px; margin-left: 8px; }

.roster { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.roster .card { margin: 0; }
.person.is-off { background: var(--sand-200); }
.person-name { margin-bottom: 0; }
.person-email, .person-roles { margin: 0 0 4px; }
.person a { display: inline-flex; align-items: center; min-height: var(--tap); }
.badge { display: inline-block; padding: 1px 10px; border-radius: 100px; background: var(--teal-100); color: var(--teal-900); font-size: 0.8rem; font-weight: 600; }

.more { margin: 24px 0; }
.more summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--teal-700); }

ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }
ul.plain li { padding: 4px 0; }

/* ---------- forms ---------- */

.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; color: var(--teal-900); margin-bottom: 6px; padding: 0; }
.field .optional { font-weight: 400; color: var(--text-muted); }
.hint { margin: 0 0 6px; font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
input[type="text"], input[type="email"], textarea {
  display: block; width: 100%; min-height: var(--tap); padding: 10px 12px;
  font: inherit; color: var(--ink-900); background: var(--ybb-white);
  border: 2px solid var(--teal-500); border-radius: 8px;
}
textarea { min-height: 96px; }
.field.has-error input, .field.has-error textarea { border-color: var(--bad); }
.field-error { margin: 0 0 6px; color: var(--bad); font-weight: 600; }
.choices { display: grid; gap: 4px; }
.field .choice, .choice { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 8px 0; font-weight: 400; color: var(--ink-900); cursor: pointer; margin-bottom: 0; }
.choice input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--teal-700); }
.choice strong { font-weight: 600; color: var(--teal-900); }

.or-rule { display: flex; align-items: center; gap: 12px; max-width: 28rem; margin: 4px 0 16px; color: var(--text-muted); }
.or-rule::before, .or-rule::after { content: ""; flex: 1; border-top: 1px solid var(--teal-300); }

/* ---------- notices ---------- */

.notice { border: 1px solid var(--border-default); border-left: 6px solid var(--teal-500); background: var(--info-bg); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.notice > :last-child { margin-bottom: 0; }
.notice-title { font-weight: 600; color: var(--teal-900); margin-bottom: 4px; }
.flash { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--ok-bg); border: 1px solid var(--ok); border-radius: 8px; padding: 8px 16px; margin: 0 0 16px; color: #0F3D28; }
.flash p { margin: 0; flex: 1 1 12rem; }
.flash-mark { font-weight: 600; color: var(--ok); }
.flash-undo { margin: 0; }
.error-summary { background: var(--bad-bg); border: 2px solid var(--bad); border-radius: 8px; padding: 12px 16px; margin: 0 0 20px; color: #5C1710; }
.error-summary:focus { outline: 3px solid var(--bad); outline-offset: 2px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: #5C1710; font-weight: 600; }
.error-summary .notice-title { color: #5C1710; }

/* ---------- dev mailbox ---------- */

.mailbox { list-style: none; padding: 0; margin: 0; }
.mail-meta { margin: 0 0 4px; }
.mail-subject { font-weight: 600; color: var(--teal-900); margin-bottom: 8px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .roster { grid-template-columns: repeat(2, 1fr); }
  .header-top { flex-wrap: nowrap; }
  .lede { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
