:root {
  --ink: #121814;
  --paper: #f2f0ea;
  --paper-2: #e4e1d8;
  --surface: #fffcf8;
  --pine: #14352d;
  --pine-2: #0c2420;
  --pine-3: #1b4a40;
  --brass: #c9a227;
  --brass-2: #8f7018;
  --clay: #b42318;
  --muted: #5c6560;
  --line: rgba(18, 24, 20, 0.09);
  --ring: rgba(20, 53, 45, 0.28);
  --shadow: 0 1px 2px rgba(18, 24, 20, 0.05), 0 16px 40px rgba(20, 53, 45, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 4rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(201, 162, 39, 0.16), transparent 55%),
    radial-gradient(800px 380px at -10% 0%, rgba(20, 53, 45, 0.1), transparent 50%),
    var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pine-3); }
a:hover { color: var(--pine); }
img { max-width: 100%; }
:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}
::selection { background: rgba(20, 53, 45, 0.16); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--pine); color: white; padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 40; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.muted { color: var(--muted); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; }

.site-header {
  background: color-mix(in srgb, var(--pine) 88%, transparent);
  color: #f6f3ea;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.04em;
}
.brand:hover { color: inherit; }
.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--brass), #a07d1c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand-tld { color: var(--brass); font-weight: 600; }
.nav { display: flex; gap: .2rem; flex: 1; }
.nav a, .site-footer a { color: inherit; text-decoration: none; }
.nav a {
  opacity: .78;
  font-weight: 500;
  font-size: .92rem;
  padding: .4rem .7rem;
  border-radius: 8px;
}
.nav a:hover, .nav a.is-on {
  opacity: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.header-actions { display: flex; gap: .5rem; align-items: center; }
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(246, 243, 234, 0.28);
  border-radius: 8px;
  overflow: hidden;
  margin-right: .15rem;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f6f3ea;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .32rem .55rem;
  cursor: pointer;
  opacity: .7;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button.is-on {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: var(--brass);
}
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(246, 243, 234, 0.28);
  border-radius: 8px;
  overflow: hidden;
  margin-right: .15rem;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f6f3ea;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .32rem .55rem;
  cursor: pointer;
  opacity: .7;
}
.lang-switch button:hover { opacity: 1; }
.lang-switch button.is-on {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: var(--brass);
}
.inline-form { display: inline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  padding: .55rem 1.05rem;
  border-radius: var(--radius-sm);
  letter-spacing: -0.01em;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { color: inherit; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--brass); color: var(--pine-2); }
.btn-gold:hover { background: #d8b445; color: var(--pine-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--pine) 35%, var(--line)); background: rgba(20, 53, 45, 0.04); color: var(--ink); }
.site-header .btn-ghost {
  color: #f6f3ea;
  border-color: rgba(246, 243, 234, 0.28);
}
.site-header .btn-ghost:hover { border-color: var(--brass); color: var(--brass); background: transparent; }
.btn-pine { background: var(--pine); color: #f6f3ea; }
.btn-pine:hover { background: var(--pine-2); color: #f6f3ea; }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-quiet:hover { background: var(--surface); color: var(--ink); }
.btn-danger {
  background: transparent;
  color: var(--clay);
  border: 1px solid color-mix(in srgb, var(--clay) 45%, white);
}
.btn-danger:hover { background: #fbeaea; color: var(--clay); }
.btn-wide { width: 100%; }
.btn-sm { padding: .32rem .7rem; font-size: .8rem; font-weight: 600; }

main { flex: 1; }

.hero {
  padding: 4.2rem 0 2.4rem;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2.4rem;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  color: var(--brass-2);
  font-weight: 700;
  margin: 0 0 .7rem;
}
h1, h2, h3, .serif {
  font-family: Fraunces, "Times New Roman", serif;
  letter-spacing: -0.035em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.15rem, 5vw, 3.45rem); line-height: 1.06; margin: 0 0 1rem; font-weight: 650; }
h2 { font-size: 1.55rem; margin: 0 0 .75rem; font-weight: 600; }
h3 { font-weight: 600; }
.hero-card {
  background: var(--pine);
  color: #f6f3ea;
  padding: 1.5rem 1.55rem 1.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.28), transparent 70%);
  pointer-events: none;
}
.hero-card .eyebrow { color: var(--brass); }
.hero-card ol, .step-list { margin: .2rem 0 0; padding: 0; list-style: none; display: grid; gap: .85rem; position: relative; }
.step-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .75rem;
  align-items: start;
}
.step-n {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--pine-2);
  background: var(--brass);
  border-radius: 6px;
  height: 1.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-actions { display: flex; gap: .65rem; margin-top: 1.5rem; flex-wrap: wrap; }

.pitch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0 0 2.2rem;
}
.pitch article {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
}
.pitch strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.pitch span { color: var(--muted); font-size: .9rem; }

.section { padding: 0.6rem 0 3.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.15rem; flex-wrap: wrap; }
.section-head a { font-weight: 650; font-size: .92rem; }

.grid-3, .grid-2 { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: border-color .15s ease, box-shadow .15s ease;
}
a.card, .card:has(> h3 a), .card:has(a.stretched) { text-decoration: none; color: inherit; }
.card:hover { border-color: color-mix(in srgb, var(--pine) 22%, var(--line)); box-shadow: var(--shadow); }
.card a.stretched { color: inherit; text-decoration: none; }
.card h3 { margin: 0 0 .35rem; font-size: 1.22rem; }
.kicker { font-size: .75rem; color: var(--brass-2); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .4rem; font-weight: 700; }

