/* Ștanța de pe bijuterie — the assayer's bench. Dark velvet by default. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/stanta-aur-argint/assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/stanta-aur-argint/assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
:root {
  --bg: #14110d;
  --bg-surface: #1e1a14;
  --bg-raised: #282219;
  --bg-input: #0e0c09;
  --text-primary: #f3edde;
  --text-secondary: #cfc3ac;
  --text-muted: #a89c84;
  --border: #3a3226;
  --border-strong: #5a4d3a;
  --gold: #e2ab3c;
  --gold-ink: #eec25e;
  --gold-deep: #2a2113;
  --silver: #ccd2dc;
  --platinum: #9db8d2;
  --palladium: #c4b9a6;
  --ok-bg: rgba(140, 220, 150, 0.13);
  --ok-ink: #a5e3a8;
  --warn-bg: rgba(226, 171, 60, 0.14);
  --warn-ink: #f0c66c;
  --mut-bg: rgba(200, 190, 170, 0.12);
  --mut-ink: #cfc3ac;
  --clay-bg: rgba(221, 138, 90, 0.14);
  --clay-ink: #efa873;
  --link: #eec25e;
  --focus: #eec25e;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}
[data-theme="light"] {
  --bg: #fdfdfa;
  --bg-surface: #f4f1e8;
  --bg-raised: #ece7d9;
  --bg-input: #ffffff;
  --text-primary: #1c1a15;
  --text-secondary: #4e4738;
  --text-muted: #6e6553;
  --border: #ddd5c2;
  --border-strong: #bfae8c;
  --gold: #8a5f14;
  --gold-ink: #6e4c0b;
  --gold-deep: #f4e8cf;
  --silver: #7d8592;
  --platinum: #5d7a99;
  --palladium: #7a6f5c;
  --ok-bg: rgba(31, 107, 46, 0.12);
  --ok-ink: #1c5f2a;
  --warn-bg: rgba(138, 95, 20, 0.13);
  --warn-ink: #6e4c0b;
  --mut-bg: rgba(110, 101, 83, 0.13);
  --mut-ink: #4e4738;
  --clay-bg: rgba(170, 84, 40, 0.12);
  --clay-ink: #93431f;
  --link: #6e4c0b;
  --focus: #6e4c0b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--serif);
  line-height: 1.6;
  font-size: 1.0625rem;
}
::selection { background: var(--warn-bg); }
a { color: var(--link); }
a:hover { color: var(--text-primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: 0.6rem; top: -3rem; z-index: 60;
  background: var(--bg-raised); color: var(--text-primary);
  padding: 0.5rem 0.9rem; border-radius: 8px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip:focus { top: 0.6rem; }
.wrap { max-width: 44rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 1.5rem); }
#decoder .wrap, #scara .wrap, #titluri .wrap { max-width: 62rem; }
section { scroll-margin-top: 3.6rem; }
section:not(.hero):not(.share) { padding-block: clamp(2.6rem, 7vw, 4.2rem); }

/* Topbar: one line, always. */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.55rem clamp(1rem, 4vw, 1.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  min-height: 3.2rem;
}
.topbar .home {
  font-family: var(--sans); font-size: 0.82rem; color: var(--text-secondary);
  text-decoration: none; white-space: nowrap;
}
.topnav {
  display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  font-family: var(--sans); font-size: 0.85rem;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--text-secondary); text-decoration: none; padding-block: 0.3rem; }
.topnav a:hover { color: var(--text-primary); }
.topnav a[aria-current="true"] { color: var(--text-primary); font-weight: 700; }
.spacer { flex: 1 1 auto; }
.chip {
  font-family: var(--sans); font-size: 0.78rem; text-decoration: none; color: var(--text-secondary);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.3rem 0.75rem; white-space: nowrap;
}
.chip:hover { color: var(--text-primary); border-color: var(--gold); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-secondary);
  cursor: pointer; flex: none;
}
.icon-btn:hover { color: var(--text-primary); border-color: var(--gold); }
.icon-btn svg { display: block; }
.icon-btn svg[hidden] { display: none; }

/* Reading rail. */
.rail {
  position: fixed; right: max(0.6rem, calc((100vw - 78rem) / 2)); top: 50%;
  transform: translateY(-50%); z-index: 40;
  display: none; flex-direction: column; gap: 0.15rem;
}
@media (min-width: 70rem) { .rail { display: flex; } }
.rail-dot {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  text-decoration: none; padding: 0.35rem 0.2rem;
}
.rail-label { font-family: var(--sans); font-size: 0.72rem; color: var(--text-muted); opacity: 0; transition: opacity 0.15s ease; }
.rail-dot:hover .rail-label, .rail-dot[aria-current="true"] .rail-label { opacity: 1; }
.rail-dot .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--border-strong); flex: none; }
.rail-dot[aria-current="true"] .dot { background: var(--gold); }

