/* Copperquill: the one stylesheet. No inline styles anywhere (the CSP allows only this file).
   Look: a minted plate. Deep ink lit from one side, silver type, copper as the only accent (metal, not paint).
   After editing, raise ?v= in the <link> of every page: /assets/* is cached for a year. */

@font-face {
  font-family: "Marcellus";
  src: url("/assets/fonts/marcellus-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ground, darkest to lightest */
  --ink-0: #060D15;
  --ink-1: #0A1520;
  --ink-2: #0D1C2B;
  --ink-3: #112539;
  --glow: rgba(46, 96, 140, 0.34);
  /* lines: silver at low strength, so they read as engraving, not as borders */
  --line: rgba(205, 212, 220, 0.09);
  --line-2: rgba(205, 212, 220, 0.17);
  /* type */
  --head: #F3F5F8;
  --body: #C5CDD6;
  --muted: #95A4B5;
  /* metal */
  --silver: #C7CCD3;
  --copper: #C98D5E;
  --copper-text: #DCA87A;
  --copper-hi: #F0CBA4;
  --copper-metal: linear-gradient(135deg, #F4D6B4 0%, #D59E6E 28%, #93542F 58%, #DEAB7E 82%, #8A4F2E 100%);
  --silver-metal: linear-gradient(180deg, #FFFFFF 0%, #E6EAEE 46%, #AEB9C5 100%);
  --diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0 10 5 5 10 0 5z' fill='%23C98D5E'/%3E%3C/svg%3E");

  --serif: "Marcellus", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --content: 1200px;
  --section: clamp(80px, 10vw, 140px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #2A4560 var(--ink-1);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  color: var(--body);
  font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* one light source, top right, where the coin sits; a faint warm reflection top left */
  background:
    radial-gradient(52rem 44rem at 74% 27rem, var(--glow), transparent 70%),
    radial-gradient(34rem 24rem at 0 0, rgba(201, 141, 94, 0.07), transparent 70%),
    var(--ink-1);
  background-repeat: no-repeat;
}
body.page {
  background:
    radial-gradient(56rem 30rem at 50% 0, var(--glow), transparent 70%),
    var(--ink-1);
  background-repeat: no-repeat;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--head);
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

::selection { background: rgba(201, 141, 94, 0.38); color: #FFFFFF; }

:focus-visible {
  outline: 2px solid var(--copper-text);
  outline-offset: 4px;
  border-radius: 3px;
}

[id] { scroll-margin-top: 24px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--head);
  color: var(--ink-1);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Silver and copper as metal: a gradient through the letters, plain colour where the browser cannot. */
.metal { color: var(--head); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .metal {
    background: var(--silver-metal);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* The engraved ornament over a heading: a copper diamond and a rule fading out. */
.ornament {
  display: block;
  width: 120px;
  height: 9px;
  margin-bottom: 22px;
  background:
    var(--diamond) left center / 9px 9px no-repeat,
    linear-gradient(90deg, var(--copper), rgba(201, 141, 94, 0)) 17px center / calc(100% - 17px) 1px no-repeat;
}
.ornament-center {
  width: 180px;
  margin-inline: auto;
  background:
    var(--diamond) center / 9px 9px no-repeat,
    linear-gradient(90deg, rgba(201, 141, 94, 0), var(--copper)) left center / calc(50% - 12px) 1px no-repeat,
    linear-gradient(90deg, var(--copper), rgba(201, 141, 94, 0)) right center / calc(50% - 12px) 1px no-repeat;
}

/* ---------- header ---------- */

.site-header { position: relative; }
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--head);
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; }
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.035em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: left center;
}
.nav a:hover { color: var(--head); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--head); }

/* "Get the app": the one copper-rimmed control in the header */
.nav .nav-cta a {
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--ink-1), var(--ink-1)) padding-box,
    var(--copper-metal) border-box;
  color: var(--head);
}
.nav .nav-cta a::after { display: none; }
.nav .nav-cta a:hover {
  background:
    linear-gradient(#152B40, #152B40) padding-box,
    var(--copper-metal) border-box;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 104px) clamp(80px, 10vw, 148px); }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.hero h1 {
  font-size: clamp(2.6rem, 1.45rem + 4.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  padding-bottom: 0.06em;   /* the gradient clips descenders without it */
}
.lede {
  margin-top: 28px;
  max-width: 30em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.65;
}

.assurances {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--copper-text);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.assurances li { display: inline-flex; align-items: center; }
.assurances li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline: 14px;
  background: var(--silver);
  opacity: 0.55;
  transform: rotate(45deg);
}

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin-top: 40px;
}
.play-badge { display: inline-block; border-radius: 10px; }
.play-badge img {
  width: 206px;
  max-width: none;
  margin: -13px -13px -13px -13px;   /* the badge file carries its own clear space; its art lines up with the text */
}
.get-note { color: var(--muted); font-size: 0.875rem; }

