/* SolTix — Golden Ticket. Fonts are self-hosted (web/fonts, SIL OFL). */
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-opsz-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-opsz-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F3E9D7;
  --paper-2: #EADCC3;
  --card: #FBF5EA;
  --ink: #1B1712;
  --muted: #6B5E4B;
  --red: #B3192B;
  --red-deep: #8C1020;
  --gold: #D9A441;
  --line: #CDBB9B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-image: radial-gradient(rgba(27,23,18,.05) 1px, transparent 1px);
  background-size: 6px 6px;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.banner { background: var(--ink); color: var(--paper); font-size: 13px; text-align: center; padding: 8px 16px; }
.banner b { color: var(--gold); }

nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.links { display: flex; gap: 32px; font-weight: 500; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); background: transparent; white-space: nowrap; }
.btn:hover { background: var(--paper-2); }
.btn.red { background: var(--red); color: var(--paper); border-color: var(--red); }
.btn.red:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.nav-cta { display: flex; gap: 12px; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 72px 0 64px; }
.eyebrow { font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--red); font-weight: 600; }
h1 { font-family: "Fraunces", serif; font-weight: 900; font-size: 92px; line-height: .95; letter-spacing: -2.5px; margin: 18px 0 24px; font-variation-settings: "opsz" 144; }
h1 em { font-style: italic; color: var(--red); font-weight: 700; }
.lede { font-size: 20px; color: var(--muted); max-width: 470px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-cta .btn { padding: 16px 28px; font-size: 17px; }
.ca { display: flex; align-items: center; gap: 10px; max-width: 100%; margin-top: 18px; padding: 8px 8px 8px 14px; border: 1.5px dashed var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); text-align: left; }
.ca:hover { border-style: solid; }
.ca-label { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; color: var(--red); letter-spacing: 1px; }
#ca-text { font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.ca-hint { flex: none; background: var(--ink); color: var(--paper); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.ca.copied .ca-hint { background: var(--red); }

/* the ticket */
.ticket { position: relative; display: grid; grid-template-columns: 1fr 120px; background: var(--red); color: var(--paper); border-radius: 18px; transform: rotate(-2deg); box-shadow: 0 30px 50px -20px rgba(140,16,32,.55);
  -webkit-mask: radial-gradient(circle 18px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 18px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 18px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 18px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.ticket-main { padding: 36px 36px 32px 44px; border-right: 3px dashed rgba(243,233,215,.55); min-width: 0; container-type: inline-size; }
.ticket-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-family: "IBM Plex Mono", monospace; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
.pot-label { margin-top: 26px; font-family: "Fraunces", serif; font-style: italic; font-size: 22px; }
.pot { font-family: "Fraunces", serif; font-weight: 900; font-size: min(104px, 24cqw); line-height: 1; letter-spacing: -3px; font-variation-settings: "opsz" 144; white-space: nowrap; }
.pot small { font-size: .35em; letter-spacing: 0; margin-left: .2em; }
.clock { display: flex; gap: 10px; margin-top: 22px; }
.clock div { background: var(--paper); color: var(--ink); border-radius: 10px; padding: 10px 14px; text-align: center; min-width: 78px; }
.clock b { display: block; font-family: "IBM Plex Mono", monospace; font-size: 34px; line-height: 1.05; }
.clock span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.drawing { margin-top: 22px; background: var(--paper); color: var(--ink); border-radius: 10px; padding: 14px 18px; font-weight: 700; }
.drawing span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; font-size: 14px; opacity: .9; }
.ticket-meta b { display: block; font-size: 20px; font-family: "IBM Plex Mono", monospace; }
.stub { display: flex; align-items: center; justify-content: center; }
.stub p { writing-mode: vertical-rl; transform: rotate(180deg); font-family: "Fraunces", serif; font-weight: 900; font-size: 30px; letter-spacing: 6px; }

.strip { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); display: grid; grid-template-columns: repeat(4, 1fr); }
.strip div { padding: 22px 24px; border-right: 1px solid var(--line); min-width: 0; }
.strip div:last-child { border-right: 0; }
.strip b { display: block; font-family: "Fraunces", serif; font-size: 34px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }

