/* AA Gems Ring Sizer — page styles */
[hidden] { display: none !important; }

.rs-app { max-width: 760px; margin: 0 auto; font-family: 'Jost', sans-serif; color: #ece6d6; }
.rs-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin: 14px 0 0; padding: 0; list-style: none; font-size: .9rem; color: #d8c48f; }
.rs-trust li::before { content: '✓ '; }

/* Tabs */
.rs-tabs { display: flex; gap: 6px; padding: 6px; margin-bottom: 18px; background: rgba(12,12,19,.9); border: 1px solid rgba(201,168,106,.3); border-radius: 14px; }
.rs-tab { flex: 1; padding: 11px 8px; border: 0; border-radius: 10px; background: transparent; color: #ece6d6; font: 500 .95rem 'Jost', sans-serif; letter-spacing: .02em; cursor: pointer; transition: background .2s; }
.rs-tab:hover { background: rgba(201,168,106,.14); }
.rs-tab[aria-selected="true"] { background: linear-gradient(150deg,#e9cb70 0%,#c9a84c 55%,#9a7a2d 100%); color: #14121a; }

/* Cards */
.rs-card { background: rgba(12,12,19,.9); border: 1px solid rgba(201,168,106,.28); border-radius: 16px; padding: 24px; margin-bottom: 22px; }
.rs-card h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin: 0 0 8px; color: #f3e6bd; }
.rs-card h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin: 0 0 6px; color: #f3e6bd; }
.rs-card p { font-size: .98rem; line-height: 1.65; margin: 0 0 14px; }
.rs-muted { opacity: .75; font-size: .9rem; }

/* Controls */
.rs-btn { padding: 11px 22px; border: 0; border-radius: 10px; background: linear-gradient(150deg,#e9cb70 0%,#c9a84c 55%,#9a7a2d 100%); color: #14121a; font: 500 .95rem 'Jost', sans-serif; letter-spacing: .02em; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.rs-btn:hover { filter: brightness(1.08); }
.rs-btn-ghost { background: transparent; color: #e9cb70; border: 1px solid rgba(201,168,106,.55); }
.rs-btn-ghost:hover { background: rgba(201,168,106,.12); filter: none; }
.rs-btn-wa { background: #1fa855; color: #fff; }
.rs-btn-sm { padding: 7px 14px; font-size: .85rem; }
.rs-btn-round { min-width: 48px; font-size: 1.25rem; padding: 8px 16px; }
.rs-field { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.rs-field input, .rs-field select, .rs-select { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.04); color: #ece6d6; font: 1rem 'Jost', sans-serif; }
.rs-field input { flex: 1 1 140px; min-width: 0; }
.rs-field select option, .rs-select option { color: #14121a; }
.rs-err { color: #ff9b8a; font-size: .92rem; margin: 6px 0 0; }
.rs-btn:focus-visible, .rs-tab:focus-visible, input:focus-visible, select:focus-visible, .rs-seg-btn:focus-visible, .rs-x:focus-visible { outline: 2px solid #e9cb70; outline-offset: 2px; }

/* Segmented control */
.rs-seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(201,168,106,.35); border-radius: 12px; margin: 4px 0 16px; }
.rs-seg-btn { padding: 8px 16px; border: 0; border-radius: 8px; background: transparent; color: #ece6d6; font: 500 .9rem 'Jost', sans-serif; cursor: pointer; }
.rs-seg-btn[aria-pressed="true"] { background: rgba(201,168,106,.25); color: #f3e6bd; }

/* Calibration visuals */
.rs-cal-stage { position: relative; height: 150px; display: flex; justify-content: center; background: #0b0b12; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; margin-bottom: 14px; overflow: auto; padding-top: 14px; }
.rs-card-outline { flex: none; height: 120px; width: 204px; border: 3px solid #e9cb70; border-bottom: 0; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, rgba(233,203,112,.14), transparent); display: flex; align-items: flex-start; justify-content: center; padding-top: 12px; font-size: .8rem; color: #e9cb70; text-align: center; }
.rs-slider-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rs-slider-row input[type=range] { flex: 1; accent-color: #c9a84c; }
.rs-line-wrap { background: #0b0b12; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 28px 12px; margin: 0 0 14px; overflow: hidden; }
.rs-line { height: 4px; width: 200px; background: #e25555; margin: 0 auto; }

/* Status bars */
.rs-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: rgba(201,168,106,.12); border: 1px solid rgba(201,168,106,.3); font-size: .9rem; }
.rs-warn { padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; background: rgba(226,85,85,.14); border: 1px solid rgba(226,85,85,.5); font-size: .9rem; }
.rs-link-btn { background: none; border: 0; color: #e9cb70; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* Match stage */
.rs-stage { position: relative; height: 320px; background: #0b0b12; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; }
.rs-stage::before, .rs-stage::after { content: ''; position: absolute; background: rgba(233,203,112,.14); }
.rs-stage::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.rs-stage::after { top: 50%; left: 0; right: 0; height: 1px; }
.rs-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); border-radius: 50%; box-sizing: border-box; }
.rs-ring-main { border: 2px solid #e9cb70; box-shadow: 0 0 18px rgba(233,203,112,.25); z-index: 2; }
.rs-ring-ghost { border: 1px dashed rgba(236,230,214,.35); }
.rs-readout { font-family: 'Playfair Display', serif; font-size: 1.9rem; text-align: center; margin: 16px 0 2px; color: #f3e6bd; }
.rs-sub { text-align: center; font-size: .92rem; opacity: .8; }
.rs-between { text-align: center; color: #e9cb70; font-size: .92rem; min-height: 1.4em; margin: 4px 0 8px; }
.rs-controls { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 14px; }
.rs-fine { display: flex; align-items: center; gap: 10px; font-size: .88rem; opacity: .9; }
.rs-fine input { flex: 1; accent-color: #c9a84c; }
.rs-legend { font-size: .82rem; opacity: .65; text-align: center; margin: 10px 0 0; }

/* Result */
.rs-result { border-color: rgba(233,203,112,.7); box-shadow: 0 0 0 1px rgba(233,203,112,.15), 0 14px 40px rgba(0,0,0,.45); }
.rs-res-label { font-size: .85rem; color: #d8c48f; letter-spacing: .06em; }
.rs-res-size { font-family: 'Playfair Display', serif; font-size: 3rem; line-height: 1.1; color: #f3e6bd; margin: 2px 0 4px; }
.rs-res-source { font-size: .9rem; opacity: .75; margin-bottom: 14px; }
.rs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 10px; margin: 0 0 16px; }
.rs-stats div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; }
.rs-stats dt { font-size: .78rem; opacity: .7; margin: 0 0 2px; }
.rs-stats dd { margin: 0; font-size: 1.08rem; font-weight: 500; }
.rs-band { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.rs-order { margin: 6px 0 14px; padding: 12px 14px; border-left: 3px solid #e9cb70; background: rgba(233,203,112,.1); border-radius: 0 10px 10px 0; font-size: .98rem; }
.rs-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.rs-save { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.rs-save input { flex: 1 1 180px; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.04); color: #ece6d6; font: .95rem 'Jost', sans-serif; }
.rs-saved { list-style: none; margin: 12px 0 0; padding: 0; }
.rs-saved li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .95rem; }
.rs-saved-name { flex: 1; font-weight: 500; }
.rs-saved-size { opacity: .8; }
.rs-x { background: none; border: 0; color: #ece6d6; opacity: .6; cursor: pointer; font-size: 1rem; padding: 4px 8px; }
.rs-x:hover { opacity: 1; }
.rs-saved-head { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .9rem; color: #d8c48f; }

/* Content */
.tool-content { max-width: 760px; margin: 40px auto 0; font-size: 1.02rem; line-height: 1.75; color: var(--text, #e8e4dc); }
.tool-content h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin: 34px 0 12px; }
.tool-content h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin: 22px 0 6px; }
.tool-content p { margin: 0 0 14px; }
.tool-content ul, .tool-content ol { margin: 0 0 14px 22px; }
.tool-content li { margin-bottom: 6px; }
.tool-content table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .95rem; }
.tool-content th, .tool-content td { padding: 8px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.12); }
.tool-content th { font-family: 'Jost', sans-serif; font-weight: 500; letter-spacing: .04em; }
.tool-content tr.active-row td { background: rgba(201,168,106,.2); font-weight: 600; }
.chart-scroll { overflow-x: auto; }
.related-tools { max-width: 760px; margin: 36px auto 0; padding: 20px 24px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.related-tools h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin: 0 0 12px; }
.related-tools a { display: inline-block; margin: 0 18px 6px 0; color: var(--accent, #c9a86a); text-decoration: none; border-bottom: 1px dotted; }

@media (max-width: 560px) {
  .rs-card { padding: 18px 14px; }
  .rs-tab { font-size: .82rem; padding: 10px 4px; }
  .rs-res-size { font-size: 2.4rem; }
  .rs-stage { height: 280px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Printable gauge — hidden on screen, shown only while printing */
#printSheet { display: none; }
@media print {
  @page { margin: 12mm; }
  body.rs-printing { background: #fff !important; color: #000 !important; }
  body.rs-printing::before, body.rs-printing::after { display: none !important; }
  body.rs-printing > * { display: none !important; }
  body.rs-printing > #printSheet { display: block !important; }
}
.rs-sheet { color: #000; font-family: 'Jost', Arial, sans-serif; background: #fff; }
.rs-sheet h1 { font-size: 16pt; margin: 0 0 2mm; }
.rs-sheet p { font-size: 10pt; margin: 0 0 3mm; line-height: 1.4; }
.rs-scale { display: flex; flex-direction: column; gap: 4mm; margin: 4mm 0 6mm; }
.rs-scale-card { width: 85.6mm; height: 53.98mm; border: 0.4mm dashed #000; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 9pt; text-align: center; padding: 4mm; }
.rs-scale-line { width: 100mm; border-top: 0.5mm solid #000; padding-top: 1.5mm; font-size: 9pt; }
.rs-ggrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7mm 0; justify-items: center; }
.rs-gcell { display: flex; flex-direction: column; align-items: center; gap: 1.5mm; }
.rs-gcirc { border: 0.4mm solid #000; border-radius: 50%; box-sizing: border-box; }
.rs-glabel { font-size: 10pt; font-weight: 600; }
.rs-gmm { font-size: 8pt; }
