:root {
  --color-bg: #fbf7f0;
  --color-surface: #fffdf8;
  --color-surface-strong: #ffffff;
  --color-text: #1e2930;
  --color-muted: #667780;
  --color-subtle: #e9ded0;
  --color-line: #d9cab8;
  --color-primary: #7c4dff;
  --color-primary-dark: #5533c8;
  --color-accent: #f97352;
  --color-safe: #187a5b;
  --color-warning: #9a5b00;
  --shadow-soft: 0 18px 22px rgba(44, 31, 20, .10);
  --shadow-card: 0 14px 24px rgba(44, 31, 20, .12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --track-width: 12800px;
  --track-height: 660px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, #fff2dc 0, transparent 30rem), var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; }
div:focus, div:focus-visible { outline: none; }
input[type="radio"],
input[type="range"],
input[type="checkbox"] { accent-color: var(--color-primary); }
input[type="radio"],
input[type="checkbox"] { width: 1.5rem; height: 1.5rem; cursor: pointer; flex-shrink: 0; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.045em; }
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.8rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: .75rem;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--color-text);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 999px;
}
.skip-link:focus { transform: translateY(0); }

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
}
.consent-inner {
  max-width: 980px;
  margin: 0 auto;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  backdrop-filter: blur(14px);
}
.consent-text { margin: 0 0 .85rem; color: var(--color-text); font-weight: 650; }
.consent-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.consent-meta { margin: .7rem 0 0; font-size: .92rem; color: var(--color-muted); }
.consent-meta a { text-decoration: none; font-weight: 850; }
.consent-meta a:hover { text-decoration: underline; }

@media (max-width: 620px) {
  h1 { font-size: clamp(2.15rem, 14vw, 4rem); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(251, 247, 240, .88);
  border-bottom: 1px solid rgba(217, 202, 184, .75);
}
.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: .85rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.03em;
}
.brand-mark {
  inline-size: 2.2rem;
  block-size: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: .9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 10px 22px rgba(124, 77, 255, .25);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: -.02em;
  font-family: ui-monospace, monospace;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a {
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 700;
  padding: .55rem .8rem;
  border-radius: 999px;
}
.nav-links a:hover,
.nav-links a:focus-visible { background: #fff; color: var(--color-text); outline: none; }

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.section h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin: 0; }
.section p.lede { max-width: 720px; color: var(--color-muted); margin: .7rem 0 0; }

.site-footer {
  border-top: 1px solid var(--color-subtle);
  padding: 2rem 0;
  color: var(--color-muted);
  background: rgba(255,255,255,.45);
}
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-grid a { color: var(--color-text); font-weight: 800; text-decoration: none; margin-inline-start: .8rem; }

.hero-copy {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 1rem;
  align-items: end;
  position: relative;
}
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--color-primary-dark);
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}
.hero-intro {
  max-width: 700px;
  margin: .9rem 0 0;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}
.hero-actions {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: flex-end;
}
.ad-mockup {
  width: 300px;
  height: 300px;
  border: 2px dashed var(--color-subtle);
  border-radius: 8px;
  background: #f7f7f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  color: var(--color-muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  user-select: none;
}
.ad-mockup-inner {
  width: 260px;
  height: 260px;
  border: 1px dashed var(--color-subtle);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .06em;
}

@media (max-width: 900px) {
  .hero-copy { grid-template-columns: 1fr; align-items: start; }
  .hero-actions { flex-direction: row; justify-content: flex-start; align-items: center; }
  .ad-mockup { display: none; }
  .section-header { display: block; }
}
@media (max-width: 620px) {
  .nav { align-items: flex-start; padding-left: 1rem; padding-right: 1rem; }
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .button { text-align: center; white-space: nowrap; }
}

.timeline-hero {
  min-height: calc(100svh - 66px);
  display: grid;
  grid-template-rows: auto 1fr;
  padding-block: clamp(1rem, 2vw, 1.5rem) 1rem;
}
.timeline-shell {
  min-width: 0;
  position: relative;
  margin-top: .5rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.timeline-controls {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto .6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.timeline-status {
  color: var(--color-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}
.timeline-buttons { display: flex; gap: .5rem; }
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-subtle);
  background: var(--color-surface-strong);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(44,31,20,.08);
}
.timeline-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  cursor: grab;
  overscroll-behavior-x: contain;
  padding: 20px 0 50px 0;
}
.timeline-scroller.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.timeline-scroller:focus-visible { outline: none; }
.life-track {
  width: var(--track-width);
  height: var(--track-height);
  min-height: var(--track-height);
  position: relative;
}
.axis-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,77,255,.25), rgba(249,115,82,.45), rgba(24,122,91,.28));
  transform: translateY(-50%);
}
.year-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 0 !important;
  background: rgba(30,41,48,.12);
  z-index: 99;
}
.year-marker.major { height: 0 !important; background: rgba(30,41,48,.20); }
.year-marker span {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: .18rem .42rem;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: #5534c9;
  color: #ffffff;
  font-size: .7rem;
  font-weight: 850;
  white-space: nowrap;
  z-index: 8;
}
.stage-label {
  position: absolute;
  bottom: calc(50% + 4px);
  transform: translateX(-50%);
  padding: .28rem .55rem;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: #5534c9;
  color: #ffffff;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
  z-index: 99;
}
.timeline-tool {
  position: absolute;
  left: var(--x);
  width: 200px;
  min-height: 104px;
  padding: .65rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217,202,184,.95);
  background: rgba(255, 253, 248, .93);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  scroll-snap-align: center;
  transform: translateX(-50%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.timeline-tool:hover,
.timeline-tool:focus-visible {
  transform: translateX(-50%) translateY(-4px);
  border-color: rgba(124,77,255,.45);
  outline: none;
  box-shadow: 0 20px 48px rgba(44,31,20,.16);
  z-index: 999;
}
.timeline-tool.above { top: calc(50% - (176px + (var(--lane) * 122px))); }
.timeline-tool.below { top: calc(50% + (60px + (var(--lane) * 122px))); }
.timeline-tool::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  background: rgba(124,77,255,.32);
  transform: translateX(-50%);
}
.timeline-tool.above::after { top: 100%; height: calc(176px + (var(--lane) * 122px) - 100%); }
.timeline-tool.below::after { bottom: 100%; height: calc(60px + (var(--lane) * 122px)); }
.tool-age {
  position: absolute;
  top: .55rem;
  right: .55rem;
  display: inline-flex;
  padding: .15rem .38rem;
  border-radius: 999px;
  background: #f1eafd;
  color: var(--color-primary-dark);
  font-weight: 900;
  font-size: .67rem;
  white-space: nowrap;
}
.tool-name {
  display: block;
  margin-top: 0;
  padding-right: 2.6rem;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: normal;
}
.tool-desc {
  display: block;
  margin: .28rem 0 0;
  color: var(--color-muted);
  font-size: .74rem;
}
.risk-badge {
  display: inline-flex;
  margin-top: .55rem;
  border-radius: 999px;
  padding: .2rem .45rem;
  background: #fff6e6;
  color: var(--color-warning);
  font-size: .68rem;
  font-weight: 850;
}

/* ── Now marker ── */
@keyframes now-ripple {
  0%   { transform: translate(-50%, -50%) scale(1);    opacity: .6; }
  100% { transform: translate(-50%, -50%) scale(16.5); opacity: 0;  }
}
@keyframes now-pulse {
  0%, 100% { box-shadow: 0 0 0 0    rgba(85,52,201,.55), 0 4px 20px rgba(85,52,201,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(85,52,201,.18), 0 4px 20px rgba(85,52,201,.4); }
}
.timeline-now {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}
.now-label {
  position: absolute;
  bottom: calc(50% + 18px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: .68rem;
  font-weight: 900;
  color: #fff;
  background: #5534c9;
  padding: .13rem .42rem;
  border-radius: 999px;
  border: 1.5px solid #fff;
  letter-spacing: .01em;
}
.now-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #5534c9;
  border: 2.5px solid #fff;
  animation: now-pulse 4s ease-in-out infinite;
  z-index: 4;
}
.now-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #5534c9;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  animation: now-ripple 7s ease-out infinite;
  animation-fill-mode: both;
  z-index: 3;
}
.now-ring:nth-child(2) { animation-delay: 0s;    }
.now-ring:nth-child(3) { animation-delay: 2.33s; }
.now-ring:nth-child(4) { animation-delay: 4.66s; }

/* Tool subpage timeline */
.tool-timeline { position: relative; z-index: 1; background: var(--color-surface-strong); border-top: 1px solid var(--color-subtle); }
.timeline-heading .eyebrow { margin-bottom: .15rem; }
.timeline-heading h2 { margin: 0; font-size: 1.4rem; }
.timeline-tool.is-active {
  width: 265px;
  min-height: 130px;
  z-index: 20;
  border: 2px solid rgba(124, 77, 255, .72);
  background: linear-gradient(180deg, #ffffff, #f8f3ff);
  box-shadow: 0 28px 60px rgba(124, 77, 255, .24);
}
.timeline-tool.is-active .tool-age::after { content: " · current tool"; }
.timeline-tool.is-active .tool-name { font-size: 1.1rem; }
.timeline-tool.is-active.above { top: calc(50% - 216px); }
.timeline-tool.is-active.above::after { height: calc(216px - 100%); }

@media (max-width: 900px) {
  :root { --track-width: 11000px; --track-height: 620px; }
  .life-track { height: var(--track-height); min-height: var(--track-height); }
  .timeline-tool { width: 192px; }
  .timeline-tool.is-active { width: 210px; }
}
@media (max-width: 620px) {
  :root { --track-width: 7800px; --track-height: 420px; }
  .timeline-hero { min-height: auto; }
  .life-track { min-height: var(--track-height); height: var(--track-height); }
  .timeline-tool { width: 148px; min-height: 76px; padding: .4rem .5rem; font-size: .82rem; }
  .timeline-tool .tool-name { font-size: .78rem; }
  .timeline-tool .tool-stage { font-size: .66rem; }
  .timeline-tool.above { top: calc(50% - (120px + (var(--lane) * 86px))); }
  .timeline-tool.above::after { height: calc(120px + (var(--lane) * 86px) - 100%); }
  .timeline-tool.below { top: calc(50% + (40px + (var(--lane) * 86px))); }
  .timeline-tool.below::after { height: calc(40px + (var(--lane) * 86px)); }
  .timeline-controls { align-items: flex-start; flex-direction: column; }
  .tool-timeline .timeline-controls { flex-direction: row; align-items: center; }
  .timeline-tool.is-active { width: 162px; }
  .timeline-tool.is-active.above { top: calc(50% - 150px); }
  .timeline-tool.is-active.above::after { height: calc(150px - 100%); }
  .timeline-scroller { padding: 12px 30px; }
  .timeline-status { font-size: .9rem; }
}

.button {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .82rem 1rem;
  font-weight: 850;
  min-height: 44px;
}
.button.primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-card); }
.button.secondary { background: #fff; color: var(--color-text); border: 1px solid var(--color-subtle); }
.button.reset { background: #fff; color: var(--color-text); border: 1px solid var(--color-subtle); }
.button:hover { transform: translateY(-1px); }

.grid { display: grid; gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}
.card h3 { margin: 0 0 .45rem; font-size: 1.18rem; }
.card p { color: var(--color-muted); margin: 0; }
.card a { font-weight: 850; text-decoration: none; }

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tool-list a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--color-subtle);
  background: var(--color-surface-strong);
  border-radius: 16px;
  padding: .9rem;
  font-weight: 850;
}
.tool-list a span { display: block; color: var(--color-muted); font-size: .82rem; font-weight: 650; margin-top: .18rem; }

.faq details {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 22px rgba(44,31,20,.06);
}
.faq details + details { margin-top: .75rem; }
.faq summary { cursor: pointer; font-weight: 900; }
.faq p { color: var(--color-muted); margin-bottom: 0; }

/* Visitor age badge */
.visitor-age-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  padding: .3rem .6rem .3rem .85rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.2;
}
.visitor-age-badge button {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.75);
  padding: 0 .1rem;
  font-size: .95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}
.visitor-age-badge button:hover { color: #fff; }

/* Age input on homepage */
.age-input-section {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.age-input-label {
  font-weight: 850;
  font-size: .85rem;
  color: var(--color-muted);
  white-space: nowrap;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.age-number-input {
  width: 5rem;
  font-size: 2.2rem;
  font-weight: 900;
  border: 2px solid var(--color-subtle);
  border-radius: var(--radius-md);
  padding: .2rem .4rem;
  background: #fff;
  color: var(--color-text);
  text-align: center;
  -moz-appearance: textfield;
  line-height: 1.1;
}
.age-number-input::-webkit-outer-spin-button,
.age-number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.age-number-input:focus { outline: 2px solid var(--color-primary); border-color: transparent; }
.age-range-input {
  flex: 1;
  min-width: 100px;
  max-width: 280px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.age-input-hint {
  font-size: .78rem;
  color: var(--color-muted);
}

/* ── Embed Panel ── */
.embed-panel-wrap { display: contents; }
.embed-config-bar {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto .75rem;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  order: -1;
}
.embed-config-bar[hidden] { display: none; }
.embed-config-bar-inner { padding: 1rem 1.5rem; }
.embed-code-section {
  width: min(1180px, calc(100% - 2rem));
  margin: .75rem auto 0;
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.embed-code-section[hidden] { display: none; }
.embed-code-section-inner { padding: 1rem 1.5rem; }
.embed-drawer-heading {
  margin: 0 0 1rem;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.embed-section-label {
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-muted);
  margin: .85rem 0 .45rem;
}
.embed-section-label:first-of-type { margin-top: 0; }
.embed-controls-row {
  display: flex;
  align-items: center;
  gap: .5rem .9rem;
  flex-wrap: wrap;
}
.embed-color-field {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}
.embed-ctrl-group {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.embed-ctrl-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-muted);
  white-space: nowrap;
}
.embed-color-input {
  width: 36px;
  height: 28px;
  padding: 2px;
  border-radius: 7px;
  border: 1px solid var(--color-subtle);
  background: #fff;
  cursor: pointer;
}
.embed-color-input::-webkit-color-swatch-wrapper { padding: 0; border-radius: 5px; }
.embed-color-input::-webkit-color-swatch { border: none; border-radius: 4px; }
.embed-radius-btn,
.embed-option-btn {
  padding: .25rem .7rem;
  border-radius: 14px;
  border: 1px solid var(--color-subtle);
  background: #fff;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 800;
  color: var(--color-muted);
  transition: all .12s;
}
.embed-radius-btn:hover:not(.active),
.embed-option-btn:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.embed-radius-btn.active,
.embed-option-btn.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.embed-preview-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-bottom: .1rem;
}
.embed-preview-iframe {
  width: 900px;
  height: 700px;
  border: none;
  display: block;
  transform-origin: top left;
  pointer-events: none;
  user-select: none;
}

.embed-code-wrap { margin-top: .85rem; }
.embed-code-textarea {
  width: 100%;
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: .75rem;
  line-height: 1.55;
  background: #f5f2ee;
  border: 1px solid var(--color-subtle);
  border-radius: 10px;
  padding: .75rem 1rem;
  color: var(--color-text);
  resize: none;
  display: block;
  word-break: break-all;
}
.embed-code-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .6rem;
}
.embed-copy-confirm {
  font-size: .82rem;
  font-weight: 700;
  color: #22c55e;
  min-height: 1.2em;
}


/* ── Related Tools ── */
.related-tools { padding: 2rem 0; }
.related-tools-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.related-tool-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform .15s, box-shadow .15s;
}
.related-tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.related-tool-name { font-weight: 750; font-size: .95rem; color: var(--color-text); }
.related-tool-tagline { font-size: .82rem; color: var(--color-muted); line-height: 1.4; }

@media (max-width: 900px) {
  .grid.three, .grid.four, .tool-list { grid-template-columns: 1fr 1fr; }
  .age-range-input { max-width: 100%; }
}
@media (max-width: 620px) {
  .grid.three, .grid.four, .tool-list { grid-template-columns: 1fr; }
}

.share-card-builder {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3vw, 1.5rem);
}
.share-card-builder h2 { margin: 0 0 .45rem; font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -.04em; }
.share-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin: 1rem 0;
}
.share-preset {
  min-height: 58px;
  text-align: left;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--color-text);
  cursor: pointer;
  padding: .7rem .8rem;
  font-weight: 900;
}
.share-preset span { display: block; margin-top: .12rem; color: var(--color-muted); font-size: .76rem; font-weight: 700; }
.share-preset:hover,
.share-preset:focus-visible,
.share-preset.is-active {
  border-color: rgba(124,77,255,.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,77,255,.12);
  background: #f8f3ff;
}
.share-preview-frame {
  border-radius: 22px;
  padding: .75rem;
  background: #f6efe5;
  border: 1px solid var(--color-subtle);
  overflow: hidden;
}
.share-card-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 320px;
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .5rem;
  overflow: hidden;
  border-radius: 18px;
  padding: clamp(1.1rem, 5vw, 2rem);
  text-align: center;
  isolation: isolate;
  color: #fff;
  background: radial-gradient(circle at 18% 18%, rgba(255,255,255,.38), transparent 26%), linear-gradient(135deg, #ff4d7d, #7c4dff 55%, #111827);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.share-card-preview::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  z-index: -1;
}
.share-card-preview h3 { margin: 0; max-width: 14ch; font-size: clamp(1.55rem, 5vw, 3.1rem); line-height: .94; letter-spacing: -.07em; }
.share-preview-kicker,
.share-watermark,
.share-preview-brand {
  border-radius: 999px;
  padding: .35rem .65rem;
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.88);
  font-weight: 850;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.share-watermark {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 2;
  font-size: .64rem;
}
.share-preview-score {
  display: block;
  font-size: clamp(3.8rem, 15vw, 7rem);
  line-height: .86;
  letter-spacing: -.09em;
  text-shadow: 0 16px 28px rgba(0,0,0,.18);
}
.share-preview-pair { margin: .1rem 0 0; font-size: clamp(1rem, 3vw, 1.45rem); font-weight: 900; }
.share-preview-note { max-width: 24rem; margin: .15rem 0 0; color: rgba(255,255,255,.86); font-weight: 650; }
.share-preview-brand { margin-top: .35rem; }

