:root {
  color-scheme: dark;
  --ink: #f7ead2;
  --muted: #b7b5a6;
  --gold: #efbd73;
  --ground: #101614;
  --line: #41423a;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 40% 0%, #202922, transparent 48rem); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid #ffdda0; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.65; }
.wrap { width: min(1220px, calc(100% - 88px)); margin-inline: auto; }
.top { border-bottom: 1px solid #e6c78f24; background: #141a17; }
.top-inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .32em; width: fit-content; font: 600 1.27rem var(--serif); white-space: nowrap; }
.brand > span:last-child { color: var(--gold); }
.seal { display: inline-grid; place-items: center; color: var(--gold); width: 34px; height: 34px; border: 1px solid #9b7448; border-radius: 9px; margin-right: 7px; background: #35291f; }
.top nav { display: flex; gap: 29px; color: var(--muted); font-size: .9rem; }
.top nav a:hover, .text-button:hover { color: var(--ink); }
.nav-action { justify-self: end; padding: 9px 19px; border: 1px solid #8b6947; border-radius: 7px; color: var(--gold); font-weight: 650; font-size: .9rem; white-space: nowrap; }
.nav-action:hover { background: #392d22; }
.hero { isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 350px); align-items: center; min-height: 520px; position: relative; margin: 30px 0 65px; border: 1px solid #615138; border-radius: 17px; overflow: hidden; background: #191f19; }
.hero-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 59% 57%, #735637 0, #263932 33%, #171c17 70%); }
.hero-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #121914f8 0%, #161d17e8 16%, #17201978 43%, #12181252 68%, #161b16a8 100%), linear-gradient(0deg, #181e18ed, transparent 42%), url('/hearthside.jpg') 54% 56% / cover no-repeat; }
.hero-art span { position: absolute; right: 35%; bottom: 13%; font: 2rem var(--serif); color: #e8c085be; }
.hero-copy { padding: 52px clamp(22px, 5vw, 65px); align-self: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--gold); font-size: .875rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
h1 { font: 400 clamp(3.1rem, 6.6vw, 6rem)/.96 var(--serif); letter-spacing: -.06em; margin: 23px 0; }
h1 em { color: var(--gold); font-weight: inherit; }
.hero-copy p { max-width: 340px; color: #e0d8c5; margin-bottom: 28px; }
.quiet-link { width: fit-content; display: inline-block; color: var(--gold); font-weight: 650; padding-bottom: 5px; border-bottom: 1px solid #aa8657; }
.quiet-link:hover { color: var(--ink); }
.binder { margin: 32px 28px 32px 0; padding: 25px; border: 1px solid #846443; border-radius: 13px; background: #201e19f5; box-shadow: 0 18px 50px #0008; scroll-margin-top: 20px; }
.binder-mark { color: var(--gold); display: grid; width: 39px; height: 39px; place-items: center; background: #3e3023; border: 1px solid #6b5137; border-radius: 8px; font: 1.45rem var(--serif); margin-bottom: 16px; }
.binder h2 { font: 400 1.9rem/1.1 var(--serif); letter-spacing: -.035em; margin-bottom: 7px; }
.binder p { color: #c7bfac; font-size: .9rem; }
form { display: grid; gap: 9px; margin-top: 17px; }
label { font-weight: 650; font-size: .875rem; }
input, textarea { width: 100%; color: var(--ink); background: #111613; border: 1px solid #696054; border-radius: 7px; padding: 11px 12px; }
textarea { resize: vertical; min-height: 65px; }
input::placeholder, textarea::placeholder { color: #a2a194; opacity: 1; }
#code { font-variant-numeric: tabular-nums; letter-spacing: .24em; }
.primary { color: #2c2116; background: #ecc07c; border: 1px solid #ffda9d; border-radius: 7px; padding: 10px; margin-top: 4px; font-weight: 750; }
.primary:hover { background: #ffda9c; }
.form-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 9px; font-size: .875rem; color: var(--muted); }
#account { overflow-wrap: anywhere; }
.text-button { background: none; color: var(--gold); border: 0; padding: 4px 0; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.binder .status { margin-top: 13px; color: #d7d8a2; overflow-wrap: anywhere; }
.binder .status.error { color: #ffae98; }
.collection, .help { scroll-margin-top: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 17px; }
.section-head h2, .help h2 { font: 400 clamp(2.3rem, 4vw, 3.3rem)/1.04 var(--serif); margin-top: 6px; letter-spacing: -.04em; }
.section-head p { color: var(--muted); font-size: .9rem; }
.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.set-tile { --accent: #d7c08a; --tone: #293e38; color: var(--ink); position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 160px; text-align: left; background: linear-gradient(115deg, #202821 20%, var(--tone)); padding: 20px; border: 1px solid #5d5c4b; border-radius: 11px; overflow: hidden; }
.set-tile:hover, .set-tile[aria-expanded="true"] { border-color: var(--accent); }
.set-tile::before { content: ''; position: absolute; z-index: -1; width: 156px; height: 156px; right: -11px; top: -38px; transform: rotate(42deg); border: 1px solid #fff3; box-shadow: 0 0 0 12px #fff1, 0 0 0 25px #fff1; border-radius: 29px; }
.set-tile strong { display: block; font: 400 1.56rem var(--serif); }
.set-tile small { color: #d1cbb9; display: block; margin-top: 5px; font-size: .875rem; }
.set-tile .sigil { color: var(--accent); position: absolute; z-index: -1; top: 24px; right: 37px; font: 2.8rem/1 var(--serif); }
.set-tile .view { color: var(--accent); white-space: nowrap; font-size: .875rem; }
.wild_frontiers { --accent: #d3d899; --tone: #384934; }
.echoes_below { --accent: #efb082; --tone: #523a32; }
.set-detail { padding: 21px; margin-top: 17px; border: 1px solid var(--line); border-radius: 11px; background: #1c231d; }
.set-detail h3 { font: 400 1.7rem var(--serif); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.card { --rarity: #d6d7cb; border: 1px solid var(--line); border-top: 2px solid var(--rarity); padding: 13px; border-radius: 7px; background: #161b17; overflow-wrap: anywhere; }
.card[data-rarity="2"] { --rarity: #a9d68e; }
.card[data-rarity="3"] { --rarity: #a4ccef; }
.card[data-rarity="4"] { --rarity: #f1bf77; }
.card h4 { margin: 4px 0; font: 400 1.15rem var(--serif); }
.card small { color: var(--rarity); font-size: .82rem; }
.card p { color: var(--muted); font-size: .875rem; }
.help { display: grid; grid-template-columns: 1fr 1.2fr; gap: 26px; margin: 47px 0 60px; border-top: 1px solid var(--line); padding: 31px 0 0; }
.help a { margin-top: 15px; }
.help ol { margin: 0; padding-left: 1.5em; color: #d9d2bf; line-height: 1.65; }
.help li + li { margin-top: 8px; }
.help li::marker, code { color: var(--gold); }
footer { border-top: 1px solid var(--line); background: #131915; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; min-height: 85px; padding-block: 10px; }
footer p { font-size: .875rem; color: var(--muted); }
@media (max-width: 920px) {
  .wrap { width: calc(100% - 40px); }
  .set-tile .view { display: none; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 28px); }
  .top-inner { grid-template-columns: 1fr auto; min-height: 62px; }
  .top nav { display: none; }
  .hero { display: block; margin: 16px 0 37px; }
  .hero-copy { padding: 34px 23px 24px; }
  .hero-art::before { background-position: 57% top; }
  .hero-art span { display: none; }
  .binder { margin: 0 15px 16px; padding: 19px; }
  .set-grid, .help { grid-template-columns: 1fr; }
  .set-tile { min-height: 113px; }
  .set-tile .sigil { right: 34px; top: 23px; }
  .help { margin: 34px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
