/* The sponsor service's one stylesheet, in the Agent Window's "Hall of Asgard" look: dark basalt, a hex rune-grid, frosted
   glass panels with a gold-to-ice edge, Cinzel headings. Every asset is served from here (assets/), never a third party. */
@font-face { font-family: "Cinzel"; src: url("/assets/fonts/Cinzel.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter Variable"; src: url("/assets/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --stone: #060609; --basalt: #0d0c11; --iron: #16141b; --iron-2: #201d26;
  --glass: rgba(17, 15, 22, 0.72); --glass-2: rgba(25, 22, 31, 0.8);
  --line: rgba(214, 186, 128, 0.14); --line-2: rgba(214, 186, 128, 0.3);
  --gold: #c9a24a; --gold-2: #e6c878; --gold-3: #f6e2a8; --ice: #8fd0ee; --ice-2: #bfe6f7;
  --bone: #f4efe6; --bone-2: #cbc3b4; --muted: #a39b8e;
  --good: #6fd384; --bad: #f08a7a;
  --radius: 14px;
  --sans: "Inter Variable", system-ui, "Segoe UI", sans-serif;
  --serif: "Cinzel", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--stone); }
body { margin: 0; min-height: 100vh; color: var(--bone); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, input, select, label { -webkit-tap-highlight-color: rgba(201, 162, 74, 0.2); touch-action: manipulation; }
a { color: var(--gold-2); text-decoration-color: rgba(230, 200, 120, 0.4); text-underline-offset: 3px; }
a:hover { color: var(--gold-3); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
::selection { background: rgba(201, 162, 74, 0.35); }

/* ---------- the hall behind everything ---------- */
.hall { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70rem 26rem at 50% -10%, rgba(201, 162, 74, 0.18), transparent 70%),
    radial-gradient(40rem 34rem at 100% 100%, rgba(143, 208, 238, 0.08), transparent 70%),
    radial-gradient(40rem 34rem at 0% 100%, rgba(151, 121, 184, 0.08), transparent 70%),
    linear-gradient(rgba(6, 6, 9, 0.84), rgba(6, 6, 9, 0.94)),
    url("/assets/hall.webp") center / cover no-repeat, var(--stone); }
.hall::before { content: ""; position: absolute; inset: 0; opacity: 0.6; background: url("/assets/hex.svg") 0 0 / 56px auto;
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 25%, #000 20%, transparent 80%); }
.hall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.6)); }