.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
}
.coin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}
.hero-art picture { position: absolute; inset: 13%; }
.hero-art .emblem {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}

/* ---------- sections ---------- */

.section { padding-block: var(--section); }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 60px); }
.section h2 {
  font-size: clamp(2.1rem, 1.35rem + 2.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.008em;
}
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.125rem; }

/* ---------- tools: the ledger plate ---------- */

.tools {
  position: relative;
  background:
    radial-gradient(60rem 26rem at 50% 0, rgba(46, 96, 140, 0.20), transparent 70%),
    linear-gradient(180deg, var(--ink-2), var(--ink-3) 55%, var(--ink-2));
}
.tools::before,
.tools::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 141, 94, 0.5) 50%, transparent);
}
.tools::before { top: 0; }
.tools::after { bottom: 0; }

.plate {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 40%),
    rgba(6, 13, 21, 0.38);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.plate::before {                 /* the inner frame */
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.plate::after {                  /* a copper diamond on each corner of the inner frame */
  content: "";
  position: absolute;
  inset: 1.5px;
  pointer-events: none;
  background:
    var(--diamond) left top / 9px 9px no-repeat,
    var(--diamond) right top / 9px 9px no-repeat,
    var(--diamond) left bottom / 9px 9px no-repeat,
    var(--diamond) right bottom / 9px 9px no-repeat;
}

.ledger { margin: 0; padding: 0; list-style: none; }
.entry {
  display: grid;
  grid-template-columns: 60px minmax(0, 0.95fr) minmax(0, 1.7fr);
  gap: 18px clamp(24px, 4vw, 56px);
  padding: clamp(30px, 4vw, 52px) clamp(18px, 3.5vw, 46px);
}
.entry + .entry { border-top: 1px solid var(--line); }

.folio {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--copper);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .folio {
    background: var(--copper-metal);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.entry h3 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); line-height: 1.15; }
.entry-game { margin-top: 8px; color: var(--muted); }
.status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--head);
  font-size: 0.9375rem;
  font-weight: 500;
}
.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(201, 141, 94, 0.16);
}
.status-soon { color: var(--muted); }
.status-soon .dot { background: transparent; border: 1.5px solid var(--copper); box-shadow: none; }

.entry-body > p { font-size: 1.125rem; color: var(--head); max-width: 40em; }
.diamonds { margin: 22px 0 0; padding: 0; list-style: none; }
.diamonds li { position: relative; padding-left: 24px; }
.diamonds li + li { margin-top: 12px; }
.diamonds li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  background: var(--copper);
  transform: rotate(45deg);
}
@media (min-width: 1080px) {
  .entry-body .diamonds { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 36px; }
  .entry-body .diamonds li + li { margin-top: 0; }
}

.entry-link,
.link-copper {
  display: inline-block;
  margin-top: 26px;
  color: var(--copper-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(220, 168, 122, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.entry-link:hover,
.link-copper:hover { color: var(--copper-hi); text-decoration-color: currentColor; }

/* ---------- your data: a ledger of promises ---------- */

.promise-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(36px, 6vw, 104px);
}
.promise-head .link-copper { margin-top: 30px; }
.promise-list { margin: 0; border-top: 1px solid var(--line-2); }
.promise-list > div {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, 1.4fr);
  align-items: baseline;
  gap: 6px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-2);
}
.promise-list dt {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--head);
}
.promise-list dt::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--copper);
  transform: rotate(45deg);
}
.promise-list dd { margin: 0; padding-top: 3px; }

/* ---------- contact: the seal ---------- */