/* Hero + decoder. */
.hero { padding-block: clamp(2.4rem, 6vw, 4rem) clamp(2rem, 5vw, 3rem); text-align: center; }
.kicker { font-family: var(--sans); font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.7rem; }
.hero h1 {
  font-family: var(--display); font-weight: 640; font-optical-sizing: auto;
  font-size: clamp(2.3rem, 6.4vw, 3.9rem); line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 auto 0.9rem; max-width: 20ch; text-wrap: balance;
}
.deck { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--text-secondary); margin: 0 auto 0.7rem; max-width: 42rem; }
.byline { font-family: var(--sans); font-size: 0.8rem; color: var(--text-muted); margin: 0 0 2rem; }
#decoder-form { max-width: 38rem; margin-inline: auto; }
#decoder-form label { display: block; font-family: var(--sans); font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.qrow { display: flex; gap: 0.6rem; }
#q {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 7vw, 3.4rem);
  text-align: center; letter-spacing: 0.04em; color: var(--text-primary);
  background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 0.55rem 0.8rem; caret-color: var(--gold);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] #q { box-shadow: inset 0 2px 10px rgba(110, 90, 40, 0.12); }
#q::placeholder { color: var(--text-muted); opacity: 0.55; font-weight: 400; }
.go {
  flex: none; align-self: stretch; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  color: #1c1305; background: var(--gold); border: 1px solid var(--gold); border-radius: 14px;
  padding-inline: 1.4rem; cursor: pointer; min-height: 3.4rem;
}
[data-theme="light"] .go { background: #e2ab3c; border-color: #c9962e; }
.go:hover { filter: brightness(1.08); }
.go:active { transform: translateY(1px); }
.wrow { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin-top: 0.9rem; }
.wrow label { font-family: var(--sans); font-size: 0.83rem; color: var(--text-muted); }
#w {
  width: 7.5rem; font-family: var(--sans); font-size: 1rem; text-align: center; color: var(--text-primary);
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.5rem 0.6rem; min-height: 2.75rem;
}
#w:focus { border-color: var(--gold); }
#w::placeholder { color: var(--text-muted); opacity: 0.6; font-size: 0.85rem; }
.qhint { font-family: var(--sans); font-size: 0.82rem; color: var(--text-muted); margin: 0.6rem 0 0; }
.chips { font-family: var(--sans); font-size: 0.85rem; color: var(--text-muted); margin: 1rem 0 0; }
.chips span { margin-right: 0.3rem; }
.chips button {
  font: inherit; color: var(--text-secondary); background: transparent;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.42rem 0.85rem; margin: 0.15rem; cursor: pointer; min-height: 2.5rem;
}
.chips button:hover { color: var(--text-primary); border-color: var(--gold); background: var(--warn-bg); }
.noscript-note {
  max-width: 38rem; margin: 1.6rem auto 0; padding: 1rem 1.2rem;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-surface);
  font-size: 0.95rem; text-align: left;
}

