/* ==========================================================================
   Selected Diamonds — shared stylesheet
   ========================================================================== */

:root {
  --ink: #16140f;
  --ink-soft: #3a362d;
  --ivory: #faf7f1;
  --ivory-dim: #f1ebdf;
  --gold: #b08d57;
  --gold-light: #d9bd8c;
  --line: #e4dcca;
  --max-w: 1120px;
  --serif: "Playfair Display", "Georgia", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.2em; color: var(--ink-soft); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.nav-links a {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav-links a.active,
.nav-links a:hover { border-bottom-color: var(--gold); color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.25s;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 16px 24px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--ivory);
  border-radius: 2px;
  transition: 0.25s;
  cursor: pointer;
}

.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-outline:hover { background: var(--ink); color: var(--ivory); }

/* ---------- hero ---------- */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-visual {
  aspect-ratio: 4/3;
  border-radius: 4px;
  background: radial-gradient(circle at 30% 30%, #fff, var(--gold-light) 40%, var(--ivory-dim) 100%);
  position: relative;
  overflow: hidden;
}

.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-border { border-bottom: 1px solid var(--line); }
.bg-dim { background: var(--ivory-dim); }
.bg-ink { background: var(--ink); color: var(--ivory); }
.bg-ink h2, .bg-ink h3 { color: var(--ivory); }
.bg-ink p { color: #cfc9ba; }

.text-center { text-align: center; }
.narrow { max-width: 720px; margin: 0 auto; }

/* ---------- grids/cards ---------- */
.grid {
  display: grid;
  gap: 32px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 3px;
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--gold);
}

/* ---------- portfolio ---------- */
.gem-tile {
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.gem-visual {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ivory-dim), #fff 60%, var(--gold-light) 130%);
}

.gem-visual svg { width: 46%; }

.gem-body { padding: 20px 22px 26px; }
.gem-meta { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }

/* ---------- blog ---------- */
.post-card { border-bottom: 1px solid var(--line); padding: 32px 0; }
.post-card:first-child { padding-top: 0; }
.post-date { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }

article.post {
  max-width: 720px;
  margin: 0 auto;
}
article.post h2 { margin-top: 1.4em; }
article.post ul, article.post ol { color: var(--ink-soft); padding-left: 1.3em; }
article.post li { margin-bottom: 0.5em; }
article.post blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.3em;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- form ---------- */
form.contact-form {
  display: grid;
  gap: 18px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

label { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 6px; color: var(--ink-soft); }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 2px;
}

input:focus, textarea:focus { outline: none; border-color: var(--gold); }

.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-status { font-size: 0.9rem; margin-top: 6px; }

/* ---------- contact info blocks ---------- */
.contact-info { display: grid; gap: 20px; }
.contact-info .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; margin-top: 3px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cfc9ba;
  padding: 56px 0 28px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h4 { color: var(--ivory); font-size: 0.95rem; margin-bottom: 14px; }
.site-footer p { color: #cfc9ba; }
.site-footer a { color: #cfc9ba; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }

.footer-bottom {
  border-top: 1px solid #3a362d;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #8f8977;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- breadcrumb / page header ---------- */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}

/* ---------- misc ---------- */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin: 0 8px 8px 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--ivory);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ==========================================================================
   Portfolio carousel
   ========================================================================== */
.pf-section { padding: 64px 0 72px; }

.pf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.pf-hint {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.pf-controls { display: flex; gap: 10px; flex-shrink: 0; }

.pf-arrow {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.45s ease, border-color 0.45s ease, color 0.45s ease, opacity 0.45s ease;
}

.pf-arrow svg { width: 14px; height: 14px; display: block; }
.pf-arrow:hover:not([disabled]) { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.pf-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pf-arrow[disabled] { opacity: 0.25; cursor: default; }

.pf-track {
  --pf-per: 2.8;
  --pf-gap: 28px;
  --pf-inset: max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
  --pf-w: min(calc(100vw - 48px), calc(var(--max-w) - 48px));
  list-style: none;
  margin: 0;
  display: flex;
  gap: var(--pf-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 24px 12px var(--pf-inset);
  scroll-padding-inline-start: var(--pf-inset);
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.pf-track::-webkit-scrollbar { display: none; }
.pf-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.pf-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.pf-track.is-dragging .pf-card { transition: none; }

.pf-item {
  flex: 0 0 calc((var(--pf-w) - (var(--pf-per) - 1) * var(--pf-gap)) / var(--pf-per));
  scroll-snap-align: start;
  display: flex;
}

.pf-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 0.6s ease;
}

.pf-card:hover { color: var(--ink); }
.pf-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.pf-visual {
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ivory-dim), #fff 60%, var(--gold-light) 130%);
}

.pf-visual svg {
  width: 46%;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pf-visual img,
.pf-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pf-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pf-meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.pf-card h3 { margin-bottom: 0.5em; }
.pf-card .pf-desc { flex: 1; }

.pf-more {
  margin: 14px 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.5s ease, letter-spacing 0.5s ease;
}

@media (hover: hover) {
  .pf-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-light);
    box-shadow: 0 20px 44px -26px rgba(22, 20, 15, 0.5);
  }
  .pf-card:hover .pf-visual svg,
  .pf-card:hover .pf-visual img,
  .pf-card:hover .pf-visual video { transform: scale(1.07); }
  .pf-card:hover .pf-more { color: var(--gold); letter-spacing: 0.18em; }
}

.pf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
}

.pf-dots { display: flex; gap: 8px; align-items: center; }

.pf-dot {
  width: 22px;
  height: 2px;
  padding: 0;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: background 0.5s ease, width 0.5s ease;
}

.pf-dot.is-active { background: var(--gold); width: 34px; }
.pf-dot:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.pf-counter {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (max-width: 1024px) {
  .pf-track { --pf-per: 1.8; --pf-gap: 22px; }
}

@media (max-width: 640px) {
  .pf-track { --pf-per: 1.15; --pf-gap: 16px; }
  .pf-head { align-items: center; }
  .pf-arrow { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-track { scroll-behavior: auto; }
  .pf-card, .pf-visual svg, .pf-visual img, .pf-visual video, .pf-more, .pf-dot, .pf-arrow { transition: none; }
  .pf-card:hover { transform: none; }
  .pf-card:hover .pf-visual svg,
  .pf-card:hover .pf-visual img,
  .pf-card:hover .pf-visual video { transform: none; }
}

/* ---------- portfolio detail video ---------- */
.pf-detail-video {
  max-width: 400px;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: var(--ivory-dim);
}

.pf-detail-video video {
  width: 100%;
  height: auto;
  display: block;
}

.pf-detail-caption {
  max-width: 400px;
  margin: 0 auto 40px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- portfolio detail gallery ---------- */
.pf-gallery { margin: 0 0 40px; }

.pf-gallery figure {
  margin: 0 0 26px;
}

.pf-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.pf-gallery figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- portfolio detail page ---------- */
.pf-detail-visual {
  max-width: 420px;
  margin: 0 auto 40px;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(135deg, var(--ivory-dim), #fff 60%, var(--gold-light) 130%);
}

.pf-detail-visual svg { width: 46%; }

.pf-specs {
  margin: 0 0 36px;
  border-top: 1px solid var(--line);
}

.pf-specs div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.pf-specs dt {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.pf-specs dd { margin: 0; text-align: right; color: var(--ink-soft); }

/* ---------- portfolio stone-by-stone table ---------- */
.pf-stones {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 36px;
  font-size: 0.94rem;
}

.pf-stones th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.pf-stones td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.pf-stones th + th,
.pf-stones td + td { padding-left: 18px; }

/* ---------- cut scale graphic ---------- */
.cut-scale {
  margin: 36px 0;
  border-top: 1px solid var(--line);
}

.cut-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 26px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.cut-figure {
  background: linear-gradient(135deg, var(--ivory-dim), #fff 65%, var(--gold-light) 150%);
  border-radius: 3px;
  padding: 12px 10px;
}

.cut-figure svg { width: 100%; height: auto; display: block; }

.cut-grade {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}

.cut-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.cut-row.is-best .cut-grade { color: var(--gold); }

@media (max-width: 560px) {
  .cut-row { grid-template-columns: 92px 1fr; gap: 18px; }
  .cut-grade { font-size: 1.05rem; }
  .cut-desc { font-size: 0.85rem; }
}

/* ---------- colour scale graphic ---------- */
.colour-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 36px 0 0;
}

.colour-step {
  text-align: center;
  padding: 14px 4px 12px;
  border-radius: 3px;
  border: 1px solid transparent;
}

.colour-step svg {
  width: 100%;
  max-width: 84px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.colour-grade {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}

.colour-band {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.4;
}

.colour-step.is-pick {
  border-color: var(--gold-light);
  background: #fffdf8;
}

.colour-step.is-pick .colour-band { color: var(--gold); }

.clarity-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 36px 0 0;
}

@media (max-width: 640px) {
  .clarity-scale { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

.colour-step.is-fancy {
  border-color: var(--line);
  background: var(--ivory-dim);
}

@media (max-width: 640px) {
  .colour-scale { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .colour-grade { font-size: 0.95rem; }
  .colour-band { font-size: 0.62rem; letter-spacing: 0.06em; }
  .colour-step { padding: 12px 2px 10px; }
}

/* ---------- figures inside articles ---------- */
.post-figure {
  margin: 36px auto;
  max-width: 520px;
}

.post-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.post-figure figcaption {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-align: center;
}

.pf-note {
  margin: 0 0 32px;
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--gold-light);
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.pf-stones caption {
  caption-side: bottom;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: left;
}

/* ==========================================================================
   Carat size tool
   ========================================================================== */
.carat-tool {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 30px 26px 26px;
  margin: 40px 0;
}

.carat-inner {
  max-width: 420px;
  margin: 0 auto;
}

/* --- shape selector --- */
.carat-shapes {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.carat-shapes::-webkit-scrollbar { display: none; }

.carat-shape {
  flex: 1 0 auto;
  padding: 9px 13px;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.carat-shape:hover { border-color: var(--gold-light); }
.carat-shape[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.carat-shape:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* --- the finger visualisation --- */
.carat-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 14px;
}

.carat-stage svg { display: block; }

/* --- slider --- */
.carat-slider { margin-top: 4px; }

.carat-slider > label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  text-align: center;
}

.carat-range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.carat-end {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  flex: 0 0 auto;
  opacity: 0.7;
}

.carat-tool input[type="range"] {
  flex: 1;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.carat-tool input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--gold) 0 var(--pct, 30%), var(--line) var(--pct, 30%) 100%);
}

.carat-tool input[type="range"]::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}

.carat-tool input[type="range"]::-moz-range-progress {
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.carat-tool input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gold);
  box-shadow: 0 1px 3px rgba(22, 20, 15, 0.16);
  transition: transform 0.2s ease;
}

.carat-tool input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gold);
  box-shadow: 0 1px 3px rgba(22, 20, 15, 0.16);
}

.carat-tool input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.carat-tool input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 2px; }

/* --- measurements --- */
.carat-readout {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 26px 0 0;
  text-align: center;
}

.carat-readout div { min-width: 68px; }

.carat-readout dt {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.carat-readout dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.carat-readout dd span {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-left: 2px;
}

/* --- footer / calibration --- */
.carat-foot {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.carat-mode {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.carat-note { margin: 0 0 10px; font-size: 0.82rem; color: var(--ink-soft); }

.carat-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.carat-link:hover { color: var(--gold); }
.carat-link[aria-pressed="true"] { color: var(--gold); }
.carat-sep { color: var(--line); margin: 0 8px; }

.carat-calibrate[hidden] { display: none; }
.carat-calibrate { margin-top: 18px; text-align: left; }

.carat-card {
  height: 0;
  padding-bottom: 63.06%;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--ivory-dim), #fff 70%);
  margin: 14px auto;
}

@media (max-width: 560px) {
  .carat-tool { padding: 22px 16px 20px; }
  .carat-readout { gap: 18px; }
  .carat-readout dd { font-size: 1.02rem; }
  .carat-readout dt { font-size: 0.6rem; letter-spacing: 0.1em; }
}