.page-head { padding: 2.4rem 0 1rem; }
.prose { max-width: 42rem; }
.prose p { white-space: pre-wrap; }
.meta { font-size: .88rem; color: var(--muted); }
.card-actions { margin-top: .85rem; }

.form-card {
  max-width: 28rem;
  margin: 2.2rem auto 4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.form-card-wide { max-width: 42rem; }
.form-card h1 { font-size: 2rem; }
.form-follow { margin-top: 1.05rem; }
label { display: block; font-weight: 650; margin: 1rem 0 .3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  font: inherit;
  padding: .7rem .8rem;
  border: 1px solid #d5d0c5;
  background: #fff;
  border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 4px var(--ring);
}
.errorlist, .errornote { color: var(--clay); padding-left: 1rem; }
.helptext { color: var(--muted); font-size: .85rem; }
.qr-box { background: #fff; padding: 1rem; display: inline-block; margin: .5rem 0 1rem; border-radius: 12px; border: 1px solid var(--line); }
.break-all { word-break: break-all; font-size: .8rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: rgba(20, 53, 45, 0.035); }
.table .is-you, .standings .is-you { font-weight: 700; color: var(--pine); }

.flashes { padding-top: 1.1rem; display: grid; gap: .5rem; }
.flash {
  padding: .75rem 1rem;
  background: #f4ead0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brass) 35%, transparent);
  margin: 0;
}
.flash-error, .flash-danger { background: #f8e4e0; border-color: color-mix(in srgb, var(--clay) 30%, transparent); }
.flash-success { background: #dcebe4; border-color: color-mix(in srgb, var(--pine) 25%, transparent); }

.site-footer {
  background: var(--pine-2);
  color: #d9d4c8;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: .92rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer .muted { color: #9aa39e; }
.site-footer a:hover { color: var(--brass); }

.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2.5rem 0 1rem;
}
.profile-hero .avatar-natural {
  margin: 0;
  max-width: min(100%, 28rem);
}
.avatar {
  width: 7.25rem;
  height: 7.25rem;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid var(--brass);
  background: var(--pine);
}
.avatar-sm { width: 4.5rem; height: 4.5rem; margin-bottom: .4rem; }
.avatar-xs { width: 2.6rem; height: 2.6rem; border-radius: 10px; margin: 0; }
.avatar-natural {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: .6rem 0 1rem;
  border-radius: 18px;
  border: 2px solid var(--brass);
  background: var(--pine);
}
.person-cell, .person-head {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.person-head { align-items: flex-start; margin-bottom: .35rem; }
.person-head .avatar-sm { margin-bottom: 0; }
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-family: Fraunces, Georgia, serif;
  font-size: 2rem;
  font-weight: 650;
}
.lema { font-size: 1.2rem; margin: .2rem 0 .6rem; color: var(--pine); }
.fame { margin-top: .7rem; }
.fame-narrow { max-width: 28rem; }
.fame-track {
  height: .4rem;
  background: rgba(18, 24, 20, 0.1);
  border-radius: 99px;
  overflow: hidden;
}
.fame-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--pine-3), var(--brass));
  border-radius: inherit;
}

.tab-nav {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin: 0 0 1.2rem;
  padding: .25rem;
  background: rgba(20, 53, 45, 0.05);
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
}
.tab-nav a {
  text-decoration: none;
  color: var(--ink);
  border: 0;
  padding: .42rem .95rem;
  border-radius: 10px;
  font-weight: 650;
  font-size: .9rem;
  background: transparent;
}
.tab-nav a:hover { background: var(--surface); color: var(--ink); }
.tab-nav a.is-on {
  background: var(--pine);
  color: #f6f3ea;
}
.market-filter {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.2rem;
  max-width: 22rem;
}
.market-filter label { margin: 0; }
.market-filter select { width: auto; min-width: 12rem; }
.actions-inline { display: flex; flex-wrap: wrap; gap: .35rem; }
.actions-inline form { margin: 0; }
.stack-form { margin-bottom: 1rem; }
.effect-list { list-style: none; padding: 0; margin: .4rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .35rem .8rem; }
.effect-list li { font-size: .85rem; font-weight: 650; }
.effect-pos { color: var(--pine-3); }
.effect-neg { color: var(--clay); }
.staff-sub { font-size: 1rem; margin: 1rem 0 .4rem; }
.span-2 { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
.table-dense th, .table-dense td { font-size: .86rem; padding: .5rem .35rem; vertical-align: top; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem .7rem;
  margin: .55rem 0 .7rem;
  font-size: .88rem;
}
.stat-grid span { display: flex; justify-content: space-between; gap: .4rem; border-bottom: 1px solid var(--line); padding-bottom: .15rem; }
.stat-grid em { font-style: normal; color: var(--muted); font-weight: 500; }
.stat-grid small { color: var(--muted); font-size: .78rem; }
.skill-list { list-style: none; padding: 0; margin: .25rem 0 .4rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.skill-list li {
  font-size: .75rem;
  font-weight: 650;
  padding: .15rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.standings { margin: .2rem 0 0; padding-left: 1.15rem; }
.standings li { margin: .28rem 0; }

.notice { margin-bottom: 1rem; }

.board-list, .topic-list { display: grid; gap: 0.75rem; }
a.board-row { text-decoration: none; color: inherit; display: block; }
a.board-row:hover h3 { color: var(--pine); }
.forum-post + .forum-post { margin-top: 0.75rem; }
.forum-post .prose { white-space: pre-wrap; }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1.2rem; }

@media (max-width: 860px) {
  .hero, .grid-3, .grid-2, .profile-hero, .pitch { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; padding: .55rem 0 .2rem; gap: .7rem; }
  .nav { order: 3; width: 100%; padding-bottom: .55rem; overflow-x: auto; }
  .tab-nav { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
