/* SAB Network — shared styles */
:root {
  --tan: #C9B898;        /* coyote tan: page ground */
  --tan-deep: #B8A582;   /* shadowed tan for bands */
  --tan-light: #D8CAAE;  /* raised surfaces: listings */
  --ink: #22241E;        /* field ink: text */
  --olive: #3A3E2C;      /* secondary text, rules */
  --steel: #C4C7BF;      /* the tag */
  --red: #9E2A2B;        /* action color, buttons only */
  --red-dark: #84211F;
  --paper: #EFE9DC;      /* light text on dark */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 36rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tan); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 1.75rem; letter-spacing: .01em; text-decoration: none; line-height: 1; }
.nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.nav .btn { padding: .55rem 1rem; font-size: .95rem; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-family: var(--body); font-size: 1rem;
  padding: .9rem 1.5rem; border-radius: 4px; border: 2px solid var(--ink); line-height: 1.2; cursor: pointer; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--tan); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Type */
h1, h2 { font-family: var(--display); text-transform: uppercase; line-height: .95; margin: 0 0 1rem; }
h1 { font-weight: 900; font-size: clamp(2.75rem, 7vw, 5.5rem); }
h2 { font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .4rem; }
.lede { font-size: 1.2rem; max-width: var(--measure); margin: 0 0 2rem; }
.prose { max-width: var(--measure); }
.wrap.prose { max-width: 72rem; }
.wrap.prose > * { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1.1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.muted { color: var(--olive); }
.page-head { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.band { background: var(--tan-deep); }

/* Home hero */
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; padding-top: 3rem; padding-bottom: 5rem; }
.hero h1 { font-size: clamp(3.25rem, 9vw, 7.5rem); line-height: .88; margin-bottom: 1.75rem; }

.hero > div { min-width: 0; }
.hero-name { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--olive); margin: -1rem 0 1rem; }
.hero-search { max-width: 34rem; margin: 0 0 1.25rem; }
.hero-search label { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: .5rem; }
.hero-search-row { display: flex; gap: .5rem; }
.hero-search input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: .8rem .9rem; }
.hero-search .btn { flex: none; }
.hero-links { margin: 0; font-size: .98rem; }
.hero-links a { font-weight: 700; }

