/*
 * Public front: the pages anyone can read without an account (the landing
 * section in index.html, rates.html, and the frame around sign-in). Plain CSS,
 * no build step, so the pages work with JavaScript off and for crawlers.
 * Every rule is scoped under .front so nothing leaks into the app.
 *
 * Look: a broadcast scoreboard at night. Two corners, cyan against pink, on a
 * near-black violet. Panels have cut corners; numbers are set in Unbounded.
 */
@font-face {
  font-family: 'Unbounded';
  src: url('/assets/fonts/unbounded.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
}

.front {
  --f-bg: #07051a; --f-panel: #110d2a; --f-raised: #1a1440; --f-line: #2d2562;
  --f-text: #f3f0ff; --f-muted: #aaa3cc; --f-pink: #ff4d94; --f-cyan: #36e0ff; --f-gold: #ffc94d;
  --f-ink: #12030b; --f-cut: 14px;
  --f-display: 'Unbounded', 'Space Grotesk Variable', system-ui, sans-serif;
  --f-body: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--f-bg); color: var(--f-text); min-height: 100vh;
  font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1.2px); background-size: 22px 22px;
}
body.front { margin: 0; }
.front *, .front *::before, .front *::after { box-sizing: border-box; }
.front a { color: inherit; }
.front h1, .front h2, .front h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
.front p { margin: 0; }
.front img { max-width: 100%; height: auto; }
.front .f-wrap { margin: 0 auto; max-width: 1180px; padding: 0 24px; }

/* A panel with cut corners and a lit edge: the edge is the element, the fill is ::before. */
.front .f-cutbox { position: relative; background: linear-gradient(135deg, var(--f-cyan), var(--f-line) 30%, var(--f-line) 70%, var(--f-pink)); clip-path: polygon(var(--f-cut) 0, 100% 0, 100% calc(100% - var(--f-cut)), calc(100% - var(--f-cut)) 100%, 0 100%, 0 var(--f-cut)); }
.front .f-cutbox::before { content: ''; position: absolute; inset: 1px; background: var(--f-panel); clip-path: inherit; z-index: 0; }
.front .f-cutbox > * { position: relative; z-index: 1; }

/* Top bar */
.front .f-top { align-items: center; display: flex; gap: 14px; justify-content: space-between; padding: 18px 24px; margin: 0 auto; max-width: 1180px; position: relative; z-index: 2; }
.front .f-brand { align-items: center; display: flex; font-family: var(--f-display); font-size: 16px; font-weight: 700; gap: 10px; letter-spacing: -0.02em; text-decoration: none; }
.front .f-brand img { border-radius: 9px; height: 36px; width: 36px; }
.front .f-brand sup { color: var(--f-muted); font-size: 9px; font-weight: 400; margin-left: 2px; }
.front .f-nav { align-items: center; display: flex; gap: 6px; }
.front .f-nav a { color: var(--f-muted); font-size: 14px; font-weight: 600; padding: 9px 12px; text-decoration: none; white-space: nowrap; }
.front .f-nav a:hover { color: var(--f-text); }
.front .f-nav a.f-btn { color: var(--f-ink); }
.front .f-nav a.f-btn-ghost { color: var(--f-text); }

/* Buttons: cut corners, so focus is shown inside the shape. */
.front .f-btn { align-items: center; background: var(--f-pink); border: 0; color: var(--f-ink); display: inline-flex; font-family: var(--f-display); font-size: 13px; font-weight: 600; justify-content: center; letter-spacing: 0; min-height: 46px; padding: 11px 22px; text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: background .15s; }
.front .f-btn:hover { background: #ff7eb2; }
.front .f-btn-ghost { background: var(--f-raised); color: var(--f-text); box-shadow: inset 0 0 0 1px var(--f-line); }
.front .f-btn-ghost:hover { background: #251c5a; }
.front a:focus-visible { outline: 2px solid var(--f-cyan); outline-offset: 3px; }
.front .f-btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--f-cyan); }

