/* =========================================================
   Online Ruler Pro — style.css
   All shared styles. No build step required.
   ========================================================= */

/* ── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --green-50: #f0fdf4;
  --green-100:#dcfce7;
  --green-500:#22c55e;
  --red-500:  #ef4444;
  --amber-50: #fffbeb;
  --amber-100:#fef3c7;
  --amber-300:#fcd34d;
  --amber-700:#b45309;
  --slate-50: #f8fafc;
  --slate-100:#f1f5f9;
  --slate-200:#e2e8f0;
  --slate-300:#cbd5e1;
  --slate-400:#94a3b8;
  --slate-500:#64748b;
  --slate-600:#475569;
  --slate-700:#334155;
  --slate-800:#1e293b;
  --slate-900:#0f172a;
  --white:    #ffffff;
  --radius-lg:12px;
  --radius-xl:16px;
  --radius-2xl:20px;
  --shadow-sm:0 1px 3px rgba(0,0,0,.08);
  --shadow-md:0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:0 8px 24px rgba(0,0,0,.12);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, canvas { display: block; max-width: 100%; }

/* ── Layout utilities ───────────────────────────────────── */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 800; line-height: 1.2; color: var(--slate-900); }
h2 { font-size: clamp(1.2rem,3vw,1.5rem); font-weight: 700; color: var(--slate-800); margin: 2.5rem 0 1rem; display: flex; align-items: center; gap: .5rem; }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--slate-700); margin: 1.5rem 0 .5rem; }
p  { color: var(--slate-600); line-height: 1.75; margin-bottom: 1.1rem; font-size: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
li { color: var(--slate-600); line-height: 1.75; margin-bottom: .4rem; }
ul { list-style-disc; }
ul li::marker { color: var(--green-500); }
ol { list-style-decimal; }
ol li::marker { color: var(--blue-600); font-weight: 700; }
strong { color: var(--slate-900); font-weight: 600; }
a.prose-link { color: var(--blue-600); text-decoration: underline; text-underline-offset: 3px; }
a.prose-link:hover { color: var(--blue-700); }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.25rem;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-weight: 800; font-size: 1.1rem; color: var(--slate-900);
  display: flex; align-items: center; gap: .5rem;
  transition: color .2s;
}
.nav-logo:hover { color: var(--blue-600); }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-link {
  padding: .375rem .75rem; border-radius: 8px;
  font-size: .85rem; font-weight: 500; color: var(--slate-600);
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--slate-100); color: var(--slate-900); }
.nav-link.active { background: var(--blue-50); color: var(--blue-700); }
.nav-burger { display: none; flex-direction: column; gap: 4px; padding: .5rem; border-radius: 8px; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--slate-700); border-radius: 2px; transition: all .2s; }
.nav-mobile { display: none; border-top: 1px solid var(--slate-100); background: white; padding: .5rem 1.25rem .75rem; }
.nav-mobile a { display: block; padding: .5rem .75rem; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--slate-700); }
.nav-mobile a:hover { background: var(--slate-50); }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile.open { display: block; }
}

/* ── Hero sections ───────────────────────────────────────── */
.hero {
  background: linear-gradient(to bottom, var(--blue-50), var(--white));
  padding: 3rem 1.25rem 2.5rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blue-100); color: var(--blue-700);
  font-size: .75rem; font-weight: 600; padding: .3rem .85rem;
  border-radius: 999px; margin-bottom: 1rem;
}
.hero-sub {
  color: var(--slate-600); font-size: 1.1rem; max-width: 560px;
  margin: .75rem auto 1.75rem; line-height: 1.7;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--blue-600); color: white;
  font-weight: 700; font-size: 1rem;
  padding: .75rem 2rem; border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hero-alt { background: linear-gradient(to bottom, var(--slate-100), var(--white)); }

/* ── Features strip ──────────────────────────────────────── */
.features-strip { background: white; border-top: 1px solid var(--slate-100); border-bottom: 1px solid var(--slate-100); padding: 1.25rem 1.25rem; }
.features-strip .grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; max-width: 900px; margin: 0 auto; text-align: center; }
.feat-icon { font-size: 1.5rem; }
.feat-label { font-weight: 600; color: var(--slate-800); font-size: .85rem; margin-top: .25rem; }
.feat-sub { color: var(--slate-400); font-size: .75rem; }
@media (max-width: 600px) { .features-strip .grid-4 { grid-template-columns: repeat(2,1fr); } }