/* ---------- top bar ---------- */
.top { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  max-width: 72rem; margin: 0 auto; padding: 20px 16px 8px; }
.brand { display: flex; gap: 12px; align-items: center; min-height: 44px; text-decoration: none; color: inherit; }
.sigil { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2), 0 0 1.4rem rgba(201, 162, 74, 0.4); }
.wordmark { font-family: var(--serif); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
  background: linear-gradient(180deg, var(--bone), #d9cfbd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark span { background: linear-gradient(180deg, var(--gold-3), var(--gold)); -webkit-background-clip: text; background-clip: text; }
.wordmark small { display: block; margin-top: 4px; font: 600 0.68rem/1 var(--sans); letter-spacing: 0.2em; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 999px; color: var(--bone-2); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.nav a:hover { color: var(--gold-3); border-color: var(--line); }
.nav a[aria-current="page"] { color: var(--gold-2); border-color: var(--line-2); background: rgba(201, 162, 74, 0.08); }

/* ---------- page frame ---------- */
main { position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 44rem; }
.foot { position: relative; z-index: 1; max-width: 72rem; margin: 0 auto; padding: 8px 16px 32px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.foot a { display: inline-block; padding: 12px 4px; color: var(--bone-2); margin: 0 2px; }
.foot p { margin: 6px 0 0; }

.eyebrow { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ice-2); }
h1 { margin: 0 0 12px; font: 700 clamp(2rem, 5vw, 3.1rem)/1.08 var(--serif); letter-spacing: 0.04em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-3), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 0 0 6px; font: 700 1.2rem/1.3 var(--serif); letter-spacing: 0.06em; color: var(--bone); }
.lead { margin: 0 0 14px; font-size: 1.15rem; font-weight: 700; color: var(--gold-2); }
.fine { margin: 6px 0 0; font-size: 0.86rem; color: var(--muted); }
p { margin: 0 0 12px; }

/* glass panel with a gold-to-ice neon top edge */
.panel, .card { position: relative; background: linear-gradient(180deg, var(--glass-2), var(--glass)); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1.2rem 2.4rem -1.2rem rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.panel::before, .card::before { content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 25%, var(--ice) 75%, transparent); opacity: 0.7; }
.panel { padding: 24px; }
.panel-title { margin: 0 0 4px; font: 700 0.95rem/1.3 var(--serif); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }

/* ---------- apply: hero beside the form ---------- */
.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 40px; align-items: start; }
.hero { padding-top: 12px; }
.hero > p:not(.lead):not(.eyebrow) { color: var(--bone-2); max-width: 34rem; }
.price { display: inline-flex; align-items: baseline; gap: 8px; margin: 4px 0 18px; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(201, 162, 74, 0.07); }
.price b { font: 800 1.6rem/1 var(--serif); color: var(--gold-3); }
.price span { color: var(--bone-2); font-size: 0.95rem; }

/* a still of the sponsor bar on the hall, so an applicant sees where the tile goes */
.bar-demo { position: relative; margin: 22px 0 26px; padding: 12px 0; overflow: hidden; border-block: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(13, 12, 17, 0.92), rgba(6, 6, 9, 0.92)); border-radius: 10px; }
.bar-demo::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), var(--ice), transparent); }
.bar-track { display: flex; gap: 10px; width: max-content; padding-left: 124px; animation: drift 26s linear infinite; }
.bar-tag { position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 14px 0 12px;
  background: linear-gradient(90deg, #0b0a0f 80%, rgba(11, 10, 15, 0)); padding-right: 22px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.bar-demo .tile { padding: 6px 12px; min-height: 36px; font-size: 0.85rem; }
.bar-demo .tile.you { border-color: var(--gold); box-shadow: 0 0 1rem rgba(201, 162, 74, 0.35); }
.mono { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--iron-2); color: var(--gold-2); font: 800 0.7rem/1 var(--serif); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(201, 162, 74, 0.08); font: 700 1rem/1 var(--serif); color: var(--gold-2); }
.steps b { display: block; font: 700 0.92rem/1.3 var(--serif); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone); margin-top: 2px; }
.steps span { display: block; font-size: 0.92rem; color: var(--bone-2); }

/* ---------- form ---------- */
form { margin: 0; }
label { display: block; margin: 18px 0 6px; font-size: 0.9rem; font-weight: 600; color: var(--bone); }
fieldset { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; color: var(--bone); }
input[type=text], input[type=file], select { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(6, 6, 9, 0.6); color: var(--bone); font: inherit; font-size: 16px; font-weight: 400; transition: border-color 0.15s, box-shadow 0.15s; }   /* 16px: phones zoom into smaller fields */
input[type=text]::placeholder { color: #6f685e; }
input[type=text]:hover, select:hover, input[type=file]:hover { border-color: rgba(214, 186, 128, 0.45); }
input[type=text]:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.2); }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
select option { background: var(--iron); color: var(--bone); }
input[type=file] { padding: 7px; cursor: pointer; color: var(--bone-2); }
input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--iron-2);
  color: var(--gold-2); font: 600 0.88rem var(--sans); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--gold); }
.row { display: flex; gap: 8px; margin-bottom: 8px; } .row select { flex: 0 0 11rem; } .row input { flex: 1; min-width: 0; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 6px 0 0; font-weight: 400; color: var(--bone-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); flex: none; }