/* Hero: the two corners' light meets behind the scoreboard. */
.front .f-hero { position: relative; overflow: hidden; padding: 56px 0 72px; margin-top: -74px; padding-top: 130px; }
.front .f-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,5,26,.86), rgba(7,5,26,.72) 40%, var(--f-bg)), url('/assets/battle-stage.webp') center 30%/cover no-repeat; }
.front .f-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 0% 40%, rgba(54,224,255,.20), transparent 70%), radial-gradient(60% 70% at 100% 40%, rgba(255,77,148,.24), transparent 70%); pointer-events: none; }
.front .f-hero .f-wrap { position: relative; z-index: 1; display: grid; gap: 44px; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; }
.front .f-hero h1 { font-size: clamp(30px, 4.3vw, 54px); font-weight: 800; margin: 0 0 20px; text-wrap: balance; }
.front .f-lede { color: var(--f-text); font-size: 18px; max-width: 34em; }
.front .f-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.front .f-small { color: var(--f-muted); font-size: 13px; margin-top: 16px; }

/* Scoreboard */
.front .f-hud { --f-cut: 22px; padding: 22px 22px 18px; }
.front .f-hud-top { align-items: center; color: var(--f-muted); display: flex; font-size: 12px; justify-content: space-between; margin-bottom: 16px; }
.front .f-hud-live { align-items: center; color: var(--f-text); display: inline-flex; font-weight: 700; gap: 7px; }
.front .f-hud-live::before { background: var(--f-pink); border-radius: 50%; content: ''; height: 8px; width: 8px; box-shadow: 0 0 10px var(--f-pink); }
.front .f-hud-sides { align-items: end; display: grid; gap: 10px; grid-template-columns: 1fr auto 1fr; }
.front .f-side b { display: block; font-family: var(--f-display); font-size: clamp(22px, 3vw, 32px); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.front .f-side span { color: var(--f-muted); font-size: 13px; }
.front .f-side-a b { color: var(--f-cyan); }
.front .f-side-b { text-align: right; }
.front .f-side-b b { color: var(--f-pink); }
.front .f-clock { font-family: var(--f-display); font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 600; padding: 6px 12px; background: var(--f-raised); box-shadow: inset 0 0 0 1px var(--f-line); }
.front .f-bar { background: var(--f-pink); height: 10px; margin: 14px 0 16px; overflow: hidden; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.front .f-bar i { background: var(--f-cyan); display: block; height: 100%; width: 57%; border-right: 3px solid var(--f-bg); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.front .f-feed { border-top: 1px solid var(--f-line); list-style: none; margin: 0; min-height: 132px; padding: 12px 0 0; }
.front .f-feed li { align-items: center; color: var(--f-muted); display: flex; font-size: 14px; gap: 10px; padding: 5px 0; }
.front .f-feed img { height: 32px; width: 32px; object-fit: contain; flex: none; }
.front .f-feed strong { color: var(--f-text); font-weight: 600; }
.front .f-feed em { color: var(--f-gold); font-family: var(--f-display); font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.front .f-feed li.f-new { animation: f-in .45s ease-out; }
@keyframes f-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.front .f-hud-note { color: var(--f-muted); font-size: 12px; margin-top: 8px; }

/* Rates tape under the hero */
.front .f-tape { border-block: 1px solid var(--f-line); background: rgba(17,13,42,.8); overflow: hidden; }
.front .f-tape ul { display: flex; gap: 0; list-style: none; margin: 0 auto; max-width: 1180px; padding: 0 24px; flex-wrap: wrap; }
.front .f-tape li { color: var(--f-muted); flex: 1 1 auto; font-size: 13px; padding: 14px 18px 14px 0; white-space: nowrap; }
.front .f-tape b { color: var(--f-text); font-family: var(--f-display); font-size: 15px; font-weight: 600; margin-left: 8px; }

/* Sections */
.front section.f-sec { padding: 64px 0; }
.front .f-sec h2 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 12px; max-width: 20em; }
.front .f-sub { color: var(--f-muted); margin-bottom: 30px; max-width: 40em; }

/* Three ways in: columns split by lit rules, not boxes. */
.front .f-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--f-line); }
.front .f-card { padding: 26px 26px 6px 0; }
.front .f-card + .f-card { border-left: 1px solid var(--f-line); padding-left: 26px; }
.front .f-card img { height: 60px; margin-bottom: 14px; width: 60px; object-fit: contain; }
.front .f-card h3 { font-size: 18px; margin-bottom: 8px; }
.front .f-card p { color: var(--f-muted); font-size: 15px; }

/* Become an artist */
.front section.f-release-sec { padding-bottom: 0; }
.front .f-release { --f-cut: 20px; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; padding: 28px; }
.front .f-release h2 { margin-bottom: 10px; }
.front .f-release p { color: var(--f-muted); max-width: 44em; }
.front .f-release > div { flex: 1 1 380px; }
.front .f-btn-release { background: linear-gradient(100deg, var(--f-cyan), #8a7bff 55%, var(--f-pink)); color: #07051a; padding: 12px 26px; min-height: 58px; }
.front .f-btn-release:hover { background: linear-gradient(100deg, var(--f-cyan), #8a7bff 55%, var(--f-pink)); filter: brightness(1.08); }
.front .f-btn-release span { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.front .f-btn-release strong { font-size: 15px; font-weight: 700; }
.front .f-btn-release small { font-family: var(--f-body); font-size: 13px; font-weight: 600; }

/* How a battle works: four moments on the battle clock. */
.front .f-steps { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0; padding: 0; position: relative; }
.front .f-steps::before { content: ''; position: absolute; left: 0; right: 0; top: 15px; height: 2px; background: linear-gradient(90deg, var(--f-cyan), var(--f-pink)); }
.front .f-steps li { color: var(--f-muted); font-size: 15px; padding: 0 22px 0 0; position: relative; }
.front .f-steps time, .front .f-steps .f-when { background: var(--f-bg); box-shadow: inset 0 0 0 1px var(--f-line); color: var(--f-text); display: inline-block; font-family: var(--f-display); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; margin-bottom: 16px; padding: 6px 10px; position: relative; }
.front .f-steps strong { color: var(--f-text); display: block; font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }

/* Boards: rates and prices */
.front .f-table-wrap { --f-cut: 18px; overflow-x: auto; position: relative; background: linear-gradient(135deg, var(--f-cyan), var(--f-line) 22%, var(--f-line) 78%, var(--f-pink)); padding: 1px; clip-path: polygon(var(--f-cut) 0, 100% 0, 100% calc(100% - var(--f-cut)), calc(100% - var(--f-cut)) 100%, 0 100%, 0 var(--f-cut)); }
.front table { background: var(--f-panel); border-collapse: collapse; font-size: 15px; width: 100%; clip-path: polygon(calc(var(--f-cut) - 1px) 0, 100% 0, 100% calc(100% - var(--f-cut) + 1px), calc(100% - var(--f-cut) + 1px) 100%, 0 100%, 0 calc(var(--f-cut) - 1px)); }
.front th, .front td { border-bottom: 1px solid var(--f-line); padding: 14px 20px; text-align: left; vertical-align: top; }
.front tr:last-child td { border-bottom: 0; }
.front thead th { color: var(--f-muted); font-size: 13px; font-weight: 600; }
.front td.f-num, .front th.f-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.front tbody td { color: var(--f-muted); }
.front tbody td:first-child { color: var(--f-text); }
.front td strong { color: var(--f-text); font-family: var(--f-display); font-size: 14px; font-weight: 600; }
.front .f-board td:last-child { text-align: right; }
.front .f-board td strong { color: var(--f-cyan); font-size: 16px; }

/* Gift ladder: twelve gifts, cheapest to dearest; the bar under each is its price on a log scale. */
.front .f-strip { display: grid; gap: 10px; grid-template-columns: repeat(12, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; align-items: end; }
.front .f-strip li { font-size: 12px; text-align: center; color: var(--f-text); }
.front .f-strip img { display: block; height: 56px; margin: 0 auto 6px; object-fit: contain; width: 56px; }
.front .f-strip span { color: var(--f-gold); display: block; font-family: var(--f-display); font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.front .f-strip i { display: block; height: calc(var(--p) * 1px); margin-top: 10px; background: linear-gradient(180deg, var(--f-pink), rgba(255,77,148,.08)); clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px); }
.front .f-ranks { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 720px; }
.front .f-ranks img { height: 72px; width: 72px; }
.front .f-ranks span { color: var(--f-muted); }
.front .f-ranks i { background: linear-gradient(180deg, var(--f-cyan), rgba(54,224,255,.06)); }

/* Rate card page */
.front .f-doc { padding-bottom: 70px; padding-top: 30px; }
.front .f-doc h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 800; margin-bottom: 14px; }
.front .f-doc h2 { font-size: 21px; margin: 46px 0 14px; }
.front .f-doc h3 { font-family: var(--f-body); font-size: 16px; font-weight: 700; letter-spacing: 0; margin: 18px 0 4px; }
.front .f-doc p { color: var(--f-muted); margin-bottom: 14px; max-width: 46em; }
.front .f-doc p strong, .front .f-doc li strong { color: var(--f-text); }
.front .f-doc ul { color: var(--f-muted); margin: 0 0 14px; max-width: 46em; padding-left: 20px; }
.front .f-doc li { margin-bottom: 6px; }
.front .f-doc li::marker { color: var(--f-cyan); }
.front .f-kicker { color: var(--f-cyan); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.front .f-key { display: grid; grid-template-columns: repeat(4, 1fr); margin: 26px 0 8px; border-block: 1px solid var(--f-line); }
.front .f-key div { padding: 18px 18px 18px 0; }
.front .f-key div + div { border-left: 1px solid var(--f-line); padding-left: 18px; }
.front .f-key b { color: var(--f-text); display: block; font-family: var(--f-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.front .f-key div:nth-child(odd) b { color: var(--f-cyan); }
.front .f-key div:nth-child(even) b { color: var(--f-pink); }
.front .f-key span { color: var(--f-muted); font-size: 14px; }

/* Footer */
.front .f-foot { border-top: 1px solid var(--f-line); color: var(--f-muted); font-size: 13px; padding: 26px 0 40px; background: var(--f-bg); }
.front .f-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.front .f-foot a { color: var(--f-text); text-decoration: none; }
.front .f-foot a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .front .f-hero .f-wrap { grid-template-columns: 1fr; gap: 30px; }
  .front .f-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 22px; }
  .front .f-steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .front .f-steps::before { display: none; }
  .front .f-key { grid-template-columns: 1fr 1fr; }
  .front .f-key div:nth-child(3) { border-left: 0; padding-left: 0; }
  .front .f-key div:nth-child(n+3) { border-top: 1px solid var(--f-line); }
}
@media (max-width: 620px) {
  .front .f-top { gap: 8px; padding: 12px 14px; }
  .front .f-brand { font-size: 13px; gap: 8px; }
  .front .f-brand img { height: 30px; width: 30px; }
  .front .f-brand sup { display: none; }
  .front .f-nav { gap: 4px; }
  .front .f-nav a:not(.f-btn):not(.f-btn-ghost) { display: none; }
  .front .f-nav .f-btn { font-size: 11px; min-height: 38px; padding: 8px 11px; }
  .front .f-wrap { padding: 0 16px; }
  .front .f-hero { margin-top: -62px; padding: 96px 0 44px; }
  .front .f-cta .f-btn { flex: 1 1 100%; }
  .front .f-release { padding: 20px; }
  .front .f-btn-release { width: 100%; }
  .front section.f-sec { padding: 44px 0; }
  .front .f-grid { grid-template-columns: 1fr; }
  .front .f-card { padding: 22px 0; }
  .front .f-card + .f-card { border-left: 0; border-top: 1px solid var(--f-line); padding-left: 0; }
  .front .f-steps { grid-template-columns: 1fr; row-gap: 26px; }
  .front .f-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .front .f-strip i { display: none; }
  .front .f-ranks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .front .f-ranks img { height: 48px; width: 48px; }
  .front .f-tape ul { padding: 0 16px; }
  .front .f-tape li { flex: 1 1 50%; padding: 10px 0; }
  .front th, .front td { padding: 11px 12px; }
  .front .f-hud { padding: 16px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .front .f-bar i { transition: none; }
  .front .f-feed li.f-new { animation: none; }
}

/* The home page file holds both the public front and the app. One shows at a time. */
html.app #front { display: none; }
html:not(.app) #root { display: none; }