/* The tag: the one bold element */
.tag-stage { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.tag-swing { position: relative; width: 15rem; aspect-ratio: 1 / 1.6; padding: 0; border: 0; background: none;
  cursor: pointer; perspective: 1000px; transform: rotate(-6deg); transform-origin: 50% 0;
  animation: swing 1.6s cubic-bezier(.3,1.6,.5,1) both .2s; -webkit-tap-highlight-color: transparent; }
.tag-swing:focus-visible { outline: 3px solid var(--ink); outline-offset: 8px; border-radius: 2.4rem; }
.tag-swing::after { /* the chain */ content: ""; position: absolute; left: 50%; bottom: calc(100% - 2.05rem); width: 4px; height: 7rem;
  margin-left: -2px; background: radial-gradient(circle, #8E9188 1.6px, transparent 2px) 0 0 / 4px 6px repeat-y; z-index: 2; }
.tag-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,1.35,.5,1); }
.tag-swing[aria-pressed="true"] .tag-inner { transform: rotateY(180deg); }
.tag { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: linear-gradient(155deg, #D9DBD4 0%, var(--steel) 45%, #A9ADA3 100%);
  border-radius: 2.4rem / 2rem;
  box-shadow: inset 0 0 0 3px #B3B6AD, inset 0 0 0 7px #D4D6CF, 6px 10px 0 rgba(34,36,30,.18);
  padding: 3.25rem 1.6rem 1rem; text-align: left; }
.tag-back { transform: rotateY(180deg); background: linear-gradient(205deg, #D9DBD4 0%, var(--steel) 45%, #A9ADA3 100%); }
.tag::before { /* the hole */ content: ""; position: absolute; top: 1.4rem; left: 50%; width: 1.3rem; height: 1.3rem; margin-left: -.65rem;
  border-radius: 50%; background: var(--tan); box-shadow: inset 2px 2px 3px rgba(0,0,0,.3); }
.tag-line { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; color: #4E5149;
  letter-spacing: .06em; line-height: 1.2; font-size: 1.15rem;
  text-shadow: 1px 1px 0 rgba(255,255,255,.55), -1px -1px 0 rgba(0,0,0,.18); }
.tag-line.big { font-size: 2.2rem; line-height: 1; margin-bottom: .5rem; }
.tag-back .tag-line.big { margin: .35rem 0 0; font-size: 1.9rem; }
.tag-front .tag-line { animation: stamp .32s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(1.25s + var(--i) * .2s); }
.tag-hint { margin: 0; font-size: .9rem; font-weight: 600; color: var(--olive); }
@keyframes swing { 0% { transform: rotate(14deg); } 100% { transform: rotate(-6deg); } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.35); } 70% { opacity: 1; transform: scale(.96); } 100% { opacity: 1; transform: scale(1); } }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > div { padding: 0 3rem 0 0; }
.split > div + div { padding: 0 0 0 3rem; border-left: 2px solid var(--olive); }
.split p { max-width: var(--measure); margin: 0 0 1.5rem; }

/* Numbered steps (a real sequence) */
.steps { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 900; font-size: 3.5rem; line-height: 1; margin-bottom: .5rem; color: var(--olive); }
.steps p { margin: 0; }

.steps-4 { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.info-table { width: 100%; border-collapse: collapse; background: var(--tan-light); font-size: 1rem; }
.info-table th, .info-table td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 2px solid var(--tan-deep); }
.info-table th { background: var(--ink); color: var(--paper); font-weight: 700; }
.info-table td:first-child { min-width: 11rem; }

/* Directory filters */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field input, .field select { width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: .65rem .75rem; }
.result-count { margin: 0 0 1.5rem; color: var(--olive); font-size: .95rem; }

/* Listings */
.listings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; }
.listing { background: var(--tan-light); border-left: 6px solid var(--olive); padding: 1.25rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; }
.listing.is-featured { border-left-color: var(--red); }
.listing h3 { margin: 0; font-size: 1.25rem; }
.listing h3 a { text-decoration: none; }
.listing h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.listing .meta { font-size: .92rem; color: var(--olive); margin: 0; }
.listing .tagline { margin: .25rem 0 0; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--ink); }
.badge svg { flex: none; }
.badge-self { font-weight: 600; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; margin: 0 0 1rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.featured-flag { font-size: .85rem; font-weight: 700; color: var(--red); }
.empty { background: var(--tan-light); padding: 2rem; max-width: 40rem; }
.empty p { margin: 0 0 1.25rem; }

/* Profile */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: center; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.logo { width: 7.5rem; height: 7.5rem; object-fit: contain; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; }
.logo-fallback { width: 7.5rem; height: 7.5rem; display: grid; place-items: center; background: var(--olive); color: var(--paper);
  font-family: var(--display); font-weight: 900; font-size: 3rem; border-radius: 4px; }
.profile-head h1 { margin-bottom: .5rem; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.profile-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; padding-bottom: 5rem; }
.facts { background: var(--tan-light); padding: 1.5rem; align-self: start; }
.facts dl { margin: 0 0 1.5rem; }
.facts dt { font-weight: 700; font-size: .9rem; }
.facts dd { margin: 0 0 .9rem; overflow-wrap: anywhere; }
.facts .actions { flex-direction: column; }
.facts .btn { text-align: center; }
.back { display: inline-block; margin-top: 1.5rem; font-weight: 600; }

/* Application form */
.apply-form { max-width: 40rem; }
.apply-form fieldset { border: 0; border-top: 2px solid var(--ink); margin: 0 0 2rem; padding: 1.25rem 0 0; }
.apply-form legend { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; padding: 0 .5rem 0 0; }
.apply-form .field { margin: 0 0 1.1rem; }
.apply-form textarea, .apply-form input[type="file"] { width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: .65rem .75rem; }
.apply-form input[type="file"] { padding: .5rem; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.hint { font-size: .9rem; color: var(--olive); margin: .35rem 0 0; }
.optional { font-weight: 400; color: var(--olive); }
.choice { display: flex; gap: .75rem; align-items: flex-start; background: var(--tan-light); padding: 1rem; margin: 0 0 .75rem; border-radius: 4px; cursor: pointer; }
.choice input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--ink); flex: none; }
.apply-form .check { align-items: flex-start; font-weight: 400; }
.apply-form .check input { margin-top: .2rem; flex: none; }
[aria-invalid="true"] { outline: 3px solid var(--red); outline-offset: 2px; }
.form-error { background: var(--red); color: #fff; font-weight: 700; padding: 1rem 1.25rem; border-radius: 4px; margin: 0 0 1.5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#turnstile { margin: 0 0 1.25rem; }
.apply-done { background: var(--tan-light); border-left: 6px solid var(--ink); padding: 1.5rem 1.75rem; max-width: 40rem; }
@media (max-width: 30rem) { .field-row { grid-template-columns: 1fr; } }

/* Email chooser */
.email-choose { position: relative; display: inline-block; }
.email-choose summary { list-style: none; }
.email-choose summary::-webkit-details-marker { display: none; }
.email-choose summary::after { content: ""; display: inline-block; margin-left: .6rem; border: .32rem solid transparent; border-top-color: currentColor; transform: translateY(.15rem); }
.email-choose[open] summary::after { transform: translateY(-.15rem) rotate(180deg); }
.email-menu { position: absolute; z-index: 5; top: calc(100% + .4rem); left: 0; min-width: 16rem; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: .35rem; display: flex; flex-direction: column; box-shadow: 4px 6px 0 rgba(34,36,30,.2); }
.email-menu a, .email-menu button { display: block; text-align: left; padding: .7rem .85rem; font: inherit; font-weight: 600; color: var(--ink);
  text-decoration: none; background: none; border: 0; border-radius: 3px; cursor: pointer; }
.email-menu a:hover, .email-menu button:hover { background: var(--tan-light); }
.email-menu button { border-top: 2px solid var(--tan-light); border-radius: 0 0 3px 3px; margin-top: .2rem; }

/* Terms page */
.summary-box { background: var(--tan-light); border-left: 6px solid var(--ink); padding: 1.5rem 1.75rem; margin: 0 0 2.5rem; }
.summary-box h2, .toc h2 { font-size: 1.75rem; }
.toc { margin: 0 0 3rem; }
.toc ol { margin: 0; padding-left: 1.4rem; columns: 2; column-gap: 2.5rem; }
.toc li { margin-bottom: .35rem; break-inside: avoid; }
.prose h2[id] { margin-top: 2.75rem; font-size: clamp(1.6rem, 3vw, 2.1rem); scroll-margin-top: 1rem; }
.prose h3 { margin-top: 1.5rem; }
@media (max-width: 52rem) { .toc ol { columns: 1; } }

/* FAQ */
.faq dt { font-weight: 700; margin-top: 1.5rem; }
.faq dd { margin: .3rem 0 0; }

/* Footer */
footer { background: var(--ink); color: var(--paper); }
footer .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
footer .wordmark { font-size: 1.5rem; }
footer p { margin: 0; max-width: 38rem; font-size: .9rem; color: #CFCABC; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .75rem; font-size: .95rem; }
footer :focus-visible { outline-color: var(--paper); }

/* Small screens */
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; padding-top: 1.5rem; padding-bottom: 4rem; }
  .tag-stage { order: -1; padding-top: 4rem; }
  .tag-swing { width: 11.5rem; }
  .tag { padding: 3.4rem 1.1rem 1.1rem; }
  .tag-line { font-size: .88rem; }
  .tag-line.big { font-size: 1.6rem; }
  .tag-back .tag-line.big { font-size: 1.4rem; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split > div, .split > div + div { padding: 0; border-left: 0; }
  .split > div + div { border-top: 2px solid var(--olive); padding-top: 2.5rem; }
  .steps, .steps-4 { grid-template-columns: 1fr; gap: 2rem; }
  .filters { grid-template-columns: 1fr; }
  .profile-body { grid-template-columns: 1fr; }
  .nav { gap: 1rem; }
}
@media (max-width: 30rem) {
  .profile-head { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .tag-swing, .tag-front .tag-line { animation: none; }
  .tag-inner { transition: none; }
}