/* ── Ruler Tool ──────────────────────────────────────────── */
.ruler-tool {
  background: white; border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
  user-select: none; -webkit-user-select: none;
  margin: 2rem 0;
}
.ruler-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--slate-50); border-bottom: 1px solid var(--slate-200);
}
.unit-toggle { display: flex; gap: 2px; background: var(--slate-200); border-radius: 10px; padding: 3px; }
.unit-btn {
  padding: .2rem .75rem; border-radius: 7px;
  font-size: .8rem; font-weight: 700; color: var(--slate-500);
  transition: all .15s; cursor: pointer;
}
.unit-btn.active { background: white; color: var(--slate-900); box-shadow: var(--shadow-sm); }
.ruler-readout {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Courier New', monospace; font-weight: 700;
  font-size: 1.1rem; color: var(--blue-700); min-width: 110px;
}
.btn-calibrate {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .85rem; border-radius: 8px;
  font-size: .82rem; font-weight: 600;
  border: 1px solid var(--amber-300);
  background: var(--amber-50); color: var(--amber-700);
  transition: background .15s;
  animation: pulse-amber 2s infinite;
}
.btn-calibrate:hover { background: var(--amber-100); }
.btn-calibrate.calibrated {
  border-color: #86efac; background: var(--green-50); color: #15803d;
  animation: none;
}
@keyframes pulse-amber {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,.3); }
  50%      { box-shadow: 0 0 0 4px rgba(245,158,11,.1); }
}
.ruler-canvas-wrap {
  position: relative; overflow: hidden; cursor: crosshair;
  height: 120px;
}
.ruler-canvas { width: 100%; height: 120px; display: block; }
.ruler-marker {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--green-500); cursor: ew-resize; touch-action: none; z-index: 10;
  transform: translateX(-50%);
}
.ruler-marker-handle {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green-500); border: 2px solid white;
  box-shadow: var(--shadow-sm);
}
.ruler-marker-tip {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  background: #16a34a; color: white; font-size: .7rem; font-weight: 600;
  padding: 2px 6px; border-radius: 6px; white-space: nowrap;
}
.ruler-hint {
  display: flex; justify-content: space-between;
  padding: .45rem 1rem; background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  font-size: .72rem; color: var(--slate-400);
}

