:root {
  --ink: #17202b;
  --ink-2: #243140;
  --paper: #f4efe4;
  --paper-2: #e7dcc6;
  --brass: #c9852d;
  --brass-2: #f0c27a;
  --tide: #1f7a72;
  --tide-2: #8fd0c6;
  --coral: #c45b45;
  --line: rgba(23, 32, 43, 0.14);
  --shadow: 0 18px 40px rgba(23, 32, 43, 0.12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(240, 194, 122, 0.45), transparent 60%),
    linear-gradient(180deg, rgba(31, 122, 114, 0.08), transparent 28%);
  z-index: 0;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.tide {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 22px 20px 80px; }
.mast {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand img { width: 46px; height: 46px; }
.brand strong { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-size: 1.45rem; letter-spacing: -0.03em; }
.brand small { display: block; color: var(--tide); letter-spacing: 0.14em; font-size: 0.68rem; text-transform: uppercase; }
.search {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  border-radius: 999px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
}
.pill, .slot-trade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.ghost { background: transparent; color: var(--ink); cursor: pointer; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.nav a {
  text-decoration: none;
  border: 1px dashed rgba(23,32,43,0.28);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255,255,255,0.55);
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: stretch;
}
h1, h2, h3 { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
h1 { font-size: clamp(3.2rem, 8vw, 6.4rem); line-height: 0.88; }
.lede { font-size: 1.15rem; max-width: 38rem; line-height: 1.5; }
.receipt {
  background: white;
  border-radius: 18px 18px 8px 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  position: relative;
}
.receipt::before {
  content: "";
  position: absolute;
  left: 12px; right: 12px; top: 0;
  height: 10px;
  background: radial-gradient(circle at 8px -2px, transparent 8px, white 9px) left top / 16px 10px repeat-x;
}
.kicker { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; color: var(--brass); }
.stat { font-variant-numeric: tabular-nums; font-size: 2rem; }
.grid { display: grid; gap: 12px; }
.cards { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.card, .token-row, .record {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.token-row, .record { display: grid; grid-template-columns: 1.4fr repeat(3, 0.7fr) auto; gap: 8px; align-items: center; margin-top: 8px; }
.token-row a, .record a { font-weight: 700; text-underline-offset: 3px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.filters button, .add { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--tide); color: white; border-color: var(--tide); }
.steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.step { padding: 16px; background: var(--ink); color: var(--paper); border-radius: 18px; min-height: 180px; }
.step em { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-style: normal; color: var(--brass-2); font-size: 1.8rem; }
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.slot-icon, .slot-trade {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--ink);
  background: white;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.slot-trade { width: auto; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--brass); color: var(--ink); border-color: var(--brass); }
#foot-slots { display: flex; gap: 8px; align-items: center; }
.sheet {
  position: fixed; inset: 0; background: rgba(23,32,43,0.46);
  z-index: 5; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px;
}
.sheet.open { display: flex; }
.sheet form, .sheet .panel { width: min(640px, 100%); background: var(--paper); border-radius: 20px; padding: 16px; }
.results a { display: block; padding: 8px 0; }
.note { color: #5c5144; }
form.launch { display: grid; gap: 10px; }
label { display: grid; gap: 4px; font-size: 0.92rem; }
input, textarea, select { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: white; }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.docs nav a { display: block; padding: 6px 0; }
.pay-card { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; }
#toast { min-height: 1.2em; color: var(--tide); }
@media (max-width: 800px) {
  .mast { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .hero, .cards, .steps, .docs { grid-template-columns: 1fr; }
  .token-row, .record { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .record { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); min-height: 206px; }
  .record > * { min-width: 0; overflow-wrap: anywhere; }
  h1 { font-size: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tide { display: none; }
}