/* Verdict plate. */
.verdict {
  max-width: 44rem; margin: 1.8rem auto 0; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: 16px;
  padding: clamp(1.3rem, 4vw, 2.2rem); position: relative;
  transition: opacity 0.16s ease;
}
.verdict::before {
  content: ""; position: absolute; top: -1px; left: 2rem; right: 2rem; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  border-radius: 2px;
}
.verdict.swap { opacity: 0.2; }
.v-example { font-family: var(--sans); font-size: 0.78rem; color: var(--text-muted); margin: 0 0 0.9rem; }
.v-top { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 0.4rem; }
.v-num {
  font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 9vw, 4.6rem);
  line-height: 1; margin: 0; color: var(--text-primary); letter-spacing: 0.01em; flex: none;
}
.verdict[data-metals="au"] .v-num { color: var(--gold-ink); }
.verdict[data-metals="ag"] .v-num { color: var(--silver); }
.verdict[data-metals="pt"] .v-num, .verdict[data-metals="pd"] .v-num { color: var(--platinum); }
.v-kicker { font-family: var(--sans); font-size: 0.75rem; color: var(--text-muted); margin: 0 0 0.2rem; }
.v-name { font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1.15; margin: 0; text-wrap: balance; }
.v-badge { margin: 0.7rem 0 0; }
.badge {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 0.82rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
}
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.mut { background: var(--mut-bg); color: var(--mut-ink); }
.badge.clay { background: var(--clay-bg); color: var(--clay-ink); }
.v-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin: 1.1rem 0 0; }
.v-facts > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.95rem; }
.v-facts dt { font-family: var(--sans); font-size: 0.75rem; color: var(--text-muted); }
.v-facts dd { margin: 0.1rem 0 0; font-size: 1.12rem; font-weight: 700; }
@media (max-width: 30rem) { .v-facts { grid-template-columns: 1fr; } }
.permille { height: 0.65rem; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border); margin-top: 0.9rem; overflow: hidden; }
.permille > span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.permille.m-ag > span { background: var(--silver); }
.permille.m-pt > span, .permille.m-pd > span { background: var(--platinum); }
.permille.m-au.m-ag > span { background: linear-gradient(90deg, var(--gold) 50%, var(--silver) 50%); }
.permille.m-pt.m-pd > span { background: linear-gradient(90deg, var(--platinum) 50%, var(--palladium) 50%); }
.v-note { margin: 1rem 0 0; font-size: 1.02rem; }
.v-shape { margin: 0.7rem 0 0; font-size: 0.95rem; color: var(--text-secondary); }
.v-grams {
  margin: 0.9rem 0 0; padding: 0.7rem 0.95rem; font-size: 1.05rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.v-warn { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--border); font-family: var(--sans); font-size: 0.82rem; color: var(--text-muted); }
