:root {
  --ink: #f7f1e4;
  --muted: #aca89f;
  --deep: #0e1110;
  --panel: #171b19;
  --panel-soft: #1d221f;
  --line: #313832;
  --gold: #d6ad58;
  --gold-bright: #f0d488;
  --green: #77bd8c;
  --red: #dc817b;
  --purple: #7f86d9;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 13% 6%, rgba(171, 126, 52, .14), transparent 27rem),
    radial-gradient(circle at 92% 25%, rgba(76, 115, 88, .12), transparent 30rem),
    var(--deep);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 212, 136, .7);
  border-radius: 50% 50% 46% 54%;
  color: var(--gold-bright);
  background: linear-gradient(145deg, #2d291f, #141714);
  font: 700 22px Georgia, serif;
  box-shadow: inset 0 0 20px rgba(214, 173, 88, .12);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav > a, .link-button { color: #c8c5bd; text-decoration: none; font-size: 14px; }
.site-header nav > a:hover, .link-button:hover { color: var(--gold-bright); }
.nav-form { display: inline; margin: 0; }
.link-button, .button-reset { padding: 0; border: 0; background: none; cursor: pointer; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; min-height: calc(100vh - 170px); }
.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: 68px; align-items: center; padding: 92px 0 78px; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.025em; }
h1 { margin-bottom: 22px; font-size: clamp(46px, 6vw, 78px); line-height: 1.01; }
h1 span { color: var(--gold-bright); }
h2 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; }
h3 { margin-bottom: 9px; font-size: 20px; }
.lead { max-width: 700px; color: #c8c5bd; font-size: 19px; }
.status-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c9c7c0;
  background: rgba(255, 255, 255, .025);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.pill-gold, .tag-pending, .tag-warn { color: var(--gold-bright); border-color: rgba(214, 173, 88, .35); background: rgba(214, 173, 88, .08); }
.pill-green, .tag-approved, .tag-ok { color: #a4d8b2; border-color: rgba(119, 189, 140, .3); background: rgba(119, 189, 140, .08); }
.pill-muted, .tag-muted { color: #999; }
.tag-rejected { color: #edaaa5; border-color: rgba(220, 129, 123, .35); background: rgba(220, 129, 123, .08); }

.journey-card, .form-card, .admin-section, .decision-card, .auth-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(31, 36, 33, .96), rgba(20, 23, 21, .96));
  box-shadow: var(--shadow);
}
.journey-card { padding: 30px; transform: rotate(1deg); }
.card-kicker { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.steps { display: grid; gap: 22px; padding: 0; margin: 24px 0 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 13px; align-items: start; }
.steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(214, 173, 88, .3); border-radius: 50%; color: var(--gold-bright); font: 600 14px Georgia, serif; }
.steps strong, .steps small { display: block; }
.steps small { margin-top: 2px; color: var(--muted); }

.application-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 78px; align-items: start; padding: 76px 0 110px; border-top: 1px solid rgba(255, 255, 255, .07); }
.section-intro { position: sticky; top: 32px; }
.section-intro > p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.privacy-note, .bookmark-note, .notification-warning, .notification-ok {
  display: grid;
  gap: 4px;
  padding: 17px 18px;
  border: 1px solid rgba(214, 173, 88, .25);
  border-radius: 12px;
  color: #d9d3c4;
  background: rgba(214, 173, 88, .055);
  font-size: 13px;
}
.privacy-note span, .bookmark-note span, .notification-warning span, .notification-ok span { color: var(--muted); }
.form-card { min-height: 360px; padding: 34px; }
.discord-gate, .empty-state { padding: 45px 20px; text-align: center; }
.discord-gate p, .empty-state p { max-width: 480px; margin: 0 auto 24px; color: var(--muted); }
.discord-logo, .empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 18px; background: rgba(127, 134, 217, .15); color: #b8bcff; font-size: 34px; }
.empty-icon { background: rgba(214, 173, 88, .09); color: var(--gold-bright); }
.identity-strip { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; margin-bottom: 28px; padding: 13px; border: 1px solid rgba(127, 134, 217, .22); border-radius: 12px; background: rgba(127, 134, 217, .07); }
.identity-strip small, .identity-strip strong { display: block; }
.identity-strip small { color: var(--muted); }
.avatar-fallback { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #5865f2; color: white; font-weight: 800; }
.text-button { border: 0; color: #b8bcff; background: none; cursor: pointer; }

.application-form, .stack-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span, .field legend { color: #dedad0; font-size: 13px; font-weight: 750; }
.field em { color: var(--gold); font-size: 10px; font-style: normal; letter-spacing: .08em; text-transform: uppercase; }
.field small { color: #888e89; font-size: 11px; }
input, textarea, select {
  width: 100%;
  border: 1px solid #3a423c;
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #111411;
  padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(214, 173, 88, .7); box-shadow: 0 0 0 3px rgba(214, 173, 88, .09); }
.compact-fieldset { margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.compact-fieldset p { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.choice-row { display: flex; gap: 24px; }
.choice-row label, .check-field { display: flex; align-items: center; gap: 9px; }
.choice-row input, .check-field input { width: auto; accent-color: var(--gold); }
.check-field { align-items: flex-start; color: #c9c5bc; font-size: 13px; }
.check-field input { margin-top: 4px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .12s, filter .12s, border-color .12s; }
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button-primary { color: #15140f; background: linear-gradient(135deg, var(--gold-bright), #c39643); }
.button-secondary { border-color: #485149; color: #eee8dc; background: #252b27; }
.button-discord { color: white; background: #5865f2; }
.button-approve { color: #0b1b10; background: var(--green); }
.button-reject { border-color: rgba(220, 129, 123, .45); color: #f3b2ad; background: rgba(220, 129, 123, .08); }
.error-list { margin-bottom: 24px; padding: 16px 18px; border: 1px solid rgba(220, 129, 123, .35); border-radius: 10px; color: #efbbb6; background: rgba(220, 129, 123, .08); font-size: 13px; }
.error-list ul { margin: 7px 0 0; padding-left: 20px; }
.flash-stack { display: grid; gap: 8px; padding-top: 20px; }
.flash { padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.flash-success { border-color: rgba(119, 189, 140, .35); color: #ace0ba; }
.flash-error { border-color: rgba(220, 129, 123, .35); color: #efaaa5; }
.flash-invite { border-color: rgba(214, 173, 88, .55); color: var(--gold-bright); font-family: ui-monospace, monospace; word-break: break-word; }

.center-panel, .auth-panel { max-width: 650px; margin: 90px auto; padding: 44px; text-align: center; }
.center-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center-panel h1, .auth-panel h1 { font-size: clamp(38px, 6vw, 58px); }
.center-panel > p:not(.eyebrow, .error-code) { color: var(--muted); font-size: 18px; }
.status-orb { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; font-size: 30px; }
.status-pending { color: var(--gold-bright); background: rgba(214, 173, 88, .1); }
.status-approved { color: #ace0ba; background: rgba(119, 189, 140, .1); }
.status-rejected { color: #efaaa5; background: rgba(220, 129, 123, .1); }
.bookmark-note, .admin-note { margin: 24px 0; text-align: left; }
.admin-note { padding: 16px; border-left: 3px solid var(--gold); color: #d5d1c8; background: rgba(214, 173, 88, .05); }
.admin-note p { margin: 5px 0 0; white-space: pre-wrap; }
.error-code { margin-bottom: 4px; color: var(--gold); font: 600 38px Georgia, serif; }
.auth-panel { max-width: 480px; text-align: left; }
.auth-panel > p:not(.eyebrow) { color: var(--muted); }

.admin-heading { display: flex; justify-content: space-between; gap: 32px; align-items: end; padding: 68px 0 38px; }
.admin-heading h1, .review-heading h1 { margin-bottom: 8px; font-size: clamp(42px, 6vw, 64px); }
.admin-heading p:last-child { color: var(--muted); }
.metric-row { display: flex; gap: 10px; }
.metric { display: grid; min-width: 96px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: center; }
.metric strong { font: 500 28px Georgia, serif; }
.metric span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.metric-warn strong { color: var(--gold-bright); }
.notification-warning, .notification-ok { margin-bottom: 24px; }
.notification-ok { border-color: rgba(119, 189, 140, .25); background: rgba(119, 189, 140, .05); }
.admin-section { margin-bottom: 24px; padding: 26px; box-shadow: none; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-title h2, .admin-section h2 { margin: 0; font-size: 28px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 12px; color: #828881; font-size: 10px; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
td { padding: 15px 12px; border-top: 1px solid var(--line); color: #d6d2c9; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 2px; color: #7f857f; }
.table-link { color: var(--gold-bright); text-decoration: none; white-space: nowrap; }
.empty-row { padding: 30px; border: 1px dashed #343b36; border-radius: 10px; color: var(--muted); text-align: center; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compact-form { margin-top: 20px; }
.back-link { display: inline-block; margin-top: 38px; color: var(--muted); text-decoration: none; }
.review-heading { display: flex; justify-content: space-between; align-items: end; padding: 34px 0; }
.review-time { display: grid; text-align: right; }
.review-time small { color: var(--muted); }
.review-grid, .decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-list dl { margin: 18px 0 0; }
.detail-list dl > div { display: grid; grid-template-columns: 165px 1fr; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
blockquote { margin: 20px 0; color: #ded9cf; font: italic 19px/1.6 Georgia, serif; white-space: pre-wrap; }
.account-result { padding: 14px; border-radius: 9px; background: rgba(119, 189, 140, .08); color: #b7d7bf; }
.decision-grid { margin: 0 0 70px; }
.decision-card { padding: 28px; }
.decision-card p:not(.eyebrow) { color: var(--muted); }
.approve-card { border-color: rgba(119, 189, 140, .24); }
.reject-card { border-color: rgba(220, 129, 123, .2); }

footer { width: min(1180px, calc(100% - 40px)); min-height: 84px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, .07); color: #6f746f; font-size: 12px; }

@media (max-width: 900px) {
  .hero, .application-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding: 64px 0; }
  .journey-card { transform: none; }
  .application-grid { padding-top: 55px; }
  .section-intro { position: static; }
  .admin-heading, .review-heading { align-items: flex-start; flex-direction: column; }
  .review-time { text-align: left; }
  .admin-columns, .review-grid, .decision-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .site-header, .page-shell, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  .brand small { display: none; }
  .site-header nav { gap: 14px; }
  h1 { font-size: 43px; }
  .hero { padding: 46px 0; }
  .form-card, .auth-panel, .admin-section, .decision-card { padding: 21px; border-radius: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .metric-row { width: 100%; }
  .metric { flex: 1; min-width: 0; padding: 10px 5px; }
  .detail-list dl > div { grid-template-columns: 1fr; gap: 2px; }
  .identity-strip { grid-template-columns: 40px 1fr; }
  .identity-strip form { grid-column: 2; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
}
