/* Layout: GIA's D-to-Z scale. One diamond, ray traced, face-up and face-down on a grading tray, moved along the
   scale; the whole scale as a strip in its five groups; two grades side by side; how grading is done. */
:root {
  --paper: #ffffff; --ink: #16161a; --ink-soft: #3d3d45; --muted: #6b6b75; --rule: #e4e2de; --mist: #f4f3f1;
  --ruby: #9b1b30; --gold: #b8892f;
  --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; 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: 1240px; 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; margin: 6px 0 0; }
h2.sec { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin: 0; line-height: 1.1; }
.lede { max-width: 70ch; 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: 12.5px; color: var(--muted); margin: 0; }
section.study { border-top: 1px solid var(--ink); padding-top: 18px; display: grid; gap: 14px; }
.btn, select { font: 600 13px var(--font-body); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); padding: 6px 10px; cursor: pointer; border-radius: 0; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ruby); outline-offset: 2px; }

/* viewer */
.viewer { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 860px) { .viewer { grid-template-columns: 1fr; } }
.stage { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border: 1px solid var(--rule); }
@media (max-width: 520px) { .stage { grid-template-columns: 1fr; } }
.pane { position: relative; min-width: 0; display: grid; place-items: center; min-height: 260px; padding: 28px 12px 34px; }
.pane.up { background: radial-gradient(circle at 50% 42%, #2e2f35, #0f1013 72%); }
.pane.tray { background: linear-gradient(180deg, #f7f7f5 0%, #ffffff 46%, #e9e9e6 47%, #fbfbfa 100%); }
.pane img { display: block; max-width: 100%; height: auto; }
.pane.up img { width: min(210px, 82%); aspect-ratio: 1; }
.pane.tray img { width: min(260px, 94%); aspect-ratio: 260 / 186; }
/* the picture keeps its place while it renders, so nothing below jumps (speed check 2026-10-12) */
.pane img.pending { visibility: hidden; }
.pane .loading { position: absolute; inset: 0; display: grid; place-items: center; }
.pane .cap { position: absolute; left: 10px; top: 8px; font: 600 12px var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.pane.up .cap { color: #c9c6bf; } .pane.tray .cap { color: #5a5a62; }
.pane .gradeTag { position: absolute; right: 10px; bottom: 8px; font: 500 30px var(--font-display); }
.pane.up .gradeTag { color: #f1efe9; } .pane.tray .gradeTag { color: #16161a; }
.loading { font-size: 12px; color: #9a978f; }
.info { display: grid; gap: 12px; align-content: start; }
.info h3 { font-family: var(--font-display); font-weight: 500; font-size: 40px; margin: 0; line-height: 1; }
.info .grp { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ruby); }
.info blockquote { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.3; color: var(--ink-soft); border-left: 3px solid var(--gold); padding-left: 12px; }
.slider { display: grid; gap: 6px; }
.slider input { width: 100%; accent-color: var(--ruby); }
.ticks { display: grid; grid-template-columns: repeat(23, 1fr); font: 500 12px var(--font-data); color: var(--muted); text-align: center; }
.gband { display: grid; grid-template-columns: 3fr 4fr 3fr 5fr 8fr; gap: 2px; }
.gband span { font-size: 12px; text-align: center; padding: 3px 2px; color: #16161a; line-height: 1.15; }
.gband span.on { outline: 2px solid var(--ink); outline-offset: 1px; font-weight: 600; }
.note { font-size: 13.5px; padding: 8px 10px; background: var(--mist); border-left: 3px solid var(--gold); margin: 0; }

/* the scale strip */
.strip { display: grid; grid-template-columns: 3fr 4fr 3fr 5fr 8fr; gap: 6px; }
@media (max-width: 760px) { .strip { grid-template-columns: 1fr; } }
.grpbox { border-top: 3px solid var(--ink); padding-top: 6px; display: grid; gap: 6px; align-content: start; }
.grpbox h4 { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.grpbox h4 span { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.grpbox p { margin: 0; font-size: 12px; color: var(--muted); min-height: 3em; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--rule); background: #fbfbfa; padding: 2px 2px 4px; cursor: pointer; display: grid; justify-items: center; width: 52px; font: 600 12px var(--font-display); color: #16161a; }
.chip img { width: 46px; height: 32px; object-fit: contain; display: block; }
.chip[aria-pressed="true"] { outline: 2px solid var(--ruby); outline-offset: 1px; }

/* compare */
.compare { display: grid; gap: 14px; }
.cmpbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .pair { grid-template-columns: 1fr; } }
.pairbox { border: 1px solid var(--rule); }
.pairbox h4 { margin: 0; padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--rule); }
.duo { display: grid; grid-template-columns: 1fr 1fr; }
.duo .pane { min-height: 180px; padding: 26px 6px 30px; }
.duo .pane.up img { width: min(130px, 84%); } .duo .pane.tray img { width: min(170px, 96%); }
.duo .pane .gradeTag { font-size: 22px; }
.how { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.how div { border-top: 2px solid var(--gold); padding-top: 8px; font-size: 14px; color: var(--ink-soft); }
.how h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin: 0 0 4px; 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; }