.platform-instagram-story,
.platform-tiktok-vertical { aspect-ratio: 9 / 16; }
.platform-x-landscape { aspect-ratio: 16 / 9; min-height: 230px; }
.platform-linkedin-card { aspect-ratio: 1200 / 627; min-height: 230px; }
.platform-pinterest-pin { aspect-ratio: 2 / 3; }
.platform-instagram-story { background: radial-gradient(circle at top, rgba(255,255,255,.34), transparent 28%), linear-gradient(180deg, #fd297b, #ff655b 45%, #6f3cff); }
.platform-x-landscape { background: radial-gradient(circle at 12% 20%, rgba(255,255,255,.28), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8); }
.platform-tiktok-vertical { background: radial-gradient(circle at 72% 18%, rgba(0,242,234,.3), transparent 24%), radial-gradient(circle at 22% 80%, rgba(255,0,80,.32), transparent 28%), #09090b; }
.platform-linkedin-card { color: #0f172a; background: linear-gradient(135deg, #e8f1ff, #ffffff 50%, #dbeafe); }
.platform-linkedin-card .share-preview-kicker,
.platform-linkedin-card .share-watermark,
.platform-linkedin-card .share-preview-brand { color: #0a66c2; background: rgba(10,102,194,.1); }
.platform-linkedin-card .share-preview-note { color: #475569; }
.platform-linkedin-card .share-preview-score { color: #0a66c2; text-shadow: none; }
.platform-pinterest-pin { background: radial-gradient(circle at top left, rgba(255,255,255,.35), transparent 26%), linear-gradient(160deg, #bd081c, #f97352 62%, #351312); }

.share-caption-field { margin-top: 1rem; }
.share-caption-field textarea {
  width: 100%;
  resize: vertical;
  min-height: 82px;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .85rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
}
.share-actions { margin-top: .8rem; }
.share-status { min-height: 1.2em; margin: .65rem 0 0; color: var(--color-muted); font-size: .88rem; font-weight: 750; }

@media (max-width: 620px) {
  .share-platform-grid { grid-template-columns: 1fr; }
}

.breadcrumbs-bar {
  width: min(1180px, calc(100% - 2rem));
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.breadcrumbs {
  color: var(--color-muted);
  font-size: .9rem;
  font-weight: 750;
}
.breadcrumbs ol {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs a { color: var(--color-text); text-decoration: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-inline-start: .5rem; color: var(--color-muted); }

.tool-page-hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.tool-page-hero .hero-copy { align-items: start; }
.tool-page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  max-width: 820px;
  margin-bottom: 0;
}
.hero-subtitle {
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 400;
  line-height: normal;
  color: var(--color-text);
  margin: 0.3rem 0 0;
  max-width: 820px;
}

.tool-workspace { padding-top: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; align-items: stretch; }
.tool-mode-bar { order: -2; }
.tool-mode-bar {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
  display: flex;
  gap: .65rem;
  align-items: center;
}
.bookmark-hint {
  margin-left: auto;
  font-size: .78rem;
  color: var(--color-muted);
  white-space: normal;
}
.tool-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.25rem;
  align-items: start;
}
.calculator-card,
.result-card,
.notice-card {
  background: var(--color-surface-strong);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3vw, 1.5rem);
  min-width: 0;
}
.calculator-card h2,
.result-card h2,
.content-block h2 { margin: 0 0 16px; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.field-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; align-items: start; }
.field-grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr 1fr; align-items: start; }
.form-field { display: grid; gap: .45rem; min-width: 0; }
.form-field label { font-weight: 900; line-height: 1.4; min-height: 1.4em; }
/* Consistent vertical rhythm between sibling form sections at the form level.
   .calculator-card IS the form/container element. Excludes columns inside
   .cc-price-row, .field-grid, .field-grid-3 (those align by grid row, not margin). */
.calculator-card > .form-field + .form-field,
.calculator-card > .form-field + .field-grid,
.calculator-card > .form-field + .field-grid-3,
.calculator-card > .form-field + .cc-price-row,
.calculator-card > .field-grid + .form-field,
.calculator-card > .field-grid + .field-grid,
.calculator-card > .field-grid + .cc-price-row,
.calculator-card > .field-grid-3 + .form-field,
.calculator-card > .field-grid-3 + .field-grid-3,
.calculator-card > .cc-price-row + .form-field,
.calculator-card > .cc-price-row + .field-grid { margin-top: 1rem; }
/* Same rhythm inside the concrete calculator's show/hide shape wrappers. */
[id^="cc-fields-"] > .form-field + .form-field,
[id^="cc-fields-"] > .form-field + .field-grid,
[id^="cc-fields-"] > .field-grid + .form-field,
[id^="cc-fields-"] > .field-grid + .field-grid { margin-top: 1rem; }
.form-field label:has(input[type="radio"]),
.form-field label:has(input[type="checkbox"]) { font-weight: normal !important; }
.form-field input {
  min-height: 56px;
  min-width: 0;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .9rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
}
.form-field input:focus {
  outline: 3px solid rgba(124,77,255,.22);
  border-color: rgba(124,77,255,.7);
}
.form-field textarea {
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .85rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
  resize: none;
  min-height: 4rem;
  field-sizing: content;
  overflow: hidden;
}
.teams-grid { display: grid; gap: .65rem; margin-top: .75rem; }
.team-card { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-subtle); }
.team-card-header {
  background: var(--team-color, var(--color-primary));
  color: #fff;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.team-card-header strong { flex: 1; font-size: 1rem; }
.team-size { font-size: .78rem; opacity: .88; font-weight: 700; }
.team-members { list-style: none; padding: .5rem 1rem .65rem; margin: 0; display: grid; gap: .2rem; }
.team-members li { font-size: .9rem; padding: .2rem 0; border-bottom: 1px solid var(--color-subtle); }
.team-members li:last-child { border-bottom: none; }

.form-field select {
  min-height: 56px;
  min-width: 0;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .9rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
}
.form-field + .form-field { margin-top: 1rem; }
.field-grid > .form-field + .form-field,
.field-grid-3 > .form-field + .form-field,
.cc-price-row > .form-field + .form-field { margin-top: 0; }

/* Base styles for form-label / form-input (used by QR Code Generator and Case Converter) */
.form-label {
  display: block;
  font-weight: 900;
  margin-bottom: .35rem;
}
.form-input {
  width: 100%;
  display: block;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .9rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
}
input.form-input,
select.form-input { min-height: 56px; }
.form-input:focus {
  outline: 3px solid rgba(124,77,255,.22);
  border-color: rgba(124,77,255,.7);
}
textarea.form-input { resize: vertical; min-height: 4rem; }

.radio-group { display: flex; gap: 1rem; margin-top: .4rem; }
.radio-group label { display: flex; gap: .4rem; align-items: center; cursor: pointer; font-weight: 400; }
.helper-text { color: var(--color-muted); font-size: .92rem; margin: .35rem 0 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }

.result-card { position: static; }
.score-ring {
  width: min(230px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--color-primary) var(--score-angle, 0deg), #efe7dc 0deg);
  box-shadow: inset 0 0 0 16px #fff, var(--shadow-card);
}
.score-ring strong { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.06em; }
.result-label { text-align: center; font-weight: 950; font-size: 1.35rem; margin: .5rem 0; }
.result-copy { text-align: center; color: var(--color-muted); margin: 0; }
.result-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  margin-top: 1rem;
}
.mini-stat { border-radius: 16px; background: #fbf7f0; padding: .75rem; text-align: center; }
.mini-stat span { display: block; color: var(--color-muted); font-size: .76rem; font-weight: 800; }
.mini-stat strong { display: block; font-size: 1.05rem; margin-top: .15rem; }

.input-row { display: flex; align-items: center; gap: .5rem; }
.input-row input { flex: 1; min-width: 0; min-height: 56px; border: 1px solid var(--color-subtle); border-radius: 16px; padding: .9rem 1rem; background: #fffdf8; color: var(--color-text); font-size: 1rem; }

.input-with-unit { position: relative; display: block; min-width: 0; }
.input-with-unit > input { width: 100%; -moz-appearance: textfield; }
.input-with-unit > input::-webkit-outer-spin-button,
.input-with-unit > input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-row > .input-with-unit { flex: 1; }
.input-with-unit[data-suffix] > input { padding-right: 3.5rem; }
.input-with-unit[data-prefix] > input { padding-left: 2.5rem; }
.input-with-unit[data-suffix]::after,
.input-with-unit[data-prefix]::before {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.input-with-unit[data-suffix]::after { content: attr(data-suffix); right: 1rem; }
.input-with-unit[data-prefix]::before { content: attr(data-prefix); left: 1rem; }
.athlete-card { margin-top: 0; }
.athlete-bio { display: grid; gap: .55rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--color-subtle); }
.athlete-bio[hidden] { display: none; }
.athlete-bio-img { width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: #f0ede8; }
.athlete-bio-extract { font-size: .85rem; color: var(--color-text); line-height: 1.5; margin: 0; }
.athlete-bio-link { font-size: .82rem; font-weight: 700; color: var(--color-primary); text-decoration: none; }
.athlete-bio-link:hover { text-decoration: underline; }

.pg-output-wrap { position: relative; margin: .75rem 0; }
.pg-output { font-family: "Courier New", Courier, monospace; font-size: clamp(.8rem, 1.8vw, .95rem); word-break: break-all; background: #f0ede8; border: 1px solid var(--color-subtle); border-radius: 12px; padding: .85rem 3.75rem .85rem 1rem; min-height: 3rem; line-height: 1.6; color: var(--color-text); user-select: all; }
.pg-copy-btn { position: absolute; top: .5rem; right: .5rem; padding: .3rem .7rem; font-size: .78rem; font-weight: 800; background: var(--color-primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; letter-spacing: .02em; }
.pg-copy-confirm { font-size: .8rem; color: #22c55e; font-weight: 700; margin-top: .25rem; min-height: 1.2em; }
.strength-bar-wrap { height: 6px; background: var(--color-subtle); border-radius: 3px; overflow: hidden; margin: .75rem 0 .3rem; }
.strength-bar { height: 100%; border-radius: 3px; transition: width .25s ease, background-color .25s ease; width: var(--strength-w, 0%); background-color: var(--strength-color, #ccc); }
.strength-label-row { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; margin-bottom: .65rem; }
.strength-label-row strong { font-weight: 800; }
.range-field { margin: .75rem 0; }
.range-field label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .35rem; }
.range-row { display: flex; align-items: center; gap: .65rem; }
.range-row input[type="range"] { flex: 1; accent-color: var(--color-primary); cursor: pointer; }
.range-val { font-size: .88rem; font-weight: 800; min-width: 2.25rem; text-align: right; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem .75rem; margin: .75rem 0; }
.checkbox-grid label { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 400; cursor: pointer; }
.single-check { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 400; cursor: pointer; margin: .35rem 0; }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin-top: .75rem; }
.stat-item { border-radius: 16px; background: #fbf7f0; padding: .75rem 1rem; border: 1px solid var(--color-subtle); min-width: 0; }
.stat-primary { grid-column: 1 / -1; background: #fff; padding: 1rem 1.25rem; }
.stat-full { grid-column: 1 / -1; }
.stat-label { display: block; color: var(--color-muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.stat-value { display: block; font-size: 1.15rem; font-weight: 950; letter-spacing: -.02em; overflow-wrap: break-word; word-break: break-word; }
.stat-primary .stat-value { font-size: clamp(1.1rem, 3vw, 2.25rem); }

.side-stack {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 1rem;
  align-self: start;
  z-index: 10;
  min-width: 0;
}
.side-stack > * { min-width: 0; }
.side-stack .result-card { position: static; }

/* Mosaic layout — when the side-stack has 3+ containers on a wide viewport, give the
   form a fixed-ish column on the left and let the right side flow into multiple columns
   so we don't end up with a long single-column stack of cards. */
@media (min-width: 1100px) {
  .tool-layout:has(.side-stack > :nth-child(3)) {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row dense;
  }
  /* Promote side-stack children to direct grid items so the form + each card share
     the same 2-column grid (no nested 1+2 = 3 columns). */
  .tool-layout:has(.side-stack > :nth-child(3)) > .side-stack {
    display: contents;
  }
}

.notice-card {
  margin-top: 1rem;
  border-color: rgba(154,91,0,.25);
  background: #fffaf0;
}
.notice-card strong { color: var(--color-warning); }

.content-block {
  background: rgba(255,255,255,.6);
  border: 1px solid var(--color-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3vw, 1.5rem);
}
.content-block + .content-block { margin-top: 1rem; }
.content-block p, .content-block li { color: var(--color-muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.example-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.example-table th,
.example-table td { text-align: left; padding: .85rem; border-bottom: 1px solid var(--color-subtle); }
.example-table th { color: var(--color-text); background: #f7efe5; }

.related-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.related-links a {
  display: block;
  padding: .9rem;
  background: #fff;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  text-decoration: none;
  font-weight: 900;
}
.related-links a:hover { border-color: rgba(124,77,255,.4); }

/* Age Calculator specific */
.age-hero-display {
  text-align: center;
  margin-bottom: .75rem;
}
.age-years-number {
  display: block;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  font-weight: 950;
  letter-spacing: -.06em;
  line-height: .9;
  color: var(--color-primary-dark);
}
.age-years-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-muted);
  margin-top: .25rem;
}
.age-birthdate {
  display: block;
  font-size: .85rem;
  color: var(--color-muted);
  margin-top: .25rem;
}
.birthday-countdown-box {
  margin-top: .75rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f8f3ff, #fef0fd);
  border: 1px solid rgba(124,77,255,.2);
  padding: .75rem 1rem;
  text-align: center;
}
.countdown-label {
  display: block;
  color: var(--color-muted);
  font-size: .8rem;
  font-weight: 750;
}
.countdown-days {
  display: block;
  font-size: 1.5rem;
  font-weight: 950;
  letter-spacing: -.04em;
  color: var(--color-primary-dark);
  margin-top: .1rem;
}
.countdown-date {
  display: block;
  color: var(--color-muted);
  font-size: .82rem;
  margin-top: .1rem;
}
.milestones-details { margin-top: .75rem; }
.milestones-details summary {
  cursor: pointer;
  font-weight: 900;
  font-size: .9rem;
  color: var(--color-muted);
  padding: .2rem 0;
}
.milestones-list {
  list-style: none;
  padding: 0;
  margin: .6rem 0 0;
  display: grid;
  gap: .35rem;
}
.milestone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .65rem;
  border-radius: 10px;
  font-size: .82rem;
  gap: .5rem;
}
.milestone-item.past { background: #f5f0e8; color: var(--color-muted); }
.milestone-item.upcoming { background: #f8f3ff; color: var(--color-primary-dark); }
.milestone-item.soon {
  background: linear-gradient(135deg, #f0e8ff, #fef0f8);
  border: 1px solid rgba(124,77,255,.22);
  font-weight: 850;
}
.milestone-name { font-weight: 800; white-space: nowrap; }
.milestone-date { font-size: .78rem; opacity: .85; text-align: right; }

/* Birthday celebrities (age calculator) */
.birthday-celebs { margin-top: 1rem; padding: 1rem 1.1rem; background: #fbf7f0; border: 1px solid var(--color-subtle); border-radius: 14px; }
.birthday-celebs h2 { font-size: 1.15rem; margin: .15rem 0 .35rem; }
.celeb-grid { list-style: none; padding: 0; margin: .85rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .65rem; }
.celeb-card { display: flex; flex-direction: column; gap: .45rem; padding: .55rem; background: #fff; border: 1px solid var(--color-subtle); border-radius: 10px; }
.celeb-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: #f0ede8; }
.celeb-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 900; color: var(--color-muted); }
.celeb-meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.celeb-name { font-size: .85rem; font-weight: 800; color: var(--color-text); text-decoration: none; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.celeb-name:hover { color: var(--color-primary); text-decoration: underline; }
.celeb-occupation { font-size: .72rem; color: var(--color-muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Lorem Ipsum Generator */
.li-theme-pills { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: none; margin: .75rem 0 1rem; flex-wrap: wrap; }
.li-theme-pills::-webkit-scrollbar { display: none; }
.li-theme-pill { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.li-theme-pill.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.li-theme-pill:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.li-output-wrap { position: relative; margin: .75rem 0; }
.li-output { font-family: Georgia, 'Times New Roman', serif; font-size: .9rem; line-height: 1.8; background: #f9f6f0; border: 1px solid var(--color-subtle); border-radius: 12px; padding: .85rem 1rem; min-height: 220px; max-height: 420px; overflow-y: auto; color: var(--color-text); white-space: pre-wrap; word-break: break-word; user-select: all; }
.li-copy-btn { position: absolute; top: .5rem; right: .5rem; padding: .3rem .7rem; font-size: .78rem; font-weight: 800; background: var(--color-primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; letter-spacing: .02em; }
.li-copy-confirm { font-size: .8rem; color: #22c55e; font-weight: 700; margin-top: .25rem; min-height: 1.2em; }

/* Unit Converter */
.uc-tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: none; margin: .75rem 0 1rem; flex-wrap: wrap; }
.uc-tabs::-webkit-scrollbar { display: none; }
.uc-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.uc-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.uc-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.uc-swap-row { display: flex; justify-content: center; margin: .5rem 0; }
.uc-swap-btn { padding: .4rem 1rem; border-radius: 12px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .88rem; font-weight: 800; color: var(--color-muted); transition: all .15s; }
.uc-swap-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.uc-result-display { display: flex; align-items: baseline; gap: .4rem; margin: .35rem 0 .5rem; flex-wrap: wrap; }
.uc-result-primary { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 950; letter-spacing: -.03em; line-height: 1; color: var(--color-primary-dark); word-break: break-all; }
.uc-result-unit-label { font-size: 1.1rem; font-weight: 800; color: var(--color-muted); }
.uc-result-equation { font-size: .82rem; color: var(--color-muted); margin: 0 0 .75rem; font-weight: 600; }
.comparison-cards { display: grid; gap: .5rem; margin-top: .75rem; }
.comparison-card { display: flex; gap: .65rem; align-items: flex-start; background: #fbf7f0; border-radius: 12px; padding: .6rem .85rem; border: 1px solid var(--color-subtle); }
.cc-icon { font-size: 1.4rem; line-height: 1.2; flex-shrink: 0; }
.cc-text { font-size: .84rem; color: var(--color-muted); line-height: 1.4; }
.cc-text strong { display: block; color: var(--color-text); font-weight: 800; font-size: .82rem; margin-bottom: .1rem; }

/* Text to Handwriting Generator */
.thg-style-pills,
.thg-paper-pills { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; flex-wrap: wrap; }
.thg-style-pills::-webkit-scrollbar,
.thg-paper-pills::-webkit-scrollbar { display: none; }
.thg-style-pill,
.thg-paper-pill { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.thg-style-pill.active,
.thg-paper-pill.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.thg-style-pill:hover:not(.active),
.thg-paper-pill:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.thg-ink-pills,
.thg-size-pills { display: flex; gap: .35rem; flex-wrap: wrap; }
.thg-ink-pill,
.thg-size-pill { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.thg-ink-pill.active[data-thg-ink="black"] { background: #1c1c1a; color: #fff; border-color: #1c1c1a; }
.thg-ink-pill.active[data-thg-ink="blue"]  { background: #1a3a6b; color: #fff; border-color: #1a3a6b; }
.thg-ink-pill.active[data-thg-ink="red"]   { background: #8b1a1a; color: #fff; border-color: #8b1a1a; }
.thg-ink-pill:hover:not(.active),
.thg-size-pill:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.thg-size-pill.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.thg-canvas-wrap { border-radius: 12px; overflow: hidden; background: #eee; margin: .5rem 0 .75rem; line-height: 0; }
#thg-canvas { width: 100%; height: auto; display: block; }
.thg-download-btn { width: 100%; }
.thg-ethical-notice { margin-top: 1rem; background: #fffaf0; border: 1px solid rgba(154,91,0,.25); border-radius: var(--radius-md); padding: .75rem 1rem; font-size: .85rem; color: var(--color-muted); }
.thg-ethical-notice strong { color: var(--color-warning); }

/* Concrete Calculator */
.cc-shape-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.cc-shape-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.cc-shape-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cc-shape-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.cc-unit-row { display: flex; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.cc-unit-btn { padding: .25rem .75rem; border-radius: 14px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; }
.cc-unit-btn.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.cc-unit-btn:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.cc-section-label { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); margin: 1.1rem 0 .6rem; border-top: 1px solid var(--color-subtle); padding-top: .9rem; }
.cc-bag-radios { display: flex; gap: .75rem; flex-wrap: wrap; }
.cc-bag-radios label { display: flex; align-items: center; gap: .35rem; font-size: .88rem; cursor: pointer; font-weight: 600; }
.cc-price-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cc-result-vol { font-size: clamp(2.2rem, 5.5vw, 3.4rem); font-weight: 950; letter-spacing: -.04em; line-height: 1; color: var(--color-primary-dark); }
.cc-result-unit { font-size: 1rem; font-weight: 700; color: var(--color-muted); }
.cc-result-sub { font-size: .82rem; color: var(--color-muted); margin: .25rem 0 .75rem; }
.cc-result-divider { border: none; border-top: 1px solid var(--color-subtle); margin: .85rem 0; }
.cc-bags-row { display: flex; align-items: baseline; gap: .4rem; }
.cc-bags-count { font-size: 1.7rem; font-weight: 950; letter-spacing: -.03em; color: var(--color-text); }
.cc-bags-label { font-size: .88rem; font-weight: 700; color: var(--color-muted); }
.cc-cost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .6rem; }
.cc-cost-card { background: #fbf7f0; border: 1px solid var(--color-subtle); border-radius: 12px; padding: .6rem .85rem; }
.cc-cost-card strong { display: block; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); margin-bottom: .2rem; }
.cc-cost-card span { font-size: 1.15rem; font-weight: 950; letter-spacing: -.02em; }
.cc-cost-card.winner { background: #f0fdf0; border-color: #b8ddb8; }
.cc-cost-card.winner span { color: #1a6a1a; }
.cc-verdict { border-radius: 12px; padding: .65rem 1rem; font-size: .86rem; margin-top: .75rem; line-height: 1.5; }
.cc-verdict.bags { background: #f0f0ff; border: 1px solid rgba(124,77,255,.25); color: var(--color-primary-dark); }
.cc-verdict.readymix { background: #f0fdf0; border: 1px solid #b8ddb8; color: #1a6a1a; }
.cc-waste-row { display: flex; align-items: center; gap: .65rem; }
.cc-waste-row input[type="range"] { flex: 1; accent-color: var(--color-primary); cursor: pointer; }
.cc-waste-val { font-size: .88rem; font-weight: 800; min-width: 2.5rem; }

/* Mortgage Calculator */
.mc-term-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.mc-term-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.mc-term-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.mc-term-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
/* Flex-based $ prefix — avoids absolute-positioning cascade conflicts */
.mc-money-wrap { display: flex; align-items: center; border: 1px solid var(--color-subtle); border-radius: 16px; background: #fffdf8; }
.mc-money-wrap:focus-within { outline: 3px solid rgba(124,77,255,.22); border-color: rgba(124,77,255,.7); }
.mc-money-sym { flex-shrink: 0; padding: 0 .15rem 0 1rem; font-size: 1rem; font-weight: 600; color: var(--color-muted); pointer-events: none; user-select: none; }
.mc-money-wrap input { flex: 1; min-width: 0; min-height: 56px; border: none; background: transparent; padding: .9rem .9rem .9rem .3rem; color: var(--color-text); }
.mc-money-wrap input:focus { outline: none; }
/* Flex-based % suffix */
.mc-pct-wrap { display: flex; align-items: center; border: 1px solid var(--color-subtle); border-radius: 16px; background: #fffdf8; }
.mc-pct-wrap:focus-within { outline: 3px solid rgba(124,77,255,.22); border-color: rgba(124,77,255,.7); }
.mc-pct-wrap input { flex: 1; min-width: 0; min-height: 56px; border: none; background: transparent; padding: .9rem 0 .9rem .9rem; color: var(--color-text); }
.mc-pct-wrap input:focus { outline: none; }
.mc-pct-sym { flex-shrink: 0; padding: 0 1rem 0 .15rem; font-size: 1rem; font-weight: 600; color: var(--color-muted); pointer-events: none; user-select: none; }
.mc-dp-helper { font-size: .8rem; color: var(--color-muted); font-weight: 600; min-height: 1.1em; }
.mc-extras-toggle { background: none; border: none; color: var(--color-primary); font-size: .84rem; font-weight: 800; cursor: pointer; padding: .55rem 0 .3rem; display: flex; align-items: center; gap: .35rem; }
.mc-extras-toggle:hover { color: var(--color-primary-dark); }
.mc-pmi-notice { background: #fffaf0; border: 1px solid rgba(154,91,0,.25); border-radius: 12px; padding: .65rem 1rem; font-size: .84rem; color: var(--color-muted); margin-top: .75rem; line-height: 1.55; }
.mc-pmi-notice strong { color: var(--color-warning); display: block; margin-bottom: .2rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.mc-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .65rem 1rem; background: #f0fdf0; border: 1px solid #b8ddb8; border-radius: 12px; margin-top: .75rem; flex-wrap: wrap; }
.mc-total-label { font-size: .82rem; font-weight: 800; color: #1a6a1a; }
.mc-total-val { font-size: 1.2rem; font-weight: 950; letter-spacing: -.03em; color: #1a6a1a; }
.mc-pmi-dropoff { display: block; margin-top: .35rem; font-size: .8rem; color: var(--color-muted); }
.mc-savings-callout { background: #f0fdf4; border: 1px solid #a7f3c0; border-radius: 12px; padding: .65rem 1rem; font-size: .85rem; color: #15803d; line-height: 1.55; margin-top: .75rem; }
.mc-savings-callout strong { display: inline; color: #15803d; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.mc-compare-card { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-soft); margin-top: .75rem; }
.mc-compare-heading { margin: .15rem 0 .9rem; font-size: 1rem; letter-spacing: -.02em; }
.mc-compare-table-wrap { overflow-x: auto; }
.mc-compare-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.mc-compare-table th, .mc-compare-table td { padding: .45rem .6rem; text-align: right; border-bottom: 1px solid var(--color-subtle); white-space: nowrap; }
.mc-compare-table thead th { font-size: .78rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.mc-compare-table tbody th { text-align: left; font-weight: 700; color: var(--color-muted); font-size: .8rem; white-space: nowrap; }
.mc-compare-table tr:last-child td, .mc-compare-table tr:last-child th { border-bottom: none; }
.mc-compare-sel { color: var(--color-primary); font-weight: 900; }
.mc-compare-table thead .mc-compare-sel { background: rgba(124,77,255,.08); border-radius: 6px 6px 0 0; }
.mc-compare-table tbody .mc-compare-sel { background: rgba(124,77,255,.04); }
.mc-amort-wrap { margin-top: 1.5rem; }
.mc-amort-toggle { background: none; border: none; cursor: pointer; font-size: .84rem; font-weight: 800; color: var(--color-muted); padding: .4rem 0; letter-spacing: .02em; display: inline-flex; align-items: center; gap: .35rem; }
.mc-amort-toggle:hover { color: var(--color-primary); }
.mc-amort-section { margin-top: .65rem; overflow-x: auto; border: 1px solid var(--color-subtle); border-radius: var(--radius-md); background: var(--color-surface-strong); box-shadow: var(--shadow-soft); }
.mc-amort-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.mc-amort-table th, .mc-amort-table td { padding: .45rem .75rem; text-align: right; border-bottom: 1px solid var(--color-subtle); white-space: nowrap; }
.mc-amort-table thead th { font-size: .78rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; background: var(--color-surface-strong); position: sticky; top: 0; }
.mc-amort-table td:first-child { text-align: left; font-weight: 700; }
.mc-amort-table tr:last-child td { border-bottom: none; }
.mc-amort-table tbody tr:hover { background: rgba(124,77,255,.04); }

/* ── Mortgage: View tabs (PITI toggle + amort toggle) ── */
.mc-view-tab { padding: .28rem .75rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .78rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.mc-view-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.mc-view-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }

.mc-piti-tabs { display: flex; gap: .35rem; margin-bottom: .75rem; }
.mc-amort-view-tabs { display: flex; gap: .35rem; margin-bottom: .75rem; }

/* ── Mortgage: PITI breakdown ── */
.mc-piti-breakdown { background: #f0fdf0; border: 1px solid #b8ddb8; border-radius: 12px; padding: .65rem 1rem; margin-top: .75rem; }
.mc-piti-line { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .18rem 0; font-size: .84rem; color: var(--color-muted); }
.mc-piti-line strong { font-weight: 900; color: var(--color-text); font-size: .9rem; }
.mc-piti-total-line { border-top: 1px solid #b8ddb8; margin-top: .35rem; padding-top: .35rem; }
.mc-piti-total-line span { font-weight: 800; color: #1a6a1a; }
.mc-piti-total-line strong { color: #1a6a1a; font-size: 1.05rem; }

/* ── Mortgage: Extra payment savings grid ── */
.mc-savings-callout strong { display: block; margin-bottom: .45rem; }
.mc-savings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; }
.mc-savings-item { display: flex; flex-direction: column; gap: .1rem; }
.mc-savings-item span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: #15803d; opacity: .75; }
.mc-savings-item strong { font-size: 1rem; font-weight: 950; letter-spacing: -.02em; color: #15803d; }

/* ── Mortgage: Chart header ── */
.mc-chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; flex-wrap: wrap; gap: .25rem; }
.mc-chart-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); }
.mc-chart-legend { display: flex; gap: .75rem; font-size: .75rem; font-weight: 700; color: var(--color-muted); align-items: center; }
.mc-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .25rem; vertical-align: middle; }

/* ── Mortgage: Monthly amort scrollable wrapper ── */
.mc-amort-monthly-wrap { max-height: 380px; overflow-y: auto; border-radius: 0 0 var(--radius-md) var(--radius-md); }

/* Refinance Breakeven Calculator */
.rb-term-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.rb-term-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.rb-term-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.rb-term-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.rb-recommend { border-radius: var(--radius-md); padding: .75rem 1rem; font-size: .87rem; line-height: 1.55; margin-top: .75rem; }
.rb-recommend strong { display: block; margin-bottom: .25rem; font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.rb-recommend-yes { background: #f0fdf4; border: 1px solid #a7f3c0; color: #15803d; }
.rb-recommend-yes strong { color: #15803d; }
.rb-recommend-no { background: #fffaf0; border: 1px solid rgba(154,91,0,.25); color: var(--color-muted); }
.rb-recommend-no strong { color: var(--color-warning); }

/* How Much House Can I Afford */
.hm-term-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.hm-term-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.hm-term-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.hm-term-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.hm-advanced-toggle { background: none; border: none; color: var(--color-primary); font-size: .84rem; font-weight: 800; cursor: pointer; padding: .55rem 0 .3rem; display: flex; align-items: center; gap: .35rem; }
.hm-advanced-toggle:hover { color: var(--color-primary-dark); }
.hm-check-row { display: flex; align-items: center; gap: .55rem; font-size: .88rem; cursor: pointer; font-weight: 600; }
.hm-check-row input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-primary); cursor: pointer; flex-shrink: 0; }
.hm-factor-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .65rem; border-radius: 20px; background: rgba(124,77,255,.08); color: var(--color-primary-dark); border: 1px solid rgba(124,77,255,.2); margin-top: .6rem; }
.hm-stress-section { background: #fffaf0; border: 1px solid rgba(154,91,0,.25); border-radius: var(--radius-md); padding: .75rem 1rem; margin-top: .75rem; }
.hm-stress-heading { font-size: .8rem; font-weight: 900; color: var(--color-warning); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .6rem; }
.hm-stress-grid { display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; align-items: baseline; }
.hm-stress-label { font-size: .76rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.hm-stress-val { font-weight: 900; font-size: .95rem; color: var(--color-text); }
.hm-stress-delta { font-weight: 900; font-size: .95rem; color: #dc2626; }

/* Retirement Savings Calculator */
.rs-success-wrap { margin: .75rem 0 0; }
.rs-success-header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.rs-bar-track { height: 8px; background: var(--color-subtle); border-radius: 4px; overflow: hidden; margin: .2rem 0 .25rem; }
.rs-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; background: var(--color-primary); }
.rs-bar-fill.rs-bar-good { background: #22c55e; }
.rs-bar-fill.rs-bar-warn { background: #f59e0b; }
.rs-bar-fill.rs-bar-bad { background: #ef4444; }
.rs-outcome-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin: .85rem 0 .35rem; padding: .75rem .5rem; background: var(--color-bg); border-radius: var(--radius-sm); }
.rs-outcome-item { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-align: center; }
.rs-outcome-label { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); }
.rs-outcome-val { font-weight: 900; font-size: .95rem; color: var(--color-text); }
.rs-outcome-sub { font-size: .68rem; color: var(--color-muted); font-weight: 600; }
.rs-outcome-worst .rs-outcome-val { color: #dc2626; }
.rs-outcome-best .rs-outcome-val { color: #16a34a; }
.rs-recommend { border-radius: var(--radius-md); padding: .75rem 1rem; font-size: .87rem; line-height: 1.55; margin-top: .75rem; }
.rs-recommend strong { display: block; margin-bottom: .25rem; font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.rs-recommend-yes { background: #f0fdf4; border: 1px solid #a7f3c0; color: #15803d; }
.rs-recommend-yes strong { color: #15803d; }
.rs-recommend-warn { background: #fffbeb; border: 1px solid rgba(180,120,0,.25); color: var(--color-muted); }
.rs-recommend-warn strong { color: #a16207; }
.rs-recommend-no { background: #fff1f2; border: 1px solid rgba(200,0,30,.2); color: var(--color-muted); }
.rs-recommend-no strong { color: #b91c1c; }

/* Credit Card Payoff Calculator */
.ccp-compare-card { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-soft); margin-top: .75rem; }
.ccp-compare-heading { margin: .15rem 0 .9rem; font-size: 1rem; letter-spacing: -.02em; }

/* Percentage Change Calculator */
.pcc-mode-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.pcc-mode-tab { flex-shrink: 0; padding: .3rem .85rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.pcc-mode-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pcc-mode-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.pcc-direction-badge { display: inline-block; padding: .18rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 800; letter-spacing: .01em; margin-top: .35rem; background: var(--color-subtle); color: var(--color-muted); }
.pcc-badge-increase { background: #dcfce7; color: #15803d; }
.pcc-badge-decrease { background: #fee2e2; color: #b91c1c; }
.pcc-badge-nochange { background: #f1f5f9; color: #64748b; }

/* Solar Savings Calculator */
.ss-details-card { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-soft); margin-top: .75rem; }
.ss-detail-row { display: flex; justify-content: space-between; align-items: baseline; padding: .3rem 0; border-bottom: 1px solid var(--color-subtle); }
.ss-detail-row:last-of-type { border-bottom: none; }
.ss-detail-label { font-size: .85rem; color: var(--color-muted); font-weight: 600; }
.ss-detail-val { font-size: .88rem; font-weight: 700; color: var(--color-text); text-align: right; }
.ss-net-metering-badge { display: inline-block; padding: .2rem .65rem; border-radius: 20px; font-size: .78rem; font-weight: 800; letter-spacing: .01em; background: var(--color-subtle); color: var(--color-muted); }
.ss-nm-full { background: #dcfce7; color: #15803d; }
.ss-nm-partial { background: #fef9c3; color: #854d0e; }
.ss-nm-none { background: #fee2e2; color: #b91c1c; }
.ss-incentive-callout { margin-top: .6rem; padding: .55rem .75rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-md); font-size: .83rem; color: var(--color-text); line-height: 1.5; }
.ss-roof-warn { margin-top: .6rem; padding: .55rem .75rem; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-md); font-size: .83rem; color: #9a3412; line-height: 1.5; }
.ss-model-note { font-size: .74rem; color: var(--color-muted); font-weight: 600; margin: .4rem 0 0; min-height: 1em; }
/* Advanced assumptions panel */
.ss-advanced-details { margin-top: 1.25rem; }
.ss-advanced-toggle { display: flex; align-items: center; gap: .4rem; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--color-primary); list-style: none; padding: .45rem 0; border-top: 1px solid var(--color-subtle); }
.ss-advanced-toggle::-webkit-details-marker { display: none; }
.ss-advanced-toggle::marker { display: none; }
.ss-advanced-toggle-chevron { margin-left: auto; font-size: .85rem; font-weight: 900; transition: transform .15s; display: inline-block; }
details[open] .ss-advanced-toggle-chevron { transform: rotate(90deg); }
.ss-advanced-hint { font-size: .74rem; color: var(--color-muted); font-weight: 500; }
.ss-assumptions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .65rem 0 .5rem; }
.ss-reset-assumptions { font-size: .78rem; padding: .35rem .85rem; min-height: unset; border-radius: 8px; }
/* Sensitivity table */
.ss-sensitivity-wrap { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-soft); margin-top: .75rem; }
.ss-sensitivity-note { font-size: .8rem; color: var(--color-muted); margin: .1rem 0 .85rem; }
.ss-sens-table { width: 100%; border-collapse: collapse; font-size: .79rem; }
.ss-sens-table th { padding: .3rem .35rem; font-size: .7rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; text-align: center; border-bottom: 1px solid var(--color-subtle); }
.ss-sens-table th:first-child { text-align: left; }
.ss-sens-table td { padding: .42rem .35rem; text-align: center; font-weight: 700; border-bottom: 1px solid rgba(0,0,0,.04); }
.ss-sens-table td:first-child { text-align: left; font-weight: 500; color: var(--color-muted); font-size: .76rem; white-space: nowrap; }
.ss-sens-current-cell { background: color-mix(in srgb, var(--color-primary) 10%, transparent); color: var(--color-primary-dark); border-radius: 5px; outline: 1.5px solid color-mix(in srgb, var(--color-primary) 30%, transparent); }
.ss-sens-good { color: #15803d; }
.ss-sens-bad { color: var(--color-warning); }
.ss-sens-worst { color: #b91c1c; }

/* Car Loan Calculator */
.cl-term-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.cl-term-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.cl-term-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cl-term-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.cl-dp-helper { font-size: .8rem; color: var(--color-muted); font-weight: 600; min-height: 1.1em; }
.cl-tco-toggle { background: none; border: none; color: var(--color-primary); font-size: .84rem; font-weight: 800; cursor: pointer; padding: .55rem 0 .3rem; display: flex; align-items: center; gap: .35rem; }
.cl-tco-toggle:hover { color: var(--color-primary-dark); }
.cl-tco-breakdown { margin-top: .5rem; }
.cl-tco-heading { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); margin: 0 0 .5rem; }
.cl-tco-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .25rem 0; border-bottom: 1px solid var(--color-subtle); font-size: .84rem; }
.cl-tco-row:last-of-type { border-bottom: none; }
.cl-tco-label { color: var(--color-muted); font-weight: 600; }
.cl-tco-val { font-weight: 800; color: var(--color-text); }
.cl-tco-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .55rem .85rem; background: #f0fdf0; border: 1px solid #b8ddb8; border-radius: var(--radius-sm); margin-top: .5rem; }
.cl-tco-total-row .cl-tco-label { font-weight: 900; font-size: .84rem; color: #1a6a1a; }
.cl-tco-total-val { font-size: 1.15rem; font-weight: 950; letter-spacing: -.03em; color: #1a6a1a; }
.cl-compare-card { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-soft); margin-top: .75rem; }
.cl-compare-heading { margin: .15rem 0 .9rem; font-size: 1rem; letter-spacing: -.02em; }

/* Compound Interest Calculator */
.ci-freq-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.ci-freq-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.ci-freq-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.ci-freq-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.ci-real-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.ci-real-val { color: var(--color-primary-dark); }
.ci-goal-reached { background: #f0fdf4; border: 1px solid #a7f3c0; border-radius: var(--radius-sm); padding: .6rem .9rem; font-size: .85rem; color: #15803d; display: flex; flex-direction: column; gap: .15rem; }
.ci-goal-reached strong { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.ci-goal-val { color: #a16207; }
.ci-table-wrap { margin-top: 1.5rem; }
.ci-table-toggle { background: none; border: none; cursor: pointer; font-size: .84rem; font-weight: 800; color: var(--color-muted); padding: .4rem 0; letter-spacing: .02em; display: inline-flex; align-items: center; gap: .35rem; }
.ci-table-toggle:hover { color: var(--color-primary); }
.ci-table-section { margin-top: .65rem; overflow-x: auto; border: 1px solid var(--color-subtle); border-radius: var(--radius-md); background: var(--color-surface-strong); box-shadow: var(--shadow-soft); }
.ci-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ci-table th, .ci-table td { padding: .45rem .75rem; text-align: right; border-bottom: 1px solid var(--color-subtle); white-space: nowrap; }
.ci-table thead th { font-size: .78rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; background: var(--color-surface-strong); position: sticky; top: 0; }
.ci-table td:first-child { text-align: left; font-weight: 700; }
.ci-table tr:last-child td { border-bottom: none; }
.ci-table tbody tr:hover { background: rgba(124,77,255,.04); }

/* Height Comparison Tool */
.hct-unit-row { display: flex; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.hct-unit-btn { padding: .25rem .75rem; border-radius: 14px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; }
.hct-unit-btn.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.hct-unit-btn:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.hct-person-list { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .75rem; }
.hct-person-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: #fafaf7; border: 1px solid var(--color-subtle); border-radius: 10px; padding: .6rem .75rem; }
.hct-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hct-person-fields { display: flex; flex-direction: row; align-items: center; gap: .4rem; flex: 1; min-width: 0; flex-wrap: wrap; }
.hct-name-row { display: flex; align-items: center; gap: .4rem; flex: 1; min-width: 8rem; }
.hct-name-row input { min-width: 0; flex: 1; }
.hct-preset-select { font-size: .78rem; padding: .3rem .4rem; border-radius: 6px; border: 1px solid var(--color-subtle); background: #fff; color: var(--color-text); max-width: 130px; cursor: pointer; }
.hct-height-fields { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.hct-height-fields input { width: 4.2rem; }
.hct-unit-tag { font-size: .78rem; color: var(--color-muted); font-weight: 700; white-space: nowrap; }
.hct-remove-btn { background: none; border: none; cursor: pointer; color: var(--color-muted); font-size: 1.15rem; padding: .2rem .3rem; line-height: 1; border-radius: 6px; flex-shrink: 0; align-self: center; }
.hct-remove-btn:hover:not(:disabled) { color: #e11d48; background: #fff0f3; }
.hct-remove-btn:disabled { opacity: 0.28; cursor: default; }
.hct-add-btn { width: 100%; padding: .45rem; border: 1.5px dashed var(--color-subtle); border-radius: 10px; background: none; cursor: pointer; color: var(--color-muted); font-size: .85rem; font-weight: 700; transition: all .15s; }
.hct-add-btn:hover:not(:disabled) { border-color: var(--color-primary); color: var(--color-primary); }
.hct-add-btn:disabled { opacity: 0.35; cursor: default; }
.hct-bio { display: grid; grid-template-columns: 96px 1fr; gap: .75rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--color-subtle); }
.hct-bio[hidden] { display: none; }
.hct-bio-img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #f0ede8; }
.hct-bio-text { display: grid; gap: .25rem; min-width: 0; }
.hct-bio-title { font-size: 1rem; font-weight: 900; color: var(--color-text); margin: 0; }
.hct-bio-desc { font-size: .82rem; color: var(--color-muted); margin: 0; }
.hct-bio-extract { font-size: .82rem; color: var(--color-text); line-height: 1.5; margin: .25rem 0 0; }
.hct-bio-link { font-size: .8rem; font-weight: 700; color: var(--color-primary); text-decoration: none; margin-top: .15rem; }
.hct-bio-link:hover { text-decoration: underline; }
.hct-chart-wrap { border-radius: 10px; overflow: hidden; background: #fafaf8; border: 1px solid var(--color-subtle); }
.hct-chart-placeholder { display: flex; align-items: center; justify-content: center; height: 180px; color: var(--color-muted); font-size: .88rem; }
.hct-stats { margin-top: .75rem; display: flex; flex-direction: column; gap: .3rem; }
.hct-stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .83rem; border-bottom: 1px solid var(--color-subtle); padding-bottom: .3rem; }
.hct-stat-row:last-child { border-bottom: none; }
.hct-stat-label { color: var(--color-muted); font-weight: 600; }
.hct-stat-val { font-weight: 800; text-align: right; }
.hct-actions { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.hct-confirm { font-size: .82rem; font-weight: 700; color: var(--color-primary); }

/* Case Converter */
.cconv-textarea { width: 100%; min-height: 160px; resize: vertical; font-size: .95rem; line-height: 1.6; }
.cconv-count-row { display: flex; gap: 1rem; margin: .5rem 0 .75rem; flex-wrap: wrap; }
.cconv-count-item { font-size: .82rem; color: var(--color-muted); font-weight: 700; }
.cconv-count-item strong { color: var(--color-text); font-size: .92rem; }
.cconv-copy-all-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.cconv-copy-all-confirm { font-size: .82rem; color: var(--color-primary); font-weight: 700; min-height: 1.2em; }
.cconv-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.cconv-result-card { background: #fafaf7; border: 1px solid var(--color-subtle); border-radius: 10px; padding: .55rem .7rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cconv-result-label { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); white-space: nowrap; }
.cconv-result-value { font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace; font-size: .78rem; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.1em; line-height: 1.4; }
.cconv-result-value.cconv-result-empty { color: var(--color-muted); }
.cconv-copy-btn { font-size: .7rem; font-weight: 800; color: var(--color-primary); background: none; border: none; cursor: pointer; padding: 0; text-align: left; line-height: 1.4; letter-spacing: .02em; width: fit-content; }
.cconv-copy-btn:hover:not(:disabled) { text-decoration: underline; }
.cconv-copy-btn:disabled { color: var(--color-muted); cursor: default; }

/* QR Code Generator */
.qrg-type-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .75rem 0 1rem; }
.qrg-type-tab { flex-shrink: 0; padding: .3rem .7rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.qrg-type-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.qrg-type-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.qrg-preset-pills { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 .15rem; }
.qrg-preset-pill { flex-shrink: 0; padding: .25rem .65rem; border-radius: 16px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .78rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.qrg-preset-pill.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.qrg-preset-pill:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.qrg-btn-group { display: flex; gap: .3rem; flex-wrap: wrap; margin: .35rem 0 .1rem; }
.qrg-btn-opt { flex-shrink: 0; padding: .22rem .6rem; border-radius: 14px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .78rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.qrg-btn-opt.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.qrg-btn-opt:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.qrg-color-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .75rem 0; }
.qrg-color-col { display: flex; flex-direction: column; gap: .3rem; }
.qrg-color-wrap { display: flex; align-items: center; gap: .5rem; }
.qrg-color-wrap input[type="color"] { width: 2.4rem; height: 2rem; padding: .1rem; border: 1px solid var(--color-subtle); border-radius: 8px; cursor: pointer; background: none; }
.qrg-color-hex { font-size: .82rem; font-weight: 700; color: var(--color-muted); font-family: monospace; }
.qrg-size-logo-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .75rem; }
.qrg-checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: .88rem; cursor: pointer; font-weight: 600; }
textarea.qrg-autogrow { field-sizing: content; min-height: 4.5rem; resize: none; overflow: hidden; }
.qrg-qr-preview { background: #f9f6f0; border-radius: 12px; padding: 1rem; text-align: center; min-height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; }
.qrg-qr-preview svg, .qrg-qr-preview img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 4px; }
.qrg-qr-placeholder { color: var(--color-muted); font-size: .88rem; text-align: center; padding: 1rem; }
.qrg-meta-text { font-size: .78rem; color: var(--color-muted); font-weight: 600; margin: 0 0 .75rem; min-height: 1.1em; }
.qrg-download-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.qrg-download-row .button { flex: 1; min-width: 0; text-align: center; }
.qrg-download-confirm { font-size: .82rem; font-weight: 700; color: var(--color-primary); min-height: 1.2em; margin-top: .35rem; }
.qrg-shape-row { display: flex; gap: .3rem; flex-wrap: wrap; margin: .5rem 0 .15rem; }
.qrg-shape-btn { flex-shrink: 0; padding: .25rem .6rem; border-radius: 16px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .78rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.qrg-shape-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.qrg-shape-btn:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.qrg-shape-controls { display: flex; flex-direction: column; gap: .45rem; margin-top: .6rem; padding: .7rem .85rem; background: #fafaf7; border: 1px solid var(--color-subtle); border-radius: 10px; }
.qrg-slider-row { display: grid; grid-template-columns: 5.8rem 1fr 3.2rem; gap: .3rem .45rem; align-items: center; }
.qrg-slider-row .form-label { margin: 0; font-size: .82rem; }
.qrg-slider-row input[type="range"] { width: 100%; accent-color: var(--color-primary); cursor: pointer; }
.qrg-slider-val { font-size: .78rem; font-weight: 800; color: var(--color-muted); text-align: right; font-family: monospace; }

/* Salary to Hourly Calculator */
.sh-section-label { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); margin: 1rem 0 .5rem; }
.sh-section-hint { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .75rem; color: var(--color-muted); opacity: .8; }
.sh-rate-sub { display: block; font-size: .76rem; color: var(--color-muted); font-weight: 700; margin-top: .25rem; }
.sh-hours-warn { margin-top: .65rem; padding: .45rem .75rem; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm); font-size: .83rem; color: #9a3412; }
.sh-annual-card { background: var(--color-surface-strong); border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-soft); }
.sh-annual-heading { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); margin: 0 0 .65rem; }
.sh-annual-row { display: flex; justify-content: space-between; align-items: baseline; padding: .28rem 0; border-bottom: 1px solid var(--color-subtle); font-size: .88rem; }
.sh-annual-row:last-of-type { border-bottom: none; }
.sh-annual-label { color: var(--color-muted); font-weight: 600; }
.sh-annual-value { font-weight: 800; color: var(--color-text); text-align: right; }
.sh-annual-comp { color: var(--color-primary-dark); }
.sh-annual-tax { color: #b91c1c; }
.sh-annual-takehome-row { margin-top: .2rem; padding-top: .45rem; border-top: 2px solid var(--color-subtle) !important; }
.sh-annual-takehome { color: #15803d; font-size: 1rem; font-weight: 950; }
.sh-annual-note { font-size: .74rem; color: var(--color-muted); margin: .5rem 0 0; font-weight: 600; }

/* Tip Calculator */
.tc-tip-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .35rem 0 1rem; }
.tc-tip-tab { flex-shrink: 0; padding: .28rem .75rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.tc-tip-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tc-tip-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.tc-mode-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.tc-mode-tab { flex-shrink: 0; padding: .3rem .85rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.tc-mode-tab.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.tc-mode-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.tc-person-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.tc-person-name { height: 50px; border: 1px solid var(--color-subtle); border-radius: 16px; background: #fffdf8; padding: .85rem .9rem; font-size: 1rem; color: var(--color-text); min-width: 0; }
.tc-person-name:focus { outline: 3px solid rgba(124,77,255,.22); border-color: rgba(124,77,255,.7); }
.tc-remove-person { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--color-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; line-height: 1; }
.tc-remove-person:hover { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
.tc-add-person-btn { background: none; border: 1px dashed var(--color-subtle); border-radius: 16px; padding: .45rem 1rem; font-size: .85rem; font-weight: 800; color: var(--color-primary); cursor: pointer; width: 100%; margin-top: .25rem; transition: all .15s; }
.tc-add-person-btn:hover { border-color: var(--color-primary); background: rgba(124,77,255,.04); }
.tc-fair-table-wrap { overflow-x: auto; }
.tc-fair-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tc-fair-table th, .tc-fair-table td { padding: .4rem .6rem; text-align: right; border-bottom: 1px solid var(--color-subtle); white-space: nowrap; }
.tc-fair-table thead th { font-size: .76rem; font-weight: 800; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.tc-fair-table td:first-child, .tc-fair-table th:first-child { text-align: left; }
.tc-fair-table tr:last-child td { border-bottom: none; }
.tc-fair-total-cell { font-weight: 900; color: var(--color-primary-dark); }

/* Password Strength Tester */
.pt-input-wrap { position: relative; }
.pt-input-wrap input { width: 100%; padding-right: 4.5rem; }
.pt-toggle-btn {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
  font-size: .82rem;
  font-weight: 800;
  padding: .25rem .3rem;
  line-height: 1;
}
.pt-checklist { margin-top: 1rem; display: grid; gap: .3rem; }
.pt-check-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 700;
  padding: .3rem .6rem;
  border-radius: 8px;
}
.pt-check-item.pass { color: #15803d; background: #f0fdf4; }
.pt-check-item.fail { color: #b91c1c; background: #fff1f2; }
.pt-test-section { padding: 2.5rem 0 0; margin-top: 1.5rem; }
.pt-result-card { display: flex; flex-direction: column; }
.pt-idle-icon { display: block; font-size: 3rem; line-height: 1; margin: 1rem 0 .75rem; text-align: center; }
.pt-idle-msg { text-align: center; color: var(--color-text-muted); font-size: .9rem; }
.pt-emoji-strip { display: flex; flex-wrap: wrap; gap: .18rem; margin-bottom: 1rem; padding: .65rem .75rem; background: var(--color-bg); border: 1px solid var(--color-subtle); border-radius: var(--radius-md); }
.pt-emoji-ch { font-size: 1.35rem; line-height: 1.2; }
.pt-strength-label { display: block; font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 950; letter-spacing: -.04em; margin-bottom: .2rem; }
.pt-tagline { font-style: italic; color: var(--color-text-muted); margin: 0 0 1rem; font-size: .9rem; line-height: 1.5; }
.pt-result-card .form-actions .button { width: 100%; }

/* ── Embed route (dev preview) ── */
.embed-route-wrap .skip-link,
.embed-route-wrap .site-header,
.embed-route-wrap .breadcrumbs-bar,
.embed-route-wrap .tool-page-hero,
.embed-route-wrap .tool-timeline,
.embed-route-wrap .embed-panel-wrap,
.embed-route-wrap #how-to-use,
.embed-route-wrap #faq,
.embed-route-wrap .site-footer,
.embed-route-wrap #timeline { display: none !important; }
.embed-route-wrap .tool-workspace { padding: 1.25rem 0; }
.embed-route-wrap body,
.embed-route-wrap { background: var(--color-bg); container-type: inline-size; container-name: embed; }
/* Container query — fires on the embed element's own width, beats any layout= override */
@container embed (max-width: 640px) {
  .tool-layout { grid-template-columns: 1fr !important; }
  .side-stack { position: static !important; }
  .field-grid, .field-grid-3 { grid-template-columns: 1fr !important; }
}

/* Static timeline shell inside tool workspace */
.tool-timeline {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .side-stack { position: static; }
  .related-links { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .field-grid, .field-grid-3, .result-breakdown, .related-links { grid-template-columns: 1fr; }
  .tool-hero { min-height: auto; }
  .cc-price-row, .cc-cost-grid, .stats-grid, .cconv-results-grid,
  .qrg-size-logo-row, .rs-outcome-row, .qrg-color-row { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .calculator-card, .result-card { padding: 1rem; }
  .qrg-type-tab { padding: .5rem .9rem; font-size: .85rem; }
  .qrg-preset-pill { padding: .45rem .8rem; font-size: .83rem; }
  .qrg-btn-opt { padding: .42rem .75rem; font-size: .83rem; }
  .qrg-shape-btn { padding: .42rem .7rem; font-size: .83rem; }
  .qrg-slider-row { grid-template-columns: 4.6rem 1fr 2.8rem; }
  .form-field input, .form-field select, .form-input { font-size: max(16px, 1rem); }
  .button { white-space: nowrap; }
}

/* ── Inline SVG charts ── */
.chart-wrap {
  margin-top: 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  background: #fafaf8;
  border: 1px solid var(--color-subtle);
  padding: .75rem .5rem .25rem;
}
.chart-wrap svg { display: block; width: 100%; }
.chart-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-muted);
  padding: 0 .5rem .5rem;
}

/* ── Result Action Buttons (Download / Share / Print) ── */
.result-actions-bar {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}
.result-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .6rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-text);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 850;
  color: #fff;
  line-height: 1;
  min-height: 44px;
  box-shadow: var(--shadow-card);
  transition: transform .12s, opacity .14s;
  white-space: nowrap;
}
.result-action-btn:hover { transform: translateY(-1px); opacity: .88; }
.result-action-btn:active { opacity: .75; }

/* ── Pet Age Calculator ── */
.pet-species-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  margin-bottom: .75rem;
}
.pet-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .5rem .2rem .4rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-primary) 5%, white);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-width: 0;
}
.pet-btn:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
  background: color-mix(in srgb, var(--color-primary) 9%, white);
}
.pet-btn.is-active {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, white);
}
.pet-btn-emoji {
  font-size: 2rem;
  line-height: 1;
  display: block;
}
.pet-btn-name {
  font-size: .68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1;
  text-align: center;
}
.pet-btn.is-active .pet-btn-name { color: var(--color-primary); }

/* Sub-type pill selectors */
.pet-subtype-wrap {
  margin-bottom: .75rem;
}
.pet-subtype-wrap label,
.pet-subtype-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: .35rem;
}
.pet-subtype-pills {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.pet-subtype-pill {
  padding: .3rem .75rem;
  border: 2px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: 999px;
  background: transparent;
  font-size: .78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.pet-subtype-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pet-subtype-pill.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

/* Life progress bar */
.pet-life-bar-wrap {
  margin-top: .5rem;
}
.pet-life-bar-label {
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-bottom: .25rem;
}
.pet-life-bar {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
  overflow: hidden;
}
.pet-life-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
  transition: width .4s ease, background .3s ease;
}
.pet-life-bar-fill.is-overlifespan {
  background: #c9a227;
}
.pet-life-bar-wrap:has(.is-overlifespan) .pet-life-bar-label {
  color: #c9a227;
}

/* Species comparison card */
.pet-comp-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.pet-comp-row {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  align-items: center;
  gap: .4rem;
  padding: .35rem .5rem;
  border-radius: 8px;
  background: transparent;
  transition: background .1s;
}
.pet-comp-row.is-yours {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  outline: 1.5px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.pet-comp-emoji { font-size: 1rem; line-height: 1; text-align: center; }
.pet-comp-info { min-width: 0; }
.pet-comp-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pet-comp-stage {
  font-size: .66rem;
  color: var(--color-text-muted);
  display: block;
}
.pet-comp-right { text-align: right; min-width: 56px; }
.pet-comp-human {
  font-size: .72rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  white-space: nowrap;
}
.pet-comp-bar {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--color-primary) 15%, transparent);
  overflow: hidden;
  margin-top: .2rem;
}
.pet-comp-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--color-primary);
}
.pet-comp-beyond .pet-comp-human {
  font-size: .66rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ── JSON Formatter ── */
.json-input-area {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  font-size: .82rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 180px;
}
.json-result-panel { padding: 0; overflow: hidden; }

/* Status bar */
.json-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .6rem 1rem;
  font-size: .82rem;
  font-weight: 700;
  border-bottom: 1px solid var(--color-subtle);
}
.json-status-idle  { color: var(--color-muted); background: transparent; }
.json-status-valid { color: #166534; background: #f0fdf4; }
.json-status-warn  { color: #92400e; background: #fffbeb; }
.json-status-error { color: #991b1b; background: #fef2f2; }
.json-stats-inline { font-weight: 600; opacity: .75; font-size: .78rem; white-space: nowrap; }

/* Diagnostics */
.json-diag-section { border-bottom: 1px solid var(--color-subtle); }
.json-diag-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-text);
}
.json-diag-toggle:hover { background: color-mix(in srgb, var(--color-subtle) 40%, transparent); }
.json-diag-arrow { font-size: .75rem; opacity: .6; }
.json-badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  margin-right: .3rem;
}
.json-badge-error { background: #fee2e2; color: #991b1b; }
.json-badge-warn  { background: #fef3c7; color: #92400e; }
.json-diag-list {
  list-style: none;
  margin: 0;
  padding: 0 0 .5rem;
  max-height: 220px;
  overflow-y: auto;
}
.json-diag-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .35rem 1rem;
  font-size: .78rem;
  border-left: 3px solid transparent;
}
.json-diag-error { border-left-color: #ef4444; background: #fff5f5; }
.json-diag-warning { border-left-color: #f59e0b; background: #fffdf0; }
.json-diag-icon { flex-shrink: 0; font-size: .78rem; font-weight: 900; margin-top: .05rem; }
.json-diag-error .json-diag-icon { color: #dc2626; }
.json-diag-warning .json-diag-icon { color: #d97706; }
.json-diag-body { display: flex; flex-direction: column; gap: .1rem; }
.json-diag-loc { font-weight: 800; color: var(--color-muted); font-size: .72rem; }
.json-diag-msg { color: var(--color-text); font-weight: 600; }
.json-diag-hint { color: var(--color-muted); font-style: italic; }

/* Tabs */
.json-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-subtle);
  padding: 0 1rem;
}
.json-tab {
  padding: .55rem .85rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: -1px;
}
.json-tab:hover { color: var(--color-text); }
.json-tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* Panel / Tree */
.json-panel { padding: .5rem 1rem 0; }
.json-tree-controls {
  display: flex;
  gap: .4rem;
  padding-bottom: .45rem;
}
.json-tree-btn {
  padding: .25rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  background: var(--color-bg);
  border: 1px solid var(--color-subtle);
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-text);
}
.json-tree-btn:hover { background: var(--color-subtle); }
.json-tree {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.6;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: auto;
}
.json-empty-msg {
  color: var(--color-muted);
  font-size: .82rem;
  font-style: italic;
  margin: .75rem 0;
}
.jt-node { margin: 0; }
.jt-node > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: pre;
  user-select: none;
  border-radius: 4px;
  padding: 0 2px;
}
.jt-node > summary::-webkit-details-marker { display: none; }
.jt-node > summary::before {
  content: "▶";
  font-size: .6em;
  margin-right: .35em;
  transition: transform .15s;
  display: inline-block;
  color: var(--color-muted);
}
.jt-node[open] > summary::before { transform: rotate(90deg); }
.jt-node > summary:hover { background: color-mix(in srgb, var(--color-primary) 6%, transparent); }
.jt-children { padding-left: 1.2rem; border-left: 1px dashed var(--color-subtle); margin-left: .5rem; }
.jt-leaf { white-space: pre; line-height: 1.7; }
.jt-key   { color: #0f172a; font-weight: 700; }
.jt-str   { color: #16a34a; }
.jt-num   { color: #2563eb; }
.jt-bool  { color: #7c3aed; font-weight: 700; }
.jt-null  { color: #94a3b8; font-style: italic; }
.jt-brace { color: #64748b; font-weight: 700; }
.jt-comma, .jt-colon { color: #94a3b8; }
.jt-preview { color: #94a3b8; font-style: italic; font-weight: 400; }
.jt-ellipsis { color: #94a3b8; }
.jt-open-only { display: none; }
details[open] > .jt-children .jt-open-only { display: inline; }
details[open] > summary .jt-closed-only { display: none; }
details[open] > summary .jt-preview { display: none; }

/* Formatted / Minified pre */
.json-output-pre {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.6;
  margin: 0;
  padding: .25rem 0 .5rem;
  white-space: pre;
  overflow-x: auto;
  max-height: 360px;
  overflow-y: auto;
  color: var(--color-text);
}
.json-output-pre-minified { white-space: pre-wrap; word-break: break-all; }

/* Copy row */
.json-copy-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1rem;
  border-top: 1px solid var(--color-subtle);
  margin-top: .25rem;
}
.json-copy-status {
  font-size: .78rem;
  font-weight: 700;
  color: #166534;
}

/* ── Colour Generator ── */
.cg-textarea {
  width: 100%;
  min-height: 3rem;
  resize: none;
  field-sizing: content;
  overflow: hidden;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  padding: .75rem 1rem;
  background: #fffdf8;
  color: var(--color-text);
  line-height: 1.5;
}
.cg-textarea:focus { outline: 3px solid rgba(124,77,255,.22); border-color: rgba(124,77,255,.7); }
.cg-color-input-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  border: 1px solid var(--color-subtle);
  border-radius: 16px;
  overflow: hidden;
  background: #fffdf8;
}
.cg-color-input-wrap:focus-within { outline: 3px solid rgba(124,77,255,.22); border-color: rgba(124,77,255,.7); }
.cg-color-picker {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 100%;
  min-height: 54px;
  border: none;
  border-right: 1px solid var(--color-subtle);
  background: #fffdf8;
  cursor: pointer;
  border-radius: 14px 0 0 14px;
  padding: 5px;
}
.cg-color-picker::-webkit-color-swatch-wrapper { padding: 4px; }
.cg-color-picker::-webkit-color-swatch { border: none; border-radius: 8px; }
.cg-color-picker::-moz-color-swatch { border: none; border-radius: 8px; }
#cg-base-picker { width: 60px !important; border: none !important; }
.cg-color-input-wrap input[type="text"] {
  min-height: 54px;
  border: none;
  border-radius: 0 16px 16px 0;
  padding: .75rem .9rem;
  background: transparent;
  color: var(--color-text);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .92rem;
  min-width: 0;
}
.cg-color-input-wrap input[type="text"]:focus { outline: none; }
.cg-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-top: .35rem;
}
.cg-radio-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: normal;
  cursor: pointer;
}
.cg-label-muted { color: var(--color-muted); font-weight: 600; }
.cg-advanced {
  border-top: 1px solid var(--color-subtle);
  border-bottom: 1px solid var(--color-subtle);
  padding: .75rem 0;
  margin: .75rem 0;
}
.cg-advanced summary {
  list-style: none;
  color: var(--color-primary);
  font-weight: 850;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
}
.cg-advanced summary::-webkit-details-marker { display: none; }
.cg-advanced-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1rem;
}
.cg-error { color: #b91c1c; }
.cg-result-card { position: sticky; top: 6rem; }
.cg-score-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.cg-score-number {
  font-size: 3.2rem;
  line-height: 0.9;
  letter-spacing: -.06em;
  font-weight: 950;
}
.cg-score-number small {
  font-size: 1.2rem;
  color: var(--color-muted);
  letter-spacing: -.02em;
}
.cg-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .25rem;
}
.cg-result-header h2 { margin-bottom: 0; }
.cg-score-label {
  color: var(--color-muted);
  font-weight: 700;
  font-size: .82rem;
  text-align: right;
  max-width: 140px;
}
.cg-fix-contrast-btn {
  min-height: 28px;
  padding: 0 .7rem;
  border-radius: 999px;
  border: 1.5px solid var(--color-subtle);
  background: transparent;
  color: var(--color-muted);
  font-weight: 750;
  font-size: .72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.cg-fix-contrast-btn:disabled { opacity: .35; cursor: default; }
.cg-fix-contrast-btn.needs-fix {
  border-color: #f59e0b;
  color: #b45309;
  background: rgba(245,158,11,.08);
  font-weight: 850;
}
.cg-fix-contrast-btn.needs-fix:hover {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}
.cg-palette-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-subtle);
  min-height: 100px;
  margin-bottom: 1rem;
}
.cg-palette-strip:has(.cg-strip-colour:nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
.cg-palette-strip:has(.cg-strip-colour:nth-child(6):last-child) { grid-template-columns: repeat(6, 1fr); }
.cg-strip-colour {
  position: relative;
  min-height: 100px;
  cursor: pointer;
}
.cg-strip-colour.is-locked {
  outline: 3px solid rgba(255,255,255,.7);
  outline-offset: -3px;
}
.cg-strip-colour.is-active-shade {
  outline: 3px solid rgba(255,255,255,.95);
  outline-offset: -3px;
}
.cg-colour-role {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .44rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: rgba(0,0,0,.35);
  mix-blend-mode: overlay;
  pointer-events: none;
  line-height: 1;
}
.cg-lock-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity .15s;
}
.cg-strip-colour:hover .cg-lock-btn,
.cg-strip-colour.is-locked .cg-lock-btn {
  opacity: 1;
}
.cg-hex-copy-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 4px 6px;
}
.cg-hex-copy-btn span {
  display: block;
  padding: 4px;
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  color: #fff;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .64rem;
  text-align: center;
  font-weight: 700;
}
.cg-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1rem;
}
.cg-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-subtle);
  border-radius: 12px;
  padding: .65rem .75rem;
  min-height: 64px;
}
.cg-stat b {
  display: block;
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
  margin-bottom: .35rem;
}
.cg-stat strong {
  font-size: 1rem;
  letter-spacing: -.02em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
/* Brand preview */
.cg-preview-box {
  border: 1px solid var(--color-subtle);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cg-preview-bg, var(--color-surface));
  color: var(--cg-preview-text, var(--color-text));
  margin-bottom: 1rem;
}
.cg-preview-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background: var(--cg-preview-surface, #fff);
  border-bottom: 1px solid rgba(0,0,0,.07);
  font-size: .72rem;
  font-weight: 700;
}
.cg-preview-logo {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 900;
  font-size: .78rem;
  flex-shrink: 0;
  color: var(--cg-preview-text, inherit);
}
.cg-preview-logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--cg-preview-primary, var(--color-primary));
  display: block;
  flex-shrink: 0;
}
.cg-preview-nav-links {
  flex: 1;
  text-align: center;
  font-size: .68rem;
  color: var(--cg-preview-text, currentColor);
  opacity: .55;
  letter-spacing: .01em;
}
.cg-preview-nav-cta {
  flex-shrink: 0;
  min-height: 24px;
  padding: 0 .55rem;
  border-radius: 999px;
  border: none;
  background: var(--cg-preview-primary, var(--color-primary));
  color: var(--cg-preview-on-primary, #fff);
  font-weight: 850;
  font-size: .64rem;
  cursor: default;
}
.cg-preview-hero {
  padding: .85rem .75rem .7rem;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.cg-preview-badge {
  display: inline-block;
  padding: .14rem .48rem;
  border-radius: 999px;
  background: var(--cg-preview-accent, var(--cg-preview-primary, var(--color-primary)));
  color: var(--cg-preview-on-primary, #fff);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}
.cg-preview-heading {
  font-size: .98rem;
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 950;
  margin: 0 0 .3rem;
  color: var(--cg-preview-text, var(--color-text));
}
.cg-preview-copy {
  font-size: .68rem;
  line-height: 1.4;
  color: var(--cg-preview-text, var(--color-text));
  opacity: .6;
  margin: 0 0 .6rem;
}
.cg-preview-actions {
  display: flex;
  gap: .4rem;
  align-items: center;
}
.cg-preview-btn {
  min-height: 28px;
  padding: 0 .65rem;
  border-radius: 999px;
  border: none;
  background: var(--cg-preview-primary, var(--color-primary));
  color: var(--cg-preview-on-primary, #fff);
  font-weight: 850;
  font-size: .7rem;
  cursor: default;
}
.cg-preview-ghost {
  min-height: 28px;
  padding: 0 .65rem;
  border-radius: 999px;
  border: 1.5px solid var(--cg-preview-text, currentColor);
  background: transparent;
  color: var(--cg-preview-text, inherit);
  font-weight: 700;
  font-size: .7rem;
  cursor: default;
  opacity: .65;
}
.cg-preview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding: .65rem .75rem .75rem;
}
.cg-preview-card {
  background: var(--cg-preview-surface, #fff);
  border-radius: 10px;
  padding: .6rem .6rem .55rem;
}
.cg-preview-card-icon {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--cg-preview-primary, var(--color-primary));
  margin-bottom: .38rem;
}
.cg-preview-card-icon.is-accent {
  background: var(--cg-preview-accent, var(--cg-preview-primary, var(--color-primary)));
}
.cg-preview-card-title {
  display: block;
  font-size: .7rem;
  font-weight: 850;
  color: var(--cg-preview-text, var(--color-text));
  margin-bottom: .18rem;
  letter-spacing: -.02em;
}
.cg-preview-card-text {
  font-size: .61rem;
  line-height: 1.3;
  color: var(--cg-preview-text, var(--color-text));
  opacity: .55;
  margin: 0;
}
/* Shade scale panel */
.cg-shade-panel {
  border: 1px solid var(--color-subtle);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.cg-shade-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-subtle);
}
#cg-shade-panel-title {
  font-size: .72rem;
  font-weight: 850;
  color: var(--color-text);
}
.cg-shade-close {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: var(--color-subtle);
  color: var(--color-muted);
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background .15s;
}
.cg-shade-close:hover { background: var(--color-primary); color: #fff; }
.cg-shade-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}
.cg-shade-swatch {
  position: relative;
  height: 58px;
  border: none;
  cursor: pointer;
  padding: 5px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: filter .12s;
}
.cg-shade-swatch:hover { filter: brightness(1.08); }
.cg-shade-step {
  font-size: .52rem;
  font-weight: 900;
  line-height: 1;
  opacity: .7;
}
.cg-shade-hex {
  font-size: .46rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
  line-height: 1;
  opacity: .65;
  text-transform: uppercase;
}
/* Export format tabs */
.cg-export-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: .6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-subtle);
  border-radius: 10px;
  padding: 3px;
}
.cg-export-tab {
  flex: 1;
  min-height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .12s, color .12s;
  padding: 0 .4rem;
}
.cg-export-tab:hover { background: var(--color-subtle); color: var(--color-text); }
.cg-export-tab.is-active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 850;
}
.cg-copy-confirm {
  font-size: .82rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: .5rem;
  min-height: 1.2em;
}
.cg-export-box {
  margin-top: .85rem;
  border-top: 1px solid var(--color-subtle);
  padding-top: .85rem;
}
.cg-export-textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .74rem;
  line-height: 1.55;
  border: 1px solid var(--color-subtle);
  border-radius: 12px;
  padding: .65rem .75rem;
  background: var(--color-surface);
  color: var(--color-text);
}
@media (max-width: 720px) {
  .cg-advanced-body { grid-template-columns: 1fr; }
  .cg-result-card { position: static; }
}

/* ── Retirement Budget Calculator ── */
.rbc-surplus { color: #16a34a; }
.rbc-deficit { color: #dc2626; }
.rbc-breakdown-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .4rem; }
.rbc-breakdown-item { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.rbc-breakdown-label { flex: 1; color: var(--color-muted); }
.rbc-breakdown-amount { font-weight: 700; min-width: 60px; text-align: right; }
.rbc-breakdown-pct { font-size: .72rem; color: var(--color-muted); min-width: 36px; text-align: right; }
.rbc-breakdown-bar { height: 4px; border-radius: 2px; background: var(--color-primary); opacity: .55; min-width: 4px; }

/* ── Base64 Encoder / Decoder ── */
.b64-mode-bar { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.b64-output-tabs { display: flex; gap: 2px; margin-bottom: .6rem; background: var(--color-surface); border: 1px solid var(--color-subtle); border-radius: 10px; padding: 3px; }
.b64-output-tab { flex: 1; min-height: 30px; border: none; border-radius: 8px; background: transparent; color: var(--color-muted); font-size: .78rem; font-weight: 750; cursor: pointer; transition: background .12s, color .12s; }
.b64-output-tab:hover { background: var(--color-subtle); color: var(--color-text); }
.b64-output-tab.is-active { background: var(--color-primary); color: #fff; font-weight: 850; }
.b64-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .82rem; color: var(--color-muted); margin: .5rem 0; }
.b64-stats strong { color: var(--color-text); font-weight: 700; }
.b64-mono { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.55; white-space: pre-wrap; word-break: break-all; background: var(--color-surface); border: 1px solid var(--color-subtle); border-radius: 12px; padding: .65rem .75rem; min-height: 6rem; max-height: 260px; overflow-y: auto; }
.b64-copy-confirm { font-size: .82rem; font-weight: 700; color: var(--color-primary); margin-top: .5rem; min-height: 1.2em; }

/* ── Fake Receipt Generator ── */
.frg-preset-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.frg-preset-btn { padding: .3rem .75rem; border: 1.5px solid var(--color-subtle); border-radius: 999px; background: transparent; font-size: .78rem; font-weight: 700; color: var(--color-muted); cursor: pointer; transition: all .12s; }
.frg-preset-btn:hover, .frg-preset-btn.is-active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(124,77,255,.07); }
.frg-style-bar { display: flex; gap: .35rem; margin-bottom: 1rem; }
.frg-style-btn { flex: 1; min-height: 34px; border: 1.5px solid var(--color-subtle); border-radius: 10px; background: transparent; color: var(--color-muted); font-size: .8rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.frg-style-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.frg-items-table { width: 100%; border-collapse: collapse; margin-bottom: .75rem; font-size: .85rem; }
.frg-items-table th { text-align: left; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); padding: .25rem .35rem; }
.frg-items-table td { padding: .3rem .35rem; }
.frg-items-table input { width: 100%; min-height: 34px; border: 1px solid var(--color-subtle); border-radius: 8px; padding: .3rem .5rem; background: #fffdf8; font-size: .85rem; }
.frg-items-table .frg-qty-input { width: 52px; }
.frg-items-table .frg-price-input { width: 72px; }
.frg-remove-btn { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; border-radius: 6px; }
.frg-remove-btn:hover { color: #dc2626; background: rgba(220,38,38,.08); }
.frg-receipt-wrap { background: #e0ddd8; border: none; border-radius: 12px; padding: 1.5rem 1rem; overflow-y: auto; max-height: 700px; position: relative; }
.frg-placeholder { color: var(--color-muted); font-size: .88rem; text-align: center; padding: 2rem 1rem; }
.frg-copy-confirm { font-size: .82rem; font-weight: 700; color: var(--color-primary); margin-top: .5rem; min-height: 1.2em; }
.frg-ethics-notice { margin-top: 1.25rem; padding: .65rem .85rem; border-radius: 10px; background: rgba(220,38,38,.07); border: 1px solid rgba(220,38,38,.18); font-size: .8rem; color: #7f1d1d; line-height: 1.55; }
/* Thermal style */
.frg-thermal { font-family: "Courier New", Courier, monospace; font-size: .78rem; line-height: 1.55; color: #111; max-width: 320px; margin: 0 auto; background: #fffef9; padding: 1.5rem 1.25rem; box-shadow: 0 4px 28px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1); }
.frg-thermal .frg-store-name { font-weight: 900; font-size: .92rem; text-align: center; margin-bottom: .15rem; }
.frg-thermal .frg-store-addr, .frg-thermal .frg-store-phone { text-align: center; font-size: .72rem; }
.frg-thermal .frg-divider { border: none; border-top: 1px dashed #999; margin: .4rem 0; }
.frg-thermal .frg-item-row { display: flex; justify-content: space-between; }
.frg-thermal .frg-totals-row { display: flex; justify-content: space-between; }
.frg-thermal .frg-total-final { font-weight: 900; font-size: .92rem; }
.frg-thermal .frg-watermark { text-align: center; color: #c00; font-weight: 900; font-size: .7rem; letter-spacing: .06em; margin-top: .5rem; }
.frg-thermal .frg-thank-you { text-align: center; font-size: .72rem; margin-top: .25rem; }
.frg-thermal .frg-logo { display: flex; justify-content: center; margin: 0 0 .5rem; }
.frg-thermal .frg-col-header { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #444; }
.frg-thermal .frg-divider.frg-thin { margin: .15rem 0; }
.frg-barcode { margin: .5rem 0 .25rem; }
/* Modern style */
.frg-modern { font-family: system-ui, -apple-system, sans-serif; font-size: .82rem; color: #1a1a1a; max-width: 340px; margin: 0 auto; background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.frg-modern .frg-store-name { font-size: 1rem; font-weight: 800; margin-bottom: .15rem; }
.frg-modern .frg-divider { border: none; border-top: 1px solid #e5e7eb; margin: .6rem 0; }
.frg-modern .frg-item-row { display: flex; justify-content: space-between; padding: .18rem 0; }
.frg-modern .frg-totals-row { display: flex; justify-content: space-between; padding: .18rem 0; }
.frg-modern .frg-total-final { font-weight: 800; font-size: .95rem; }
.frg-modern .frg-watermark { text-align: center; color: #c00; font-weight: 800; font-size: .68rem; letter-spacing: .06em; margin-top: .75rem; }
/* Minimal style */
.frg-minimal { font-family: system-ui, -apple-system, sans-serif; font-size: .8rem; color: #333; max-width: 300px; margin: 0 auto; line-height: 1.7; }
.frg-minimal .frg-store-name { font-size: .95rem; font-weight: 700; margin-bottom: 1rem; }
.frg-minimal .frg-divider { border: none; border-top: 1px solid #ccc; margin: .75rem 0; }
.frg-minimal .frg-item-row { display: flex; justify-content: space-between; }
.frg-minimal .frg-totals-row { display: flex; justify-content: space-between; }
.frg-minimal .frg-total-final { font-weight: 700; }
.frg-minimal .frg-watermark { text-align: center; color: #c00; font-size: .68rem; letter-spacing: .05em; margin-top: 1rem; }

/* ── SVG Optimizer ── */
.svgo-dropzone { border: 2px dashed var(--color-subtle); border-radius: 16px; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; color: var(--color-muted); font-size: .9rem; margin-bottom: .85rem; }
.svgo-dropzone.is-dragover { border-color: var(--color-primary); background: rgba(124,77,255,.05); color: var(--color-primary); }
.svgo-level-bar { display: flex; gap: .35rem; margin-bottom: 1rem; }
.svgo-level-btn { flex: 1; min-height: 36px; border: 1.5px solid var(--color-subtle); border-radius: 10px; background: transparent; color: var(--color-muted); font-size: .82rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.svgo-level-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.svgo-level-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.svgo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .85rem 0; }
.svgo-stat { background: var(--color-surface); border: 1px solid var(--color-subtle); border-radius: 12px; padding: .6rem .75rem; text-align: center; }
.svgo-stat b { display: block; font-size: 1.05rem; font-weight: 800; color: var(--color-text); }
.svgo-stat small { font-size: .72rem; color: var(--color-muted); }
.svgo-saved-pct { color: #16a34a !important; }
.svgo-output-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .75rem; }
.svgo-preview { border: 1px solid var(--color-subtle); border-radius: 12px; background: repeating-conic-gradient(#f0ede8 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; display: flex; align-items: center; justify-content: center; min-height: 200px; overflow: hidden; padding: .5rem; }
.svgo-preview svg { max-width: 100%; max-height: 260px; }
#svgo-input, #svgo-output { max-height: 400px; overflow-y: auto; resize: vertical; }
.svgo-passes { font-size: .74rem; color: var(--color-muted); margin-top: .35rem; line-height: 1.5; }
.svgo-placeholder { color: var(--color-muted); font-size: .9rem; line-height: 1.6; padding: 2rem 0; }
@media (max-width: 640px) { .svgo-stats { grid-template-columns: 1fr 1fr; } .svgo-output-grid { grid-template-columns: 1fr; } }

/* ── Image Compressor ── */
.ic-dropzone { border: 2px dashed var(--color-subtle); border-radius: 12px; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; color: var(--color-muted); font-size: .9rem; margin-bottom: 1rem; }
.ic-dropzone.is-dragover { border-color: var(--color-primary); background: rgba(124,77,255,.06); color: var(--color-primary); }
.ic-preset-bar { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ic-preset-btn { flex: 1; min-width: 72px; min-height: 34px; border: 1.5px solid var(--color-subtle); border-radius: 10px; background: transparent; color: var(--color-muted); font-size: .78rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.ic-preset-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ic-preset-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.ic-format-bar { display: flex; gap: .35rem; margin-bottom: 1rem; }
.ic-format-btn { flex: 1; min-height: 32px; border: 1.5px solid var(--color-subtle); border-radius: 8px; background: transparent; color: var(--color-muted); font-size: .78rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.ic-format-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.ic-format-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.ic-quality-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.ic-quality-row input[type=range] { flex: 1; accent-color: var(--color-primary); }
.ic-quality-val { min-width: 2.5em; text-align: right; font-weight: 700; font-size: .88rem; }
.ic-placeholder { color: var(--color-muted); text-align: center; padding: 3rem 1rem; font-size: .9rem; }
.ic-result-item { border: 1px solid var(--color-subtle); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.ic-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; gap: .5rem; }
.ic-result-filename { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.ic-result-badge { display: inline-flex; padding: .2rem .5rem; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.ic-result-badge.is-larger { background: #fee2e2; color: #dc2626; }
.ic-result-stats { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.ic-stat-left { display: flex; align-items: center; gap: .75rem; }
.ic-stat-left .ic-stat { align-items: flex-start; }
.ic-stat-right { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.ic-stat { display: flex; flex-direction: column; align-items: center; }
.ic-stat b { font-size: 1rem; font-weight: 800; }
.ic-stat small { font-size: .7rem; color: var(--color-muted); }
.ic-result-dims { font-size: .75rem; color: var(--color-muted); margin-bottom: .5rem; }
.ic-warn { padding: .35rem .65rem; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .78rem; margin-bottom: .5rem; }
.ic-warn-size { background: #fee2e2; color: #dc2626; }
.ic-processing { text-align: center; padding: 2rem; color: var(--color-muted); }
.ic-download-btn { display: flex !important; align-items: center; justify-content: center; width: 36px !important; height: 36px; padding: 0 !important; border-radius: 999px; flex-shrink: 0; }
@media (max-width: 620px) { .ic-dropzone { padding: 1.25rem .75rem; } .ic-result-item { padding: .75rem; } .ic-preset-bar { gap: .25rem; } .ic-format-bar { gap: .25rem; } }

/* ── Pomodoro Timer ── */
.pomo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.pomo-settings-panel { min-width: 0; overflow: hidden; }
.pomo-timer-card { background: #fff; border: 1px solid var(--color-subtle); border-radius: var(--radius-lg); padding: 2rem 1.75rem 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin-bottom: 2rem; min-width: 0; }
.pomo-ring-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.pomo-ring { display: block; }
.pomo-ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; pointer-events: none; }
.pomo-ring-track { stroke: var(--color-subtle); }
.pomo-ring-progress { transition: stroke-dashoffset .5s linear, stroke .3s; }
.pomo-countdown { font-size: clamp(2.6rem, 7vw, 3.8rem); font-weight: 950; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pomo-phase-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--color-primary); margin-top: .15rem; }
.pomo-phase-label[data-phase="short-break"] { color: #16a34a; }
.pomo-phase-label[data-phase="long-break"] { color: #0284c7; }
.pomo-controls { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; width: 100%; }
.pomo-start-btn { min-width: 110px; }
.pomo-preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin-top: .45rem; }
.pomo-preset-btn { font-size: .75rem !important; padding: .4rem .4rem !important; line-height: 1.2; }
.pomo-input-wrap { position: relative; }
.pomo-input-wrap input { width: 100%; padding-right: 2.75rem; }
.pomo-input-suffix { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font-size: 1rem; font-weight: 600; line-height: 1; color: var(--color-muted); pointer-events: none; }
.pomo-duration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem .75rem; margin-top: .75rem; }
.pomo-autostart-row { margin-top: .65rem; }
.pomo-toggle-label { display: flex; align-items: center; gap: .5rem; font-weight: 500 !important; cursor: pointer; }
.pomo-toggle-label input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-primary); flex-shrink: 0; }
.pomo-summary { width: 100%; }
.pomo-summary-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pomo-summary-actions { display: flex; gap: .35rem; }
.pomo-action-btn { font-size: .75rem !important; padding: .3rem .65rem !important; line-height: 1.2; }
.pomo-summary-stats { display: flex; gap: 1.5rem; margin-top: .55rem; }
.pomo-summary-stat { display: flex; flex-direction: column; gap: .1rem; }
.pomo-summary-stat .stat-value { font-size: 1.65rem; font-weight: 950; letter-spacing: -.04em; line-height: 1; }
.pomo-summary-stat .stat-label { font-size: .78rem; color: var(--color-muted); }
.pomo-note-row { width: 100%; }
.pomo-log { width: 100%; }
.pomo-log-empty { color: var(--color-muted); font-size: .88rem; text-align: center; padding: .65rem 0; margin: 0; }
.pomo-log-list { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .2rem; max-height: 210px; overflow-y: auto; }
.pomo-log-item { display: flex; gap: .45rem; align-items: center; font-size: .82rem; padding: .3rem .55rem; background: var(--color-bg); border-radius: var(--radius-sm); flex-wrap: nowrap; min-width: 0; }
.pomo-log-num { font-weight: 700; color: var(--color-primary); flex-shrink: 0; min-width: 1.8rem; }
.pomo-log-time { color: var(--color-muted); flex-shrink: 0; }
.pomo-log-dur { color: var(--color-muted); flex-shrink: 0; }
.pomo-log-note { color: var(--color-text); flex: 1; min-width: 0; overflow: hidden; }
.pomo-log-note-edit { cursor: text; border-radius: 3px; padding: 0 .2rem; outline: none; white-space: nowrap; overflow: hidden; max-width: 100%; }
.pomo-log-note-edit:focus { background: var(--color-bg); outline: 2px solid var(--color-primary); }
.pomo-log-note-edit:empty::before { content: attr(data-placeholder); color: var(--color-muted); pointer-events: none; }
@media (max-width: 900px) { .pomo-layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .pomo-timer-card { padding: 1.5rem 1rem 2rem; } .pomo-duration-grid { grid-template-columns: 1fr 1fr; } }

/* ── Fancy Text Generator ── */
.ftg-textarea { width: 100%; min-height: 130px; resize: vertical; font-size: .95rem; line-height: 1.6; }
.ftg-char-count { font-size: .82rem; color: var(--color-muted); margin: .4rem 0 .65rem; }
.ftg-char-count strong { color: var(--color-text); font-size: .9rem; }
.ftg-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .15rem; }
.ftg-tab-btn { font-size: .75rem; font-weight: 800; padding: .28rem .7rem; border-radius: 20px; border: 1.5px solid var(--color-subtle); background: transparent; cursor: pointer; color: var(--color-muted); letter-spacing: .02em; transition: background .15s, color .15s, border-color .15s; }
.ftg-tab-btn.active, .ftg-tab-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.ftg-results { display: flex; flex-direction: column; gap: .35rem; }
.ftg-result-row { display: grid; grid-template-columns: 7rem 1fr auto; align-items: center; gap: .45rem; background: #fafaf7; border: 1px solid var(--color-subtle); border-radius: 10px; padding: .5rem .7rem; min-width: 0; }
.ftg-result-meta { display: flex; align-items: center; gap: .3rem; min-width: 0; }
.ftg-style-label { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); white-space: nowrap; }
.ftg-style-warning { font-size: .8rem; color: var(--color-warning, #e08a00); cursor: help; }
.ftg-style-value { font-size: .92rem; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; line-height: 1.5; }
.ftg-style-value.ftg-style-empty { color: var(--color-muted); }
.ftg-copy-btn { font-size: .7rem; font-weight: 800; color: var(--color-primary); background: none; border: none; cursor: pointer; padding: 0; line-height: 1.4; letter-spacing: .02em; white-space: nowrap; flex-shrink: 0; }
.ftg-copy-btn:hover:not(:disabled) { text-decoration: underline; }
.ftg-copy-btn:disabled { color: var(--color-muted); cursor: default; }
@media (max-width: 600px) { .ftg-result-row { grid-template-columns: 6rem 1fr auto; gap: .3rem; } .ftg-style-label { font-size: .65rem; } }

/* ── Time Calculator ── */
.tc-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.tc-tab { flex-shrink: 0; padding: .3rem .85rem; border-radius: 20px; border: 1px solid var(--color-subtle); background: #fff; cursor: pointer; font-size: .82rem; font-weight: 800; color: var(--color-muted); transition: all .15s; line-height: 1.5; }
.tc-tab.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tc-tab:hover:not(.active) { border-color: rgba(124,77,255,.4); color: var(--color-text); }
.tc-time-fields { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.tc-time-input { width: 4rem !important; text-align: center; padding-left: .5rem !important; padding-right: .5rem !important; }
.tc-time-sep { font-size: 1.2rem; font-weight: 900; color: var(--color-muted); line-height: 1; }
.tc-time-hint { font-size: .72rem; color: var(--color-muted); font-weight: 500; white-space: nowrap; margin-left: .2rem; }
.tc-delta-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.tc-delta-unit { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.tc-delta-unit .form-input { text-align: center; padding-left: .35rem !important; padding-right: .35rem !important; }
.tc-delta-label { font-size: .72rem; color: var(--color-muted); font-weight: 700; }
.tc-result-primary-wrap { display: flex; flex-direction: column; align-items: center; gap: .2rem; margin-bottom: .4rem; }
.tc-result-primary { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 950; letter-spacing: -.04em; line-height: 1; color: var(--color-primary); font-variant-numeric: tabular-nums; }
.tc-result-12h { font-size: .95rem; font-weight: 700; color: var(--color-muted); letter-spacing: -.01em; }
.tc-result-note { font-size: .82rem; font-weight: 800; color: var(--color-primary); text-align: center; margin: .1rem 0 .5rem; padding: .2rem .6rem; background: rgba(124,77,255,.08); border-radius: 20px; display: inline-block; align-self: center; }
.tc-stats { margin-top: .65rem; }
.tc-result-total { font-size: .78rem; color: var(--color-muted); text-align: center; margin-top: .55rem; line-height: 1.5; }
@media (max-width: 480px) { .tc-delta-fields { grid-template-columns: repeat(2, 1fr); } .tc-time-input { width: 3.5rem !important; } }

/* ── Random Number Generator ── */
.rng-presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.rng-preset-btn { font-size: .75rem; font-weight: 800; padding: .3rem .65rem; border-radius: 20px; border: 1.5px solid var(--color-subtle); background: transparent; cursor: pointer; color: var(--color-muted); letter-spacing: .02em; transition: background .15s, color .15s, border-color .15s; }
.rng-preset-btn:hover, .rng-preset-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.rng-seed-row { display: flex; flex-direction: column; gap: .4rem; margin-top: .15rem; }
.rng-numbers-wrap { display: flex; flex-wrap: wrap; gap: .4rem; min-height: 2.5rem; align-items: flex-start; margin-bottom: .5rem; }
.rng-number { display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary); color: #fff; font-weight: 800; font-size: 1.05rem; border-radius: 8px; padding: .3rem .7rem; letter-spacing: -.01em; line-height: 1.3; }
.rng-no-result { color: var(--color-muted); font-size: 1.5rem; font-weight: 700; line-height: 1; margin: auto 0; }
.rng-stats { margin-top: .5rem; }
.rng-seed-note { font-size: .78rem; color: var(--color-muted); margin: .4rem 0 0; font-style: italic; }
.rng-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.rng-actions .button { font-size: .8rem; padding: .38rem .85rem; }

/* ── Image Converter ── */
.iconv-dropzone { border: 2px dashed var(--color-subtle); border-radius: 12px; padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; color: var(--color-muted); font-size: .9rem; margin-bottom: 1rem; }
.iconv-dropzone.is-dragover { border-color: var(--color-primary); background: rgba(124,77,255,.06); color: var(--color-primary); }
.iconv-format-bar { display: flex; gap: .35rem; margin-bottom: 1rem; }
.iconv-format-btn { flex: 1; min-height: 34px; border: 1.5px solid var(--color-subtle); border-radius: 8px; background: transparent; color: var(--color-muted); font-size: .82rem; font-weight: 700; cursor: pointer; transition: all .12s; }
.iconv-format-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.iconv-format-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.iconv-quality-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.iconv-quality-row input[type=range] { flex: 1; accent-color: var(--color-primary); }
.iconv-quality-val { min-width: 2.5em; text-align: right; font-weight: 700; font-size: .88rem; }
.iconv-bg-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.iconv-bg-swatch { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--color-subtle); overflow: hidden; flex-shrink: 0; }
.iconv-bg-swatch input[type=color] { width: 40px; height: 40px; border: none; margin: -6px; cursor: pointer; }
.iconv-placeholder { color: var(--color-muted); text-align: center; padding: 3rem 1rem; font-size: .9rem; }
.iconv-processing { text-align: center; padding: 2rem; color: var(--color-muted); }
.iconv-result-item { border: 1px solid var(--color-subtle); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.iconv-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; gap: .5rem; }
.iconv-result-filename { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.iconv-result-badge { display: inline-flex; padding: .2rem .5rem; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.iconv-result-badge.is-larger { background: #fee2e2; color: #dc2626; }
.iconv-result-stats { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.iconv-stat-left { display: flex; align-items: center; gap: .75rem; }
.iconv-stat { display: flex; flex-direction: column; align-items: center; }
.iconv-stat b { font-size: 1rem; font-weight: 800; }
.iconv-stat small { font-size: .7rem; color: var(--color-muted); }
.iconv-result-dims { font-size: .75rem; color: var(--color-muted); margin-bottom: .5rem; }
.iconv-warn { padding: .35rem .65rem; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .78rem; margin-bottom: .5rem; }
.iconv-warn-size { background: #fee2e2; color: #dc2626; }
.iconv-download-btn { display: flex !important; align-items: center; justify-content: center; width: 36px !important; height: 36px; padding: 0 !important; border-radius: 999px; flex-shrink: 0; }
@media (max-width: 620px) { .iconv-dropzone { padding: 1.25rem .75rem; } .iconv-result-item { padding: .75rem; } .iconv-format-bar { gap: .25rem; } }

/* ── Calorie Calculator ── */
.cal-goal-display { text-align: center; padding: 1.25rem 0 .75rem; }
.cal-goal-number { font-size: clamp(2.5rem, 8vw, 3.8rem); font-weight: 950; letter-spacing: -.04em; color: var(--color-primary); line-height: 1; }
.cal-goal-unit { font-size: .85rem; color: var(--color-muted); margin-top: .25rem; font-weight: 600; }
.cal-goal-weekly { font-size: .85rem; font-weight: 700; color: var(--color-text); margin-top: .5rem; min-height: 1.2em; }
.cal-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .75rem 0; }
.cal-stat { background: var(--color-surface); border: 1px solid var(--color-subtle); border-radius: 10px; padding: .6rem .75rem; }
.cal-stat-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); display: block; margin-bottom: .25rem; }
.cal-stat-value { font-size: 1.05rem; font-weight: 800; color: var(--color-text); }
.cal-macro-table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .85rem; }
.cal-macro-table th { text-align: left; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); padding: .25rem .5rem .35rem; }
.cal-macro-table td { padding: .4rem .5rem; border-top: 1px solid var(--color-subtle); }
.cal-macro-table td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-warning { margin-top: .75rem; padding: .55rem .75rem; border-radius: 8px; background: #fef3c7; border: 1px solid #fbbf24; color: #92400e; font-size: .8rem; line-height: 1.5; }
.cal-placeholder { color: var(--color-muted); font-size: .9rem; text-align: center; padding: 1.5rem 0 .5rem; }

/* ── Paycheck Calculator ── */
.pc-result-summary { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1.5rem; }
.pc-net-amount { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.pc-freq-label { font-size: 0.875rem; color: var(--color-text-2); }
.pc-secondary-amounts { display: flex; gap: 1.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.pc-secondary-amounts span { font-size: 0.875rem; color: var(--color-text-2); }
.pc-secondary-amounts strong { color: var(--color-text-1); }
.pc-breakdown { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-bottom: 1rem; }
.pc-breakdown th { text-align: left; padding: 0.25rem 0.5rem; font-size: 0.75rem; color: var(--color-text-2); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--color-border); }
.pc-breakdown td { padding: 0.35rem 0.5rem; border-bottom: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent); }
.pc-breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pc-breakdown tr.pc-total-row td { font-weight: 700; border-top: 2px solid var(--color-border); border-bottom: none; }
.pc-breakdown tr.pc-indent td:first-child { padding-left: 1.25rem; color: var(--color-text-2); }
.pc-stats-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.pc-stat { background: color-mix(in srgb, var(--color-primary) 8%, transparent); border-radius: var(--radius-md); padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.pc-stat .pc-stat-label { color: var(--color-text-2); display: block; }
.pc-stat .pc-stat-val { font-weight: 700; color: var(--color-text-1); }
.pc-section-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-2); margin: 1.25rem 0 0.5rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.pc-section-label-first { margin-top: 0; border-top: none; padding-top: 0; }

/* ── Grade Calculator ── */
.gc-mode-btns { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.gc-mode-btn { padding: 0.4rem 1rem; border-radius: var(--radius-md); border: 1.5px solid var(--color-border); background: transparent; cursor: pointer; font-size: 0.875rem; transition: background 0.15s, border-color 0.15s; }
.gc-mode-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.gc-points-table, .gc-cat-assignments { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-bottom: 0.75rem; }
.gc-points-table th, .gc-cat-assignments th { text-align: left; padding: 0.25rem 0.5rem; font-size: 0.75rem; color: var(--color-text-2); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--color-border); }
.gc-points-table td, .gc-cat-assignments td { padding: 0.25rem 0.35rem; }
.gc-points-table input[type="number"], .gc-cat-assignments input[type="number"] { width: 100%; min-width: 3.5rem; padding: 0.3rem 0.4rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); font-size: 0.875rem; }
.gc-remove-row { background: none; border: none; cursor: pointer; color: var(--color-text-2); font-size: 1rem; padding: 0.15rem 0.3rem; border-radius: var(--radius-sm); }
.gc-remove-row:hover { color: #e53e3e; background: #fff0f0; }
.gc-add-row-btn, .gc-add-assignment-btn { font-size: 0.8rem; padding: 0.3rem 0.75rem; border-radius: var(--radius-sm); border: 1px dashed var(--color-border); background: transparent; cursor: pointer; color: var(--color-text-2); margin-top: 0.25rem; }
.gc-add-row-btn:hover, .gc-add-assignment-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.gc-category-block { background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg)); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.gc-cat-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; font-size: 0.875rem; }
.gc-cat-name { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.25rem 0.5rem; font-size: 0.875rem; width: 7rem; background: var(--color-bg); }
.gc-cat-weight { border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 0.25rem 0.4rem; font-size: 0.875rem; width: 3.5rem; background: var(--color-bg); }
.gc-remove-cat { background: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.75rem; padding: 0.2rem 0.5rem; color: var(--color-text-2); margin-left: auto; }
.gc-remove-cat:hover { color: #e53e3e; border-color: #e53e3e; }
.gc-add-category-btn { width: 100%; padding: 0.5rem; border: 2px dashed var(--color-border); border-radius: var(--radius-md); background: transparent; cursor: pointer; color: var(--color-text-2); font-size: 0.875rem; margin-top: 0.5rem; }
.gc-add-category-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.gc-result-grade { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; }
.gc-result-percent { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: var(--color-primary); line-height: 1; }
.gc-result-letter { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; color: var(--color-text-1); }
.gc-result-detail { font-size: 0.875rem; color: var(--color-text-2); margin-bottom: 1rem; }
.gc-needed-section { background: color-mix(in srgb, var(--color-primary) 6%, transparent); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.gc-needed-score { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); }
.gc-needed-label { font-size: 0.8rem; color: var(--color-text-2); margin-top: 0.2rem; }
.gc-alert-impossible { color: #c53030; font-size: 0.8rem; margin-top: 0.4rem; font-weight: 600; }
.gc-alert-achieved { color: #276749; font-size: 0.8rem; margin-top: 0.4rem; font-weight: 600; }
.gc-cat-breakdown { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 1rem; }
.gc-cat-breakdown th { text-align: left; padding: 0.25rem 0.4rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-2); border-bottom: 1px solid var(--color-border); }
.gc-cat-breakdown td { padding: 0.3rem 0.4rem; border-bottom: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent); }
.gc-cat-breakdown td:last-child { text-align: right; }
.gc-options-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; margin-top: 0.75rem; }

/* ── Investment Calculator ── */
.inv-hero-numbers { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1.25rem; }
.inv-end-balance { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.inv-real-balance { font-size: 0.9rem; color: var(--color-text-2); }
.inv-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.inv-stat { background: color-mix(in srgb, var(--color-primary) 7%, transparent); border-radius: var(--radius-md); padding: 0.5rem 0.75rem; font-size: 0.8rem; }
.inv-stat .inv-stat-label { color: var(--color-text-2); display: block; font-size: 0.72rem; }
.inv-stat .inv-stat-val { font-weight: 700; color: var(--color-text-1); }
.inv-scenario-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: 0.8rem; }
.inv-scenario-badge { padding: 0.35rem 0.65rem; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.inv-scenario-badge.best { border-color: #276749; color: #276749; }
.inv-scenario-badge.worst { border-color: #c53030; color: #c53030; }
.inv-goal-section { background: color-mix(in srgb, var(--color-primary) 6%, transparent); border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.inv-goal-surplus { color: #276749; font-weight: 700; }
.inv-goal-gap { color: #c53030; font-weight: 700; }
.inv-year-table-wrap { max-height: 320px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-top: 0.75rem; }
.inv-year-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.inv-year-table th { position: sticky; top: 0; background: var(--color-bg); padding: 0.3rem 0.5rem; text-align: right; font-size: 0.7rem; color: var(--color-text-2); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--color-border); }
.inv-year-table th:first-child { text-align: left; }
.inv-year-table td { padding: 0.28rem 0.5rem; text-align: right; border-bottom: 1px solid color-mix(in srgb, var(--color-border) 40%, transparent); font-variant-numeric: tabular-nums; }
.inv-year-table td:first-child { text-align: left; font-weight: 600; }
.inv-year-table tr:last-child td { border-bottom: none; font-weight: 700; }
.gc-final-needed-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }

/* ── Print Report ── */

.print-report-section {
  background: var(--color-surface-strong);
  border-top: 1px solid var(--color-subtle);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.rpt-topbar {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.rpt-topbar-eyebrow {
  margin: 0 0 .15rem;
  color: var(--color-primary-dark);
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .72rem;
}

.rpt-topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--color-text);
}

.rpt-print-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid #5534c9;
  background: #5534c9;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.rpt-print-btn:hover { background: #4426b5; border-color: #4426b5; }

/* ── A4 page wrapper ── */
.rpt-page {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 2px 40px rgba(44,31,20,.1), 0 1px 4px rgba(44,31,20,.06);
  border-radius: 10px;
  overflow: hidden;
}

/* ── Document header ── */
.rpt-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 36px 48px 28px;
  border-bottom: 2.5px solid #1a1a1a;
}

.rpt-brand-group { display: flex; align-items: center; gap: .8rem; }

.rpt-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: .8rem;
  background: linear-gradient(135deg, #7c4dff, #f97352);
  color: #fff;
  font-size: .66rem;
  font-weight: 900;
  font-family: ui-monospace, monospace;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.rpt-brand-name { font-size: .76rem; font-weight: 850; letter-spacing: -.02em; color: #5534c9; margin: 0; }
.rpt-brand-sub  { font-size: .65rem; color: #aaa; margin: .1rem 0 0; }

.rpt-doc-info   { text-align: right; }
.rpt-doc-title  { font-size: 1.3rem; font-weight: 900; letter-spacing: -.04em; margin: 0 0 .22rem; color: #1a1a1a; }
.rpt-doc-meta   { font-size: .71rem; color: #999; margin: 0; line-height: 1.7; }

/* ── Document body ── */
.rpt-doc-body { padding: 34px 48px 42px; }

/* ── KPI grid ── */
.rpt-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid #e8e3dc;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 34px;
}

.rpt-kpi {
  padding: 20px 18px;
  background: #fff;
  border-right: 1px solid #e8e3dc;
}

.rpt-kpi:last-child { border-right: none; }

.rpt-kpi-value {
  display: block;
  font-size: 1.62rem;
  font-weight: 900;
  letter-spacing: -.05em;
  color: #1a1a1a;
  line-height: 1;
}

.rpt-kpi-label {
  display: block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #999;
  margin-top: .42rem;
}

.rpt-kpi-sub {
  display: block;
  font-size: .66rem;
  color: #c0bbb4;
  margin-top: .14rem;
}

/* ── Section headings ── */
.rpt-sec-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 14px;
}

.rpt-sec-label {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5534c9;
  background: #f8f4ff;
  padding: .18rem .52rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.rpt-sec-rule { flex: 1; border: none; border-top: 1px solid #e8e3dc; margin: 0; }

/* ── Two column ── */
.rpt-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 34px;
  align-items: start;
}

/* ── Chart boxes ── */
.rpt-chart-box {
  background: #faf9f7;
  border: 1px solid #e8e3dc;
  border-radius: 8px;
  padding: 16px 14px 10px;
}

.rpt-chart-cap {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #bbb;
  margin: 0 0 8px;
}

.rpt-chart-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 8px;
  flex-wrap: wrap;
}

.rpt-legend-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .65rem;
  color: #888;
}

.rpt-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Tables ── */
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
  margin-bottom: 34px;
}

.rpt-table th {
  background: #f5f2ec;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #888;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #e8e3dc;
}

.rpt-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0ede8;
  color: #333;
  font-variant-numeric: tabular-nums;
}

.rpt-table tr:last-child td { border-bottom: none; }
.rpt-table .rpt-hl { font-weight: 800; background: #f5f0ff; color: #5534c9; }

/* ── Insight box ── */
.rpt-insight {
  background: #f8f4ff;
  border-left: 4px solid #5534c9;
  border-radius: 0 8px 8px 0;
  padding: 20px 26px;
  margin-bottom: 34px;
}

.rpt-insight-eyebrow {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5534c9;
  margin: 0 0 .5rem;
}

.rpt-insight-text {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.62;
  color: #2d1b6e;
  margin: 0;
}

/* ── Disclaimer ── */
.rpt-disclaimer {
  font-size: .66rem;
  color: #c0bbb4;
  line-height: 1.58;
  padding-top: 18px;
  border-top: 1px solid #e8e3dc;
  margin: 0;
}

/* ── Print ── */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .site-header,
  .breadcrumbs-bar,
  .tool-page-hero,
  .tool-workspace,
  #how-to-use,
  #faq,
  .site-footer { display: none !important; }

  .print-report-section {
    padding: 0 !important;
    border-top: none !important;
    background: none !important;
  }

  .rpt-topbar { display: none !important; }

  .rpt-page {
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .rpt-doc-header { padding: 14mm 16mm 10mm !important; }
  .rpt-doc-body   { padding: 8mm 16mm 14mm !important; }
  .rpt-kpi-value  { font-size: 1.25rem !important; }

  @page { size: A4; margin: 0; }
}

/* ── Print: tools without a full report (body.no-report class) ── */
@media print {
  body.no-report .site-header,
  body.no-report .breadcrumbs-bar,
  body.no-report .tool-page-hero,
  body.no-report .tool-mode-bar,
  body.no-report .calculator-card,
  body.no-report .print-report-section,
  body.no-report .result-actions-bar,
  body.no-report #timeline,
  body.no-report #how-to-use,
  body.no-report #faq,
  body.no-report .site-footer { display: none !important; }

  body.no-report .tool-workspace {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  body.no-report .result-card {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16mm 18mm !important;
  }

  body.no-report .section {
    padding: 0 !important;
  }
}

@media (max-width: 700px) {
  .rpt-kpis { grid-template-columns: repeat(2, 1fr); }
  .rpt-kpi { border-bottom: 1px solid #e8e3dc; }
  .rpt-kpi:nth-child(odd)  { border-right: 1px solid #e8e3dc; }
  .rpt-kpi:nth-child(even) { border-right: none; }
  .rpt-two-col { grid-template-columns: 1fr; }
  .rpt-doc-header { padding: 22px 22px 18px; flex-wrap: wrap; gap: 1rem; }
  .rpt-doc-info   { text-align: left; }
  .rpt-doc-body   { padding: 20px 22px 28px; }
}