.contact {
  position: relative;
  text-align: center;
  background: radial-gradient(40rem 22rem at 50% 55%, rgba(46, 96, 140, 0.22), transparent 70%);
}
.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, 86%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.seal { max-width: 760px; }
.seal-mark { width: 64px; height: 64px; margin: 0 auto 28px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.contact p { margin-top: 18px; font-size: 1.125rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-top: 36px;
  padding: 13px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--ink-1), var(--ink-1)) padding-box,
    var(--copper-metal) border-box;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
  color: var(--head);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pill:hover {
  background:
    linear-gradient(#152B40, #152B40) padding-box,
    var(--copper-metal) border-box;
}
.pill svg { width: 20px; height: 20px; flex: none; color: var(--copper-text); }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  padding-block: 64px 44px;
  background: var(--ink-0);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 141, 94, 0.45) 50%, transparent);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .wordmark { font-size: 1.3125rem; }
.footer-brand .brand img { width: 32px; height: 32px; }
.footer-brand p { margin-top: 12px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 0;
  padding: 6px 0 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding-block: 4px;
  color: var(--body);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}
.footer-links a:hover { color: var(--head); border-bottom-color: var(--copper); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 48px;
  padding-top: 24px;
}
.legal { max-width: 78ch; font-size: 0.8125rem; line-height: 1.65; }

/* ---------- document pages (privacy, 404) ---------- */

.doc {
  width: min(100% - 2 * var(--gutter), 760px);
  margin-inline: auto;
  padding-block: clamp(56px, 8vw, 104px) var(--section);
}
.doc-head h1 {
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  padding-bottom: 0.06em;
}
.doc-sub { margin-top: 14px; color: var(--copper-text); font-size: 1.1875rem; }
.doc-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.doc-dates div { display: flex; gap: 8px; }
.doc-dates dd { margin: 0; color: var(--body); }
.double-rule {
  height: 0;
  margin: 40px 0 8px;
  border: 0;
  border-top: 3px double rgba(205, 212, 220, 0.24);
}
.doc h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 48px;
  font-size: 1.75rem;
  line-height: 1.25;
}
.doc h2::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--copper);
  transform: rotate(45deg);
}
.doc h2 + p, .doc h2 + ul { margin-top: 16px; }
.doc p + p, .doc ul + p, .doc p + ul { margin-top: 18px; }
.doc p, .doc li { line-height: 1.75; }
.doc .diamonds { margin-top: 18px; }
.doc a:not(.pill) {
  color: var(--copper-text);
  text-decoration-color: rgba(220, 168, 122, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.doc a:not(.pill):hover { color: var(--copper-hi); text-decoration-color: currentColor; }

.notfound { text-align: center; padding-block: clamp(72px, 12vw, 160px); }
.notfound img { width: 96px; height: 96px; margin: 0 auto 32px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.notfound h1 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem); line-height: 1.05; padding-bottom: 0.06em; }
.notfound p { margin-top: 18px; font-size: 1.125rem; }

/* ---------- tool pages (the RE4 gem calculator) ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--muted); }

.tool { padding-block: clamp(36px, 5vw, 72px) var(--section); }
.tool-head { max-width: 880px; margin-bottom: clamp(32px, 4vw, 52px); }
.tool-head h1 {
  margin-top: 26px;
  font-size: clamp(2.2rem, 1.35rem + 3.1vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  padding-bottom: 0.06em;
}
.tool-head .lede { max-width: 40em; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.875rem;
}
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline: 12px;
  background: var(--copper);
  transform: rotate(45deg);
}
.crumbs a { color: var(--body); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.crumbs a:hover { color: var(--head); border-bottom-color: var(--copper); }

/* the calculator: controls left, the merchant's price right */
.calc { --gem-red: #D6435A; --gem-blue: #4E7FE3; --gem-yellow: #E9C14B; --gem-green: #38B377; --gem-purple: #A779E3; --gem-rose: #EC7895; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.calc-controls { padding: clamp(24px, 3.5vw, 44px); }
.calc-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.5vw, 44px);
  border-left: 1px solid var(--line);
  background: radial-gradient(26rem 18rem at 60% 40%, rgba(46, 96, 140, 0.22), transparent 70%);
}
.field label,
.calc-slots legend,
.slot label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.calc-slots { min-width: 0; margin: 26px 0 0; padding: 0; border: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }

.calc select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 10px 42px 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23DCA87A' stroke-width='1.5'/%3E%3C/svg%3E") right 16px center / 12px 8px no-repeat,
    rgba(6, 13, 21, 0.55);
  color: var(--head);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.calc select:hover { border-color: rgba(201, 141, 94, 0.6); }
.calc select:focus-visible { outline: 2px solid var(--copper-text); outline-offset: 2px; }
.calc option { background: #0D1C2B; color: #F3F5F8; }

.slot-row { position: relative; }
.slot select { padding-left: 40px; }
.swatch {                        /* the gem in the slot: a diamond for square slots, a disc for round ones */
  position: absolute;
  left: 15px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1.5px dashed var(--line-2);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}
.slot[data-shape="round"] .swatch { border-radius: 50%; transform: translateY(-50%); }
.slot[data-color="red"] .swatch { background: var(--gem-red); border-color: transparent; }
.slot[data-color="blue"] .swatch { background: var(--gem-blue); border-color: transparent; }
.slot[data-color="yellow"] .swatch { background: var(--gem-yellow); border-color: transparent; }
.slot[data-color="green"] .swatch { background: var(--gem-green); border-color: transparent; }
.slot[data-color="purple"] .swatch { background: var(--gem-purple); border-color: transparent; }
.slot[data-color="rose"] .swatch { background: var(--gem-rose); border-color: transparent; }

.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.calc:not(.is-ready) .calc-actions { display: none; }
.btn {
  -webkit-appearance: none;
  appearance: none;
  min-height: 46px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--ink-1), var(--ink-1)) padding-box,
    var(--copper-metal) border-box;
  color: var(--head);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover {
  background:
    linear-gradient(#152B40, #152B40) padding-box,
    var(--copper-metal) border-box;
}
.btn-quiet { background: transparent; border-color: var(--line-2); color: var(--body); }
.btn-quiet:hover { background: transparent; border-color: var(--copper); color: var(--head); }

.result-label { color: var(--muted); font-size: 0.9375rem; }
.result-price {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem);
  line-height: 1.05;
  color: var(--head);
}
.result-price .unit { margin-left: 4px; font-family: var(--sans); font-size: 1rem; color: var(--muted); }
.result-lines { margin: 24px 0 0; border-top: 1px solid var(--line); }
.result-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.result-lines dt { color: var(--muted); }
.result-lines dd { margin: 0; color: var(--head); font-variant-numeric: tabular-nums; text-align: right; }
.result-note { min-height: 1.7em; margin-top: 16px; color: var(--copper-text); font-size: 0.9375rem; }
.calc-noscript { padding: 0 clamp(24px, 3.5vw, 44px) 28px; color: var(--copper-text); }

.tool-section { margin-top: clamp(72px, 9vw, 120px); }
.tool-section h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem); line-height: 1.1; }
.section-sub { max-width: 46em; margin-top: 14px; color: var(--muted); }
.fine { margin-top: 18px; color: var(--muted); font-size: 0.875rem; }
.how-list { margin-top: 30px; }