button { min-height: 46px; padding: 11px 20px; border: 1px solid transparent; border-radius: 10px; font: 700 0.98rem var(--sans); cursor: pointer;
  background: linear-gradient(180deg, var(--gold-3), var(--gold)); color: #1a1408; box-shadow: 0 0.5rem 1.4rem -0.6rem rgba(201, 162, 74, 0.7);
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s; }
button:hover { filter: brightness(1.07); box-shadow: 0 0.7rem 1.8rem -0.6rem rgba(201, 162, 74, 0.85); }
button:active { transform: translateY(1px); }
button.quiet { background: transparent; color: var(--gold-2); border-color: var(--line-2); box-shadow: none; font-weight: 600; }
button.quiet:hover { background: rgba(201, 162, 74, 0.08); filter: none; }
button:disabled { opacity: 0.55; cursor: default; filter: none; transform: none; }
#submit { width: 100%; margin-top: 8px; padding: 14px 20px; font-size: 1.02rem; }
.reassure { margin: 10px 0 0; text-align: center; font-size: 0.82rem; color: var(--muted); }

.error { min-height: 1.2em; margin: 4px 0 0; font-size: 0.86rem; color: var(--bad); }
.error:empty { min-height: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* the tile preview, on the bar's own background */
.preview { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 12px; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 12px;
  background: linear-gradient(180deg, #0d0c11, #060609); }
.tile { flex: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; }
.tile.dark { background: #16141b; color: #f4efe6; } .tile.light { background: #f4efe6; color: #16141b; } .tile.sample { opacity: 0.45; }
.tile img, .logo { height: 32px; max-width: 96px; object-fit: contain; }
.tile > span:last-child { max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* the bar ellipsises a long name the same way */
#tile-choice { margin-top: 8px; }

/* ---------- status ---------- */
#apps { display: grid; gap: 16px; margin: 8px 0 20px; }
.card { margin: 0; padding: 22px 24px; }
.card > .logo { float: right; margin: 0 0 8px 12px; padding: 6px; border-radius: 8px; background: var(--iron); }
.card h2 { font-size: 1.25rem; }
.status { display: inline-block; margin: 10px 0 0; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(201, 162, 74, 0.08);
  font-size: 0.9rem; font-weight: 700; color: var(--gold-2); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; clear: both; }
.card form { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
#none { padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--bone-2); }
#signin { margin-top: 8px; }
#link-msg { margin: 8px 0 0; color: var(--bone-2); }

/* ---------- sign in ---------- */
.signin { max-width: 30rem; margin: 6vh auto 0; text-align: center; }
.signin p { color: var(--bone-2); }
.signin .rune { display: block; width: 36px; height: 44px; margin: 0 auto 10px; color: var(--gold); filter: drop-shadow(0 0 0.8rem rgba(201, 162, 74, 0.5)); }
.signin button { width: 100%; }
#msg { margin: 12px 0 0; color: var(--bone-2); }

/* ---------- terms ---------- */
.terms ul { margin: 0 0 8px; padding-left: 0; list-style: none; }
.terms li { position: relative; margin: 0; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--line); color: var(--bone-2); }
.terms li:last-child { border-bottom: 0; }
.terms li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--gold); background: rgba(201, 162, 74, 0.2); }
.terms h2 { margin-top: 28px; font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }
.version { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.8rem; color: var(--muted); }
.draft { margin: 0 0 18px; padding: 12px 16px; border: 1px dashed var(--gold); border-radius: 10px; background: rgba(201, 162, 74, 0.06); color: var(--gold-2); }

/* ---------- narrow screens ---------- */
@media (max-width: 880px) {
  .apply-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .panel { padding: 20px 16px; }
  .card { padding: 20px 16px; }
}
@media (max-width: 520px) {
  .top { justify-content: center; text-align: center; }
  .nav { justify-content: center; gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 0.86rem; }
  .sigil { width: 40px; height: 40px; }
  .row { flex-wrap: wrap; } .row select { flex: 1 1 100%; }
  .card > .logo { float: none; display: block; margin: 0 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar-track { animation: none; }
  button, input, select { transition: none; }
}
