/* Layout: the ring's design picked from drawn thumbnails, its metal and sizes; a verdict card in
   traffic-light colours with the reasons, the metal to add or remove, and the ring drawn with the
   cut at the back; then the alternatives when sizing is not possible, and sources. */
:root {
  --paper: #ffffff;
  --ink: #16161a;
  --ink-soft: #3d3d45;
  --muted: #6b6b75;
  --rule: #e4e2de;
  --mist: #f4f3f1;
  --ruby: #9b1b30;
  --gold: #b8892f;
  --ok: #2f7d4f;
  --care: #b7791f;
  --no: #9b1b30;
  --metal: #e6c98e;
  --metal-dark: #8a6a33;
  --stage: #f4f1ea;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  --paper: #121216; --ink: #f1efe9; --ink-soft: #c9c6bf; --muted: #9a978f; --rule: #2c2c33; --mist: #1b1b21;
  --ruby: #e0566c; --gold: #e1b25a; --ok: #5fbf86; --care: #e3a948; --no: #e0566c; --stage: #1a1b20; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; margin: 0; }
a { color: var(--ink); text-decoration-color: var(--ruby); text-underline-offset: 3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 48px; display: grid; gap: 24px; }
header.top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ruby); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; flex: none; width: 4px; height: 15px; background: var(--gold); clip-path: polygon(0 24%, 100% 0, 100% 76%, 0 100%); }
h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.03; letter-spacing: -.01em; margin: 6px 0 0; text-wrap: balance; }
h2.sec { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin: 0; line-height: 1.1; }
.lede { max-width: 66ch; color: var(--ink-soft); margin: 6px 0 0; }
.prototype { font-size: 12px; color: var(--muted); border: 1px solid var(--rule); padding: 4px 10px; white-space: nowrap; }
.help { font-size: 12px; color: var(--muted); margin: 0; }
.label { font-size: 13px; font-weight: 600; }
section.study { border-top: 1px solid var(--ink); padding-top: 18px; display: grid; gap: 14px; }

.designs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.design { border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: 8px 6px 10px; cursor: pointer; display: grid; gap: 4px; justify-items: center; font: 600 12.5px var(--font-body); text-align: center; }
.design svg { width: 72px; height: 72px; }
.design[aria-pressed="true"] { border: 2px solid var(--ink); padding: 7px 5px 9px; background: var(--mist); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: 600 13px var(--font-body); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 5px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ruby); outline-offset: 2px; }
select, input[type=number] { font: 500 15px var(--font-body); color: var(--ink); background: var(--paper); border: 1px solid var(--ink); padding: 7px 9px; border-radius: 0; width: 100%; }
.inputs { display: grid; gap: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 5px; }

.result { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .result { grid-template-columns: 1fr; } }
.verdict { border-left: 6px solid var(--ok); background: var(--mist); padding: 14px 16px; display: grid; gap: 10px; }
.verdict.care { border-left-color: var(--care); } .verdict.no { border-left-color: var(--no); }
.verdict .v { font-family: var(--font-display); font-size: clamp(28px, 4vw, 38px); line-height: 1.05; margin: 0; }
.verdict.ok .v { color: var(--ok); } .verdict.care .v { color: var(--care); } .verdict.no .v { color: var(--no); }
.verdict ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--ink-soft); font-size: 14px; }
.verdict li small { color: var(--muted); }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--rule); padding-top: 10px; }
.nums div { display: grid; gap: 2px; }
.nums b { font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 5.6vw, 24px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nums span { font-size: 12px; color: var(--muted); }
.view { background: var(--stage); padding: 10px; display: grid; gap: 6px; }
.view svg { width: 100%; height: auto; display: block; }
.stage3d { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(120% 90% at 50% 35%, #2a2b31, #0e0f12); }
.stage3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.stage3d .tip { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: #c9c6bf; pointer-events: none; }
.stage3d .lab { position: absolute; right: 10px; top: 8px; font: 600 12px var(--font-body); color: #e9edf2; background: rgba(0,0,0,.45); padding: 3px 8px; }
.view p { margin: 0; font-size: 12.5px; color: var(--muted); }
.alts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.alt { border-top: 2px solid var(--gold); padding-top: 6px; font-size: 14px; color: var(--ink-soft); }
.alt b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--ink); }
.sources { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); max-width: 92ch; }
.sources p { margin: 0; }
/* jewelloop.net: one column that never grows wider than the screen */
.wrap { grid-template-columns: minmax(0, 1fr); }
.jl-table-scroll { overflow-x: auto; max-width: 100%; }
/* shown once the page's script has run (static/visual/ready.js): no jump while loading */
html:not(.jl-ready) .wrap { visibility: hidden; }

/* On jewelloop.net the page around it shows the title and the introduction. */
header.top { display: none !important; }