/* tables: engraved rows on a dark plate; wide ones scroll inside their frame on a phone */
.table-wrap {
  --plate: #09131E;
  max-height: 30rem;             /* about eight rows; the rest scrolls inside the frame */
  margin-top: 28px;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  /* "more below": a soft shadow at the frame's bottom edge, covered by the content's own end once it is reached */
  background:
    linear-gradient(rgba(9, 19, 30, 0), var(--plate) 70%) bottom / 100% 48px no-repeat local,
    radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.6), transparent) bottom / 100% 20px no-repeat scroll,
    var(--plate);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 141, 94, 0.55) transparent;
}
.table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(201, 141, 94, 0.5) padding-box;
}
.table-wrap::-webkit-scrollbar-thumb:hover { background-color: rgba(220, 168, 122, 0.8); }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th,
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table thead th {
  position: sticky;              /* the column names stay while the rows scroll */
  top: 0;
  z-index: 1;
  border-bottom: 0;
  background: #0E1925;
  box-shadow: inset 0 -1px 0 var(--line-2);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.data-table tbody th {
  color: var(--head);
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 400;
  white-space: nowrap;
}
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .strong { color: var(--head); font-weight: 600; }
.data-table a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.data-table a:hover { border-bottom-color: var(--copper); }
.data-table th button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
.data-table th button:hover { color: var(--head); }
.data-table th[aria-sort] button { color: var(--head); }
.data-table th[aria-sort] button::after {
  content: "";
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid var(--copper);
}
.data-table th[aria-sort="descending"] button::after { border-bottom: 0; border-top: 5px solid var(--copper); }

/* the app banner */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  margin-top: clamp(72px, 9vw, 120px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid transparent;
  border-radius: 6px;
  background:
    radial-gradient(40rem 18rem at 85% 50%, rgba(46, 96, 140, 0.32), transparent 70%) padding-box,
    linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
    var(--copper-metal) border-box;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.cta-copy { flex: 1 1 380px; max-width: 620px; }
.cta h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.15; }
.cta p { margin-top: 12px; }
.cta .get { margin-top: 0; }

/* questions: engraved rows that open */
.faq { margin-top: 28px; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  color: var(--head);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--copper), var(--copper)) center / 13px 1.5px no-repeat,
    linear-gradient(var(--copper), var(--copper)) center / 1.5px 13px no-repeat;
}
.faq details[open] summary::after { background: linear-gradient(var(--copper), var(--copper)) center / 13px 1.5px no-repeat; }
.faq summary:hover { color: #FFFFFF; }
.faq details p { max-width: 46em; padding: 0 0 26px; }

/* the home page's two links under Pesetas Ledger */
.entry-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 26px; }
.entry-links .entry-link { margin-top: 0; }

/* ---------- smaller screens ---------- */

@media (max-width: 880px) {
  body:not(.page) {
    background:
      radial-gradient(36rem 30rem at 50% 15rem, var(--glow), transparent 70%),
      radial-gradient(24rem 18rem at 0 0, rgba(201, 141, 94, 0.07), transparent 70%),
      var(--ink-1);
    background-repeat: no-repeat;
  }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; justify-self: center; max-width: 270px; }
  .promise-inner { grid-template-columns: minmax(0, 1fr); }
  .entry { grid-template-columns: 46px minmax(0, 1fr); }
  .entry-body { grid-column: 2; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-result { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  /* tables become one block per row: name and price on top, each detail on its own labelled line */
  .table-wrap { max-height: 34rem; }
  .data-table { min-width: 0; }
  .data-table thead { display: none; }
  .data-table tbody { display: block; }
  .data-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
  }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table tbody th,
  .data-table tbody td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  .data-table tbody th { grid-column: 1; grid-row: 1; font-size: 1.1875rem; }
  .data-table tbody td { grid-column: 1 / -1; }
  .data-table tbody .num { text-align: left; white-space: normal; }
  .data-table tbody td:not([data-label]) { grid-column: 2; grid-row: 1; align-self: center; text-align: right; color: var(--head); font-size: 1.0625rem; }
  .data-table tbody td[data-label] { display: grid; grid-template-columns: 6.8em minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
  .data-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8125rem;
  }
}
@media (max-width: 600px) {
  .nav .nav-cta { display: none; }
  .promise-list > div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .entry { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .entry-body { grid-column: auto; }
  .folio { font-size: 1.9rem; }
}
@media (max-width: 420px) {
  .brand img { width: 32px; height: 32px; }
  .brand { gap: 10px; }
  .wordmark { font-size: 1.3125rem; }
  .nav { gap: 4px 18px; }
  .nav a { font-size: 0.875rem; }
}

@media (forced-colors: active) {
  .metal, .folio { background: none; color: CanvasText; }
}

@media (prefers-reduced-motion: no-preference) {
  .nav a, .nav a::after, .pill, .entry-link, .link-copper, .footer-links a {
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 220ms ease, text-decoration-color 180ms ease;
  }
}

@media print {
  body, .tools, .site-footer, .contact { background: #fff; color: #000; }
  h1, h2, h3, .wordmark, .pill, .status, .metal, .folio { color: #000; background: none; }
  .site-header nav, .skip, .hero-art { display: none; }
}