.v-share { margin: 0.9rem 0 0; display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.ghost-btn {
  font-family: var(--sans); font-size: 0.85rem; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 0.6rem 1rem; cursor: pointer; min-height: 2.75rem;
}
.ghost-btn:hover { color: var(--text-primary); border-color: var(--gold); }
.v-status { font-family: var(--sans); font-size: 0.82rem; color: var(--ok-ink); }
.v-more { margin: 0.9rem 0 0; font-family: var(--sans); font-size: 0.9rem; }
.v-fallback { font-family: var(--sans); font-size: 0.85rem; color: var(--text-primary); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; padding: 0.5rem 0.7rem; max-width: 100%; }

/* Share. */
.share { border-block: 1px solid var(--border); background: var(--bg-surface); scroll-margin-top: 3.6rem; }
.sharewrap { max-width: 60rem; padding-block: clamp(1.4rem, 4vw, 2rem); }
.share h2 { font-family: var(--sans); font-size: 0.95rem; margin: 0 0 0.3rem; }
.share-summary { margin: 0; color: var(--text-secondary); font-size: 1rem; }
.share-checked { font-family: var(--sans); font-size: 0.8rem; color: var(--text-muted); margin: 0.3rem 0 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.share-open, .share-btn {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600; text-decoration: none;
  color: var(--text-primary); background: transparent; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 0.72rem 1.15rem; cursor: pointer; min-height: 3rem;
  display: inline-flex; align-items: center;
}
.share-open { background: var(--gold); border-color: var(--gold); color: #1c1305; }
[data-theme="light"] .share-open { background: #e2ab3c; border-color: #c9962e; }
.share-open:hover { filter: brightness(1.08); }
.share-btn:hover { border-color: var(--gold); }
.share-status { font-family: var(--sans); font-size: 0.85rem; color: var(--ok-ink); min-height: 1.4em; margin: 0.6rem 0 0; }

/* Sections. */
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.65rem, 4.4vw, 2.3rem); line-height: 1.12; margin: 0 0 0.8rem; text-wrap: balance; }
h3 { font-size: 1.12rem; margin: 1.8rem 0 0.5rem; }
.plink {
  color: var(--text-muted); opacity: 0.55; text-decoration: none; font-size: 0.7em;
  display: inline-block; min-width: 2.75rem; min-height: 2.75rem; line-height: 2.75rem; text-align: center;
}
.plink:hover, .plink:focus-visible { opacity: 1; color: var(--gold-ink); }
.note { font-family: var(--sans); font-size: 0.86rem; color: var(--text-muted); }

/* Ruler: two lanes, one scale. Legal titles above, foreign marks below. */
.ruler { position: relative; height: 19rem; margin: 2.2rem 0 0.6rem; padding-inline: 1rem; }
.ruler .track { position: absolute; left: 1rem; right: 1rem; height: 2px; background: var(--border-strong); }
.ruler .track.legal { top: 32%; }
.ruler .track.foreign { top: 74%; }
.ruler .major { position: absolute; top: 0.8rem; transform: translateX(-50%); }
.ruler .major i { font-style: normal; font-family: var(--sans); font-size: 0.68rem; color: var(--text-muted); }
.tick {
  position: absolute; transform: translateX(-50%); background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; padding: 0;
  pointer-events: none; scroll-margin-top: 4.5rem;
}
.tick > * { pointer-events: auto; }
.tick.up { top: 0; bottom: 68%; justify-content: flex-end; }
.tick.dn { top: 74%; bottom: 0; justify-content: flex-start; }
.tick.up .tick-dot { margin-bottom: -0.4rem; }
.tick.dn .tick-dot { margin-top: -0.4rem; }
.tick-stem { width: 2px; background: var(--border-strong); flex: none; }
.tick.h0 .tick-stem { height: 0.4rem; }
.tick.h1 .tick-stem { height: 1.3rem; }
.tick.h2 .tick-stem { height: 2.2rem; }
.tick.h3 .tick-stem { height: 3.1rem; }
.tick:focus { outline: none; }
.tick:focus-visible { outline: none; }
.tick:focus-visible .tick-num { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.tick-num { padding: 0.25rem 0.5rem; }
.tick-num { font-family: var(--sans); font-weight: 700; font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }
.tick:hover .tick-num, .tick:focus-visible .tick-num { color: var(--text-primary); }
.tick[aria-current="true"] .tick-num { color: var(--gold-ink); }
.tick-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--gold); border: 2px solid var(--gold); flex: none; }
.tick.m-ag .tick-dot { background: var(--silver); border-color: var(--silver); }
.tick.m-pt .tick-dot, .tick.m-pd .tick-dot { background: var(--platinum); border-color: var(--platinum); }
.tick.amb.m-au.m-ag .tick-dot { background: linear-gradient(135deg, var(--gold) 50%, var(--silver) 50%); border-color: var(--text-muted); }
.tick.amb.m-pt.m-pd .tick-dot { background: linear-gradient(135deg, var(--platinum) 50%, var(--palladium) 50%); border-color: var(--text-muted); }
.tick.dn .tick-dot { background: transparent; }
.tick.dn.m-au .tick-dot { border-color: var(--gold); }
.tick.dn.m-ag .tick-dot { border-color: var(--silver); }
.tick.dn.amb .tick-dot { border-color: var(--text-muted); }

/* Table. */
.karats { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 1.4rem; }
.karats button {
  font-family: var(--sans); font-size: 0.83rem; font-weight: 600; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.5rem 0.9rem; cursor: pointer; min-height: 2.75rem;
}
.karats button:hover { color: var(--text-primary); border-color: var(--gold); background: var(--warn-bg); }
.tscroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 40rem; }
th, td { text-align: left; padding: 0.68rem 0.9rem; border-bottom: 1px solid var(--border); }
thead th { font-family: var(--sans); font-size: 0.76rem; color: var(--text-muted); font-weight: 600; background: var(--bg-surface); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-surface); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rowbtn {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--gold-ink);
  background: none; border: none; padding: 0.35rem 0.2rem; cursor: pointer; text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent); text-underline-offset: 3px;
}
.rowbtn:hover { color: var(--text-primary); text-decoration-color: var(--gold); }

/* Marks + FAQ + method. */
.marks { margin: 0; }
.marks > div { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.9rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.marks > div:last-child { border-bottom: none; }
.marks dt { margin: 0; }
.marks dd { margin: 0; }
.qa { margin-top: 1.5rem; }
.qa h3 { font-size: 1.08rem; margin: 0 0 0.3rem; }
.qa p { margin: 0; color: var(--text-secondary); }
#metoda p, #intrebari > .wrap > p, #semne > .wrap > p, #scara > .wrap > p, #titluri > .wrap > p { color: var(--text-secondary); }
#metoda strong { color: var(--text-primary); }

/* Footer. */
.site-footer { border-top: 1px solid var(--border); padding-block: 1.8rem 2.4rem; }
.site-footer nav { display: flex; gap: 1.2rem; font-family: var(--sans); font-size: 0.85rem; margin-bottom: 0.5rem; }
.site-footer nav a { color: var(--text-secondary); text-decoration: none; }
.site-footer nav a:hover { color: var(--text-primary); }
.site-footer p { font-family: var(--sans); font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.wrap.narrow { max-width: 40rem; padding-block: 4rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