.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 28px; padding: 56px 0; scroll-margin-top: 16px; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 28px; min-width: 0; }
.card h3 { font-family: "Fraunces", serif; font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.lookup { display: flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.lookup input { flex: 1; min-width: 0; padding: 12px 18px; font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--ink); background: transparent; border: 0; outline: none; }
.lookup input::placeholder { color: var(--muted); }
.lookup button { background: var(--ink); color: var(--paper); padding: 12px 18px; font-size: 14px; font-weight: 700; border: 0; }
.lookup:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv b { font-family: "IBM Plex Mono", monospace; text-align: right; }
.kv .good { color: var(--red); }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.error { color: var(--red); font-size: 14px; margin-top: 12px; }
.jackpot { background: var(--ink); color: var(--paper); border-color: var(--ink); position: relative; overflow: hidden; }
.jackpot .sub { color: #B9AC95; }
.jackpot .big { font-family: "Fraunces", serif; font-weight: 900; font-size: 64px; line-height: 1; color: var(--gold); margin: 10px 0 18px; font-variation-settings: "opsz" 144; }
.jackpot .seal { position: absolute; right: -24px; top: -24px; width: 120px; height: 120px; border-radius: 50%; border: 3px dashed var(--gold); display: grid; place-items: center; transform: rotate(14deg); font-family: "Fraunces", serif; font-weight: 900; color: var(--gold); font-size: 15px; text-align: center; line-height: 1.1; }
.jackpot .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #B9AC95; }
.jackpot .last { margin-top: 22px; padding-top: 14px; border-top: 1px dashed #4A4036; font-size: 13px; color: #B9AC95; }
.bar { height: 10px; background: #3A3128; border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.winners li { list-style: none; display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.winners li:last-child { border-bottom: 0; }
.tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; background: var(--paper-2); text-align: center; }
.tag.grand { background: var(--red); color: var(--paper); }
.winners .amt { font-family: "IBM Plex Mono", monospace; font-weight: 600; text-align: right; }
.winners a { text-decoration: none; }
.winners a:hover { text-decoration: underline; }
.verify { color: var(--red); font-weight: 700; font-size: 13px; text-decoration: underline; }

.section { padding: 8px 0 64px; scroll-margin-top: 16px; }
.section h2 { font-family: "Fraunces", serif; font-size: 52px; font-weight: 900; letter-spacing: -1px; margin-bottom: 28px; font-variation-settings: "opsz" 144; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.step { padding: 30px; border-right: 2px solid var(--ink); background: var(--card); }
.step:last-child { border-right: 0; }
.step .n { font-family: "Fraunces", serif; font-style: italic; font-size: 56px; color: var(--red); line-height: 1; }
.step h4 { font-family: "Fraunces", serif; font-size: 24px; margin: 10px 0 8px; }
.step p { color: var(--muted); }

.table-wrap { border: 2px solid var(--ink); border-radius: 16px; overflow-x: auto; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px dashed var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 500; border-bottom: 2px solid var(--ink); }
tr:last-child td { border-bottom: 0; }
td.num { font-family: "IBM Plex Mono", monospace; text-align: right; }
th.num { text-align: right; }
td a { color: var(--red); font-weight: 700; }

.fair { background: var(--red); color: var(--paper); padding: 48px 0; scroll-margin-top: 0; }
.fair .wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.fair h2 { font-family: "Fraunces", serif; font-size: 40px; line-height: 1.05; font-weight: 900; }
.fair p { margin-top: 14px; opacity: .9; font-size: 15px; }
.chain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chain div { border: 2px solid rgba(243,233,215,.6); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.chain b { display: block; font-family: "Fraunces", serif; font-size: 20px; }
.chain span { display: block; font-family: "IBM Plex Mono", monospace; font-size: 12px; opacity: .9; overflow-wrap: anywhere; }
.chain a { color: var(--paper); }
footer { padding: 26px 0; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }

/* admin panel */
.admin { max-width: 640px; padding: 40px 0 64px; display: grid; gap: 20px; }
.admin h1 { font-size: 56px; margin: 0; }
.admin .field input { font-size: 16px; }
.admin form .btn { margin-top: 14px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#panel { display: grid; gap: 20px; }
#panel[hidden] { display: none; }
.card-head, .row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h3 { margin-bottom: 0; }
.card-head + .sub { margin-top: 6px; }
.row-head { margin: 16px 0 8px; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.admin form .btn.small { margin-top: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper-2); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch input:checked + span { background: var(--red); border-color: var(--red); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--paper); }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper); min-width: 0; }
.stat span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.stat.good b { color: #2F6B3A; }
.stat.bad { border-color: var(--red); }
.stat.bad b { color: var(--red); }
.log li { list-style: none; display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; overflow-wrap: anywhere; }
.log time, .log small { font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(27,23,18,.5); }
.toast.bad { background: var(--red); }

/* announcement and social links on the public site */
.notice { background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 700; text-align: center; padding: 8px 16px; overflow-wrap: anywhere; }
.social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); color: var(--ink); flex: none; }
.social:hover { background: var(--paper-2); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social[hidden] { display: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-links a[hidden] { display: none; }

/* one draw's page */
.round-page { padding: 48px 0 24px; }
.round-page h1 { font-size: 72px; margin: 8px 0 12px; }
.round-page .lede { max-width: 640px; margin-bottom: 32px; }
.round-page .strip { margin-bottom: 48px; }
.round-page .section h2 { font-size: 40px; margin-bottom: 8px; }
.sub-lede { color: var(--muted); margin-bottom: 20px; }
.timeline { list-style: none; border-left: 3px solid var(--red); margin-left: 8px; padding-left: 0; }
.timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--card); border: 3px solid var(--red); }
.timeline b { font-size: 17px; }
.timeline span { font-size: 14px; overflow-wrap: anywhere; }
.timeline .when { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); }
.timeline a, .round-page .kv a { color: var(--red); font-weight: 700; }
#r-check-sec .kv b { overflow-wrap: anywhere; text-align: right; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 40px; }
.pager .btn[hidden] { display: none; }

/* terms page */
.doc { max-width: 760px; padding: 48px 0 64px; }
.doc h1 { font-size: 64px; margin: 0 0 12px; }
.doc h2 { font-family: "Fraunces", serif; font-size: 28px; margin: 40px 0 12px; scroll-margin-top: 16px; }
.doc p, .doc li { font-size: 17px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc a { color: var(--red); font-weight: 700; }

/* buy / sell */
dialog { margin: auto; border: 2px solid var(--ink); border-radius: 18px; background: var(--card); color: var(--ink); padding: 28px; width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(27,23,18,.55); }
dialog h3 { font-family: "Fraunces", serif; font-size: 28px; margin-bottom: 16px; }
.close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.tabs button { background: transparent; border: 0; padding: 10px; font-weight: 700; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.field { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); padding: 4px 16px; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: "IBM Plex Mono", monospace; font-size: 24px; padding: 10px 0; outline: none; color: var(--ink); }
.field span { font-weight: 700; }
.field:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.swap-bal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 6px; }
.chips button { border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.chips button:hover { background: var(--ink); color: var(--paper); }
.swap-out { margin: 14px 0 18px; }
dialog .btn { width: 100%; padding: 14px; font-size: 16px; }
dialog .btn + .btn { margin-top: 10px; }

@media (max-width: 1000px) {
  h1 { font-size: 72px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .links, .nav-cta .btn:not(.red) { display: none; }
  nav { padding: 16px 0; }
  .nav-cta { gap: 8px; }
  .social { width: 36px; height: 36px; }
  .social svg { width: 15px; height: 15px; }
  .brand img { height: 30px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 0 44px; }
  h1 { font-size: 54px; letter-spacing: -1.5px; }
  .lede { font-size: 17px; }
  .hero-cta .btn { padding: 14px 20px; font-size: 15px; }
  .ticket { grid-template-columns: 1fr 56px; transform: rotate(-1deg); }
  .ticket-main { padding: 26px 20px 24px 30px; }
  .ticket-top { font-size: 11px; letter-spacing: 1px; }
  .pot { letter-spacing: -2px; }
  .clock div { min-width: 0; flex: 1; padding: 8px; }
  .clock b { font-size: 24px; }
  .ticket-meta { gap: 8px 16px; }
  .stub p { font-size: 18px; letter-spacing: 3px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip b { font-size: 24px; }
  .strip div { padding: 18px 14px; }
  .strip div:nth-child(2) { border-right: 0; }
  .strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid3 { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .grid3 .card:last-child { grid-column: auto; }
  .card { padding: 22px; }
  .section h2 { font-size: 38px; }
  .round-page h1 { font-size: 46px; }
  .round-page .section h2 { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 2px solid var(--ink); }
  .step:last-child { border-bottom: 0; }
  th, td { padding: 12px 12px; }
  .fair .wrap { grid-template-columns: 1fr; gap: 20px; }
  .fair h2 { font-size: 32px; }
  .chain { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 6px; }
  .doc { padding: 32px 0 48px; }
  .doc h1 { font-size: 42px; }
}
