:root {
  --bg: #f4f1ed;
  --surface: #fdfbf8;
  --text: #000000;
  --muted: #5f5751;
  --border: #ddd5ce;
  --accent: #b3472f;
  --accent-strong: #8e3522;
  --link: #7a2618;
  --link-hover: #5f1b11;
  --max-width: 72rem;
  --sans: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 90% -10%, rgba(166, 152, 140, 0.2) 0%, transparent 62%),
    radial-gradient(1050px 520px at -8% -12%, rgba(145, 132, 120, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #f8f4f1 0%, var(--bg) 42%);
  font-family: var(--sans);
  line-height: 1.62;
}

img { max-width: 100%; display: block; }

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover { color: var(--link-hover); }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.niners-toggle {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.niners-toggle:hover { color: var(--link-hover); }

.niners-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, .site-nav { font-family: var(--sans); }

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.4rem 0.7rem;
  border-radius: 0.25rem;
  text-decoration: none;
}

.skip-link:focus { top: 0.5rem; }

.site-header, main, .site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header { padding: 1.6rem 0 1.25rem; }

.header-inner {
  position: relative;
  border: 1px solid #d9d1ca;
  border-radius: 1rem;
  background:
    linear-gradient(120deg, rgba(179, 71, 47, 0.08) 0%, rgba(179, 71, 47, 0) 45%),
    var(--surface);
  box-shadow: 0 16px 30px rgba(76, 63, 52, 0.14);
  padding: 1.5rem 1.5rem 1.35rem;
  overflow: hidden;
}

.header-inner::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(179, 71, 47, 0.26) 0%, rgba(179, 71, 47, 0) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 1.2rem 2rem;
  align-items: center;
}

.hero-copy { position: relative; z-index: 1; }
.hero-photo-wrap { margin: 0; justify-self: end; position: relative; z-index: 1; }
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid #ddd5cf;
  border-radius: 0.9rem;
  background: #f1ece7;
}
.hero-photo {
  position: relative;
  border-radius: 0.9rem;
  border: 1px solid #d4ccc5;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.eyebrow {
  margin: 0;
  color: #6b625c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

h1 { margin: 0; }

.display-name {
  margin: 0.25rem 0 0.65rem;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.display-name span {
  display: block;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 4.15rem);
}

.display-name span:last-child { color: #b3472f; }

.dek {
  margin: 0 0 1.05rem;
  max-width: 48ch;
  color: #443d37;
  font-size: 1.04rem;
}

.focus-kicker {
  margin: 0 0 0.95rem;
  color: #5a524c;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.focus-kicker strong { color: #322c27; font-weight: 700; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  margin-bottom: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid #d3cbc4;
  border-radius: 999px;
  background: rgba(253, 251, 249, 0.95);
  padding: 0.2rem 0.62rem;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  border-color: #c88773;
  background: #f7efec;
  color: var(--accent);
}

main { padding: 0.5rem 0 2.5rem; }

section {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
section:first-of-type { border-top: 0; }

.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: 1.3rem;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 0.16rem;
  margin-top: 0.36rem;
  border-radius: 999px;
  background: var(--accent);
}

.section-body { max-width: 70ch; }
.prose p { margin: 0 0 0.9rem; }

.bandit-figure { margin: 0.6rem 0 0; width: fit-content; }
.bandit-figure img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid #d3cbc4;
  box-shadow: 0 8px 18px rgba(78, 66, 56, 0.13);
}

.split-layout {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: start;
}

.work-groups {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.work-group {
  border: 1px solid #dfd7d0;
  border-radius: 0.5rem;
  background: #fdfbf9;
  overflow: hidden;
}

.work-group summary {
  list-style: none;
  margin: 0;
  padding: 0.68rem 0.85rem;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #4c443e;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.work-group summary::-webkit-details-marker { display: none; }

.work-group summary:hover {
  background: #f6f1ec;
}

.work-group summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--accent-strong);
  transition: transform 120ms ease;
}

.work-group[open] summary {
  border-bottom: 1px solid #e1dad3;
  background: #f6f2f0;
}

.work-group[open] summary::before { transform: rotate(90deg); }

.work-group .link-list { padding: 0.65rem 0.85rem 0.85rem 1.85rem; }
.work-group .link-list li:last-child { margin-bottom: 0; }

.link-list { margin: 0; padding-left: 1.1rem; }
.link-list li { margin-bottom: 0.5rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  font-size: 0.92rem;
}

html.theme-49ers {
  --bg: #aa0000;
  --surface: #ffffff;
  --text: #000000;
  --muted: #000000;
  --border: #000000;
  --accent: #aa0000;
  --accent-strong: #aa0000;
  --link: #aa0000;
  --link-hover: #000000;
}

html.theme-49ers body {
  background:
    repeating-linear-gradient(
      -45deg,
      #aa0000 0 28px,
      #b3995d 28px 56px,
      #aa0000 56px 84px
    );
}

html.theme-49ers .site-header,
html.theme-49ers main,
html.theme-49ers .site-footer {
  background: #ffffff;
  border-left: 4px solid #000000;
  border-right: 4px solid #000000;
}

html.theme-49ers .site-header {
  border-top: 4px solid #000000;
}

html.theme-49ers .site-footer {
  border-bottom: 4px solid #000000;
}

html.theme-49ers .header-inner {
  border: 4px solid #aa0000;
  background: #b3995d;
  box-shadow: 0 0 0 4px #000000;
}

html.theme-49ers .header-inner::after {
  background: #aa0000;
}

html.theme-49ers .hero-photo-wrap::before {
  border-color: #000000;
  background: #ffffff;
}

html.theme-49ers .hero-photo {
  border-color: #000000;
}

html.theme-49ers .display-name span:last-child {
  color: #aa0000;
}

html.theme-49ers .eyebrow { color: #000000; }
html.theme-49ers .dek { color: #000000; }
html.theme-49ers .focus-kicker { color: #000000; }
html.theme-49ers .focus-kicker strong { color: #aa0000; }

html.theme-49ers .site-nav a {
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
}

html.theme-49ers .site-nav a:hover,
html.theme-49ers .site-nav a[aria-current="true"] {
  border-color: #aa0000;
  background: #b3995d;
  color: #aa0000;
}

html.theme-49ers .bandit-figure img {
  border-color: #000000;
  box-shadow: 0 0 0 3px #b3995d;
}

html.theme-49ers .work-group {
  border: 2px solid #000000;
  background: #ffffff;
}

html.theme-49ers .work-group summary {
  color: #000000;
  background: #ffffff;
}

html.theme-49ers .work-group summary:hover {
  background: #b3995d;
}

html.theme-49ers .work-group[open] summary {
  border-bottom-color: #aa0000;
  background: #b3995d;
}

@media (max-width: 59rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { max-width: 280px; }
}

@media (max-width: 47rem) {
  .site-header, main, .site-footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .header-inner { padding: 1rem; }
  section { padding: 1.5rem 0; }
  .split-layout { grid-template-columns: 1fr; }
}