/* ── Calibration Modal ───────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%; max-width: 480px; padding: 1.75rem;
}
.modal h3 { font-size: 1.15rem; font-weight: 700; color: var(--slate-900); margin-bottom: .25rem; }
.modal-sub { color: var(--slate-500); font-size: .88rem; margin-bottom: 1.5rem; line-height: 1.6; }
.calib-area {
  position: relative; height: 80px; background: var(--slate-100);
  border-radius: 12px; overflow: visible; margin-bottom: 1.5rem;
}
.calib-box {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 52px; background: rgba(59,130,246,.2);
  border: 2px solid var(--blue-600); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 600; color: var(--blue-700);
  transition: width .05s;
}
.calib-handle {
  position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 52px;
  background: var(--blue-600); border-radius: 0 8px 8px 0;
  cursor: ew-resize; touch-action: none; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: white;
}
.modal-note { text-align: center; color: var(--slate-500); font-size: .8rem; margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: .6rem; }
.btn-confirm {
  flex: 1; background: var(--blue-600); color: white;
  font-weight: 700; padding: .6rem 1rem; border-radius: 10px;
  transition: background .15s;
}
.btn-confirm:hover { background: var(--blue-700); }
.btn-reset {
  padding: .6rem 1rem; border-radius: 10px;
  border: 1px solid var(--slate-300); color: var(--slate-600);
  font-size: .85rem; transition: background .15s;
}
.btn-reset:hover { background: var(--slate-50); }
.btn-cancel { padding: .6rem .75rem; color: var(--slate-400); font-size: .85rem; }
.btn-cancel:hover { color: var(--slate-600); }

/* ── Calibration Guide ───────────────────────────────────── */
.calib-guide {
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid var(--blue-100); border-radius: var(--radius-xl);
  padding: 1.5rem; margin: 1.75rem 0;
}
.calib-guide-heading { font-weight: 700; font-size: 1rem; color: var(--slate-900); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .4rem; }
.calib-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; }
.calib-step { background: white; border-radius: 12px; padding: 1rem; border: 1px solid var(--blue-100); box-shadow: var(--shadow-sm); }
.calib-step-num { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.step-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-600); color: white; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.calib-step h4 { font-size: .85rem; font-weight: 600; color: var(--slate-800); margin-bottom: .3rem; }
.calib-step p { font-size: .8rem; color: var(--slate-500); line-height: 1.5; margin: 0; }
.calib-ref { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--blue-100); flex-wrap: wrap; }
.credit-card-visual {
  width: 120px; height: 76px; min-width: 120px;
  background: linear-gradient(135deg, #334155, #1e293b);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: .6rem .75rem; display: flex; flex-direction: column;
  justify-content: space-between;
}
.card-chip { width: 28px; height: 20px; background: #fbbf24; border-radius: 3px; }
.card-num { font-family: monospace; font-size: .55rem; color: rgba(255,255,255,.5); letter-spacing: 2px; }
.calib-ref-text { font-size: .8rem; color: var(--slate-600); line-height: 1.6; flex: 1; }
.calib-ref-text strong { color: var(--slate-800); }
@media (max-width: 600px) { .calib-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .calib-steps { grid-template-columns: 1fr; } }

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-section { margin-top: 2.5rem; }
.faq-heading { font-size: 1.25rem; font-weight: 700; color: var(--slate-800); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .4rem; }
.faq-item { border: 1px solid var(--slate-200); border-radius: 12px; overflow: hidden; background: white; margin-bottom: .65rem; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; text-align: left;
  font-weight: 600; font-size: .95rem; color: var(--slate-800);
  cursor: pointer; transition: background .15s;
}
.faq-q:hover { background: var(--slate-50); }
.faq-icon { font-size: 1.3rem; color: var(--slate-400); transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: .75rem 1.25rem 1rem; border-top: 1px solid var(--slate-100); color: var(--slate-600); font-size: .9rem; line-height: 1.7; }
.faq-item.open .faq-a { display: block; }

/* ── Internal Links ──────────────────────────────────────── */
.internal-links { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--slate-200); }
.internal-links h2 { font-size: 1.15rem; margin-bottom: 1rem; margin-top: 0; }
.link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.link-card {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .9rem; border-radius: 12px;
  border: 1px solid var(--slate-200); background: white;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.link-card:hover { border-color: var(--blue-300); background: var(--blue-50); box-shadow: var(--shadow-sm); }
.link-icon { font-size: 1.4rem; flex-shrink: 0; }
.link-label { font-weight: 600; font-size: .85rem; color: var(--slate-800); transition: color .15s; display: block; }
.link-card:hover .link-label { color: var(--blue-700); }
.link-desc { font-size: .75rem; color: var(--slate-500); margin-top: 2px; }
@media (max-width: 680px) { .link-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .link-grid { grid-template-columns: 1fr; } }

/* ── Unit Conversion Table ───────────────────────────────── */
.conv-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); margin: 1.25rem 0 2rem; }
.conv-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.conv-table thead { background: var(--slate-50); }
.conv-table th { padding: .65rem 1.1rem; text-align: left; font-size: .72rem; font-weight: 600; color: var(--slate-600); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--slate-200); }
.conv-table td { padding: .6rem 1.1rem; border-bottom: 1px solid var(--slate-100); }
.conv-table tr:last-child td { border-bottom: none; }
.conv-table tr:nth-child(even) td { background: var(--slate-50); }
.conv-table tr:hover td { background: var(--blue-50); }
.td-cm { font-family: monospace; font-weight: 700; color: var(--blue-700); }

/* ── Screen Info Box ─────────────────────────────────────── */
.screen-info {
  background: var(--slate-900); color: var(--slate-100);
  border-radius: 16px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
  font-size: .88rem;
}
.screen-info-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-400); margin-bottom: .1rem; }
.screen-info-val { font-family: monospace; font-weight: 600; font-size: 1rem; color: white; }
.screen-info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: .75rem; }
.screen-note { color: var(--slate-400); font-size: .78rem; line-height: 1.5; margin-top: .75rem; border-top: 1px solid #334155; padding-top: .75rem; }
@media (max-width: 500px) { .screen-info-grid { grid-template-columns: 1fr 1fr; } }

/* ── CTA Box ─────────────────────────────────────────────── */
.cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-radius: 18px; padding: 1.25rem 1.5rem; margin: 1.75rem 0;
}
.cta-box-title { font-weight: 700; color: var(--slate-900); font-size: 1rem; }
.cta-box-sub { color: var(--slate-500); font-size: .85rem; margin-top: .2rem; }
.btn-cta-sm {
  background: var(--blue-600); color: white; font-weight: 700;
  font-size: .85rem; padding: .55rem 1.25rem; border-radius: 10px;
  white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.btn-cta-sm:hover { background: var(--blue-700); }

/* ── Quick Facts Card ────────────────────────────────────── */
.quick-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: 18px; padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.quick-card-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); margin-bottom: .6rem; }
.quick-fact { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .35rem; font-size: .85rem; color: var(--slate-700); }
.quick-fact::before { content: '✓'; color: var(--green-500); flex-shrink: 0; }
.quick-use::before { content: '→'; color: var(--blue-600); flex-shrink: 0; }
@media (max-width: 500px) { .quick-card { grid-template-columns: 1fr; } }

/* ── Article section ─────────────────────────────────────── */
.article { max-width: 900px; margin: 0 auto; padding: 0 1.25rem 4rem; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--slate-500); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--slate-500); transition: color .15s; }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb .sep { color: var(--slate-300); }

/* ── Blog ────────────────────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2rem 0; }
.blog-card {
  background: white; border: 1px solid var(--slate-200); border-radius: 18px;
  padding: 1.25rem; transition: border-color .15s, box-shadow .15s;
}
.blog-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-md); }
.blog-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.blog-tag { background: var(--slate-100); color: var(--slate-500); font-size: .72rem; font-weight: 500; padding: .15rem .6rem; border-radius: 999px; }
.blog-card h2 { font-size: 1rem; font-weight: 700; color: var(--slate-900); margin: 0 0 .6rem; line-height: 1.4; }
.blog-card p  { font-size: .85rem; color: var(--slate-500); line-height: 1.6; margin-bottom: .75rem; }
.blog-meta { display: flex; justify-content: space-between; font-size: .75rem; color: var(--slate-400); }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

/* ── Article meta ────────────────────────────────────────── */
.article-meta { display: flex; align-items: center; gap: .75rem; font-size: .82rem; color: var(--slate-400); margin-top: 1rem; }

/* ── Ring size table ─────────────────────────────────────── */
.ring-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); margin: 1rem 0 1.75rem; }
.ring-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ring-table th { background: var(--slate-50); padding: .6rem 1rem; text-align: left; font-size: .72rem; font-weight: 600; color: var(--slate-600); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--slate-200); }
.ring-table td { padding: .5rem 1rem; border-bottom: 1px solid var(--slate-100); }
.ring-table tr:last-child td { border-bottom: none; }
.ring-table tr:nth-child(even) td { background: var(--slate-50); }
.ring-size-us { font-weight: 700; color: var(--blue-700); }

/* ── DPI table ───────────────────────────────────────────── */
.dpi-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--slate-200); box-shadow: var(--shadow-sm); margin: 1rem 0 1.75rem; }
.dpi-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dpi-table th { background: var(--slate-50); padding: .6rem 1rem; text-align: left; font-size: .7rem; font-weight: 600; color: var(--slate-600); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--slate-200); }
.dpi-table td { padding: .5rem 1rem; border-bottom: 1px solid var(--slate-100); }
.dpi-table tr:last-child td { border-bottom: none; }
.dpi-table tr:nth-child(even) td { background: var(--slate-50); }
.badge-ok  { color: #15803d; font-weight: 600; font-size: .78rem; }
.badge-warn{ color: #b45309; font-weight: 600; font-size: .78rem; }

/* ── Code block ──────────────────────────────────────────── */
.code-block {
  background: var(--slate-900); color: var(--slate-100);
  border-radius: 12px; padding: 1.1rem 1.25rem;
  font-family: 'Courier New', monospace; font-size: .83rem;
  line-height: 1.8; margin: 1rem 0 1.5rem; overflow-x: auto;
}
.code-comment { color: var(--slate-500); }
.code-var { color: var(--green-500); }
.code-str { color: #93c5fd; }
.code-num { color: #fbbf24; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--slate-900); color: var(--slate-400); margin-top: 5rem; padding: 3rem 1.25rem 1.5rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.footer-brand-name { color: white; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.footer-brand-desc { font-size: .82rem; line-height: 1.65; }
.footer-col-title { color: white; font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.footer-col a { display: block; font-size: .82rem; margin-bottom: .4rem; color: var(--slate-400); transition: color .15s; }
.footer-col a:hover { color: white; }
.footer-bottom { max-width: 1100px; margin: 0 auto; padding-top: 1.25rem; border-top: 1px solid #1e293b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .75rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ── Sticky mobile calibrate button ─────────────────────── */
.sticky-calib {
  display: none; position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 30;
  background: var(--blue-600); color: white; font-weight: 600;
  font-size: .85rem; padding: .65rem 1rem; border-radius: 999px;
  box-shadow: var(--shadow-lg); align-items: center; gap: .4rem;
  transition: background .15s, transform .15s;
}
.sticky-calib:hover { background: var(--blue-700); transform: scale(1.02); }
@media (max-width: 768px) { .sticky-calib { display: flex; } }
.sticky-calib.hidden { display: none !important; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
.fade-in { animation: fadeIn .45s ease-out; }

/* ── Main wrapper ────────────────────────────────────────── */
main { min-height: 60vh; }
.section-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 1.25rem; }
