:root {
  --paper: #edf3f0;
  --paper-rgb: 237, 243, 240;
  --surface: #edf3f0;
  --surface-soft: rgba(237, 243, 240, .72);
  --ink: #1c2926;
  --muted: #6f7d78;
  --faint: #8d9894;
  --accent: #d66c48;
  --line: rgba(40, 65, 58, .12);
  --line-light: rgba(255, 255, 255, .66);
  --hi: rgba(255, 255, 255, .92);
  --lo: rgba(128, 149, 141, .34);
  --focus: rgba(214, 108, 72, .23);
  --modal: #edf3f0;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #202926;
  --paper-rgb: 32, 41, 38;
  --surface: #202926;
  --surface-soft: rgba(32, 41, 38, .78);
  --ink: #e8efec;
  --muted: #9aa8a2;
  --faint: #78857f;
  --accent: #ee906d;
  --line: rgba(225, 238, 232, .1);
  --line-light: rgba(255, 255, 255, .055);
  --hi: rgba(63, 77, 72, .64);
  --lo: rgba(5, 10, 8, .5);
  --focus: rgba(238, 144, 109, .24);
  --modal: #222c29;
  color-scheme: dark;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.42), transparent 30rem),
    radial-gradient(circle at 92% 20%, rgba(161,190,178,.18), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body { background: radial-gradient(circle at 12% 0%, rgba(82,102,94,.28), transparent 31rem), radial-gradient(circle at 95% 17%, rgba(74,111,96,.15), transparent 27rem), var(--paper); }
button, input, textarea, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .48; }
img { max-width: 100%; }

.site-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 42px; }
.topbar { height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: inherit; text-decoration: none; font-size: 18px; font-weight: 760; letter-spacing: -.04em; }
.brand-mark { width: 35px; height: 35px; padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line-light); border-radius: 11px; box-shadow: 5px 5px 11px var(--lo), -5px -5px 11px var(--hi); }
.brand-mark i { border-radius: 2px; background: var(--ink); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { opacity: .35; }
.nav-links { display: flex; align-items: center; gap: 5px; padding: 5px; border: 1px solid var(--line-light); border-radius: 14px; box-shadow: inset 3px 3px 7px rgba(120,145,136,.22), inset -3px -3px 7px var(--hi); }
.nav-links a { padding: 9px 16px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 680; text-decoration: none; }
.nav-links a.active { color: var(--ink); background: rgba(var(--paper-rgb), .5); box-shadow: 2px 2px 5px var(--lo), -2px -2px 5px var(--hi); }
.header-actions { justify-self: end; display: flex; gap: 10px; }
.icon-button { width: 41px; height: 41px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 13px; color: var(--ink); background: var(--surface); cursor: pointer; box-shadow: 5px 5px 11px var(--lo), -5px -5px 11px var(--hi); transition: transform .18s ease, box-shadow .18s ease; }
.icon-button:hover { transform: translateY(-2px); }
.icon-button:active { transform: none; box-shadow: inset 4px 4px 8px var(--lo), inset -4px -4px 8px var(--hi); }
.mobile-menu { display: none; }

.hero-section { max-width: 860px; margin: 92px auto 102px; text-align: center; scroll-margin-top: 20px; }
.eyebrow { width: fit-content; margin: 0 auto 24px; padding: 8px 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-light); border-radius: 999px; color: var(--muted); box-shadow: inset 2px 2px 5px rgba(129,153,144,.2), inset -2px -2px 6px var(--hi); font-size: 10px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #5e997e; box-shadow: 0 0 0 4px rgba(94,153,126,.13); }
h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(52px, 7vw, 84px); font-weight: 500; line-height: .98; letter-spacing: -.064em; }
h1 em, .principle-intro em { color: var(--accent); font-weight: 400; }
.hero-copy { max-width: 595px; margin: 26px auto 33px; color: var(--muted); font-size: 16px; line-height: 1.72; }
.search-box { max-width: 660px; height: 70px; padding: 0 18px 0 23px; margin: 0 auto; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line-light); border-radius: 22px; color: var(--muted); background: var(--surface); box-shadow: inset 6px 6px 13px var(--lo), inset -6px -6px 13px var(--hi), 0 18px 38px rgba(52,75,68,.055); transition: box-shadow .2s ease; }
.search-box:focus-within { box-shadow: inset 4px 4px 10px var(--lo), inset -4px -4px 10px var(--hi), 0 0 0 4px var(--focus); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.search-box input::placeholder { color: var(--faint); }
.search-glyph { font-size: 24px; line-height: 1; transform: rotate(-15deg); }
.search-clear { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
kbd { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: rgba(var(--paper-rgb), .35); box-shadow: 3px 3px 6px var(--lo), -3px -3px 6px var(--hi); font-size: 12px; }
.hero-meta { margin-top: 22px; display: flex; justify-content: center; gap: 30px; color: var(--faint); font-size: 11px; }
.hero-meta b { color: var(--muted); }

.tool-section { scroll-margin-top: 30px; }
.section-heading { margin: 0 4px 24px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-kicker { color: var(--accent); font-size: 10px; font-weight: 820; letter-spacing: .16em; }
h2 { margin: 5px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 32px; font-weight: 500; letter-spacing: -.035em; }
.result-count { color: var(--faint); font-size: 11px; font-weight: 700; }
.category-row { margin-bottom: 28px; display: flex; gap: 10px; overflow-x: auto; padding: 3px 4px 12px; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category-row button { flex: 0 0 auto; padding: 10px 17px; border: 1px solid var(--line-light); border-radius: 12px; color: var(--muted); background: var(--surface); box-shadow: 4px 4px 9px var(--lo), -4px -4px 9px var(--hi); font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .18s ease; }
.category-row button:hover { transform: translateY(-1px); }
.category-row button.selected { color: var(--ink); box-shadow: inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card { min-height: 220px; padding: 23px; position: relative; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line-light); border-radius: 25px; color: inherit; text-align: left; background: var(--surface-soft); box-shadow: 10px 10px 24px var(--lo), -10px -10px 24px var(--hi); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 14px 14px 30px var(--lo), -12px -12px 28px var(--hi); }
.tool-card:active { transform: translateY(0); box-shadow: inset 5px 5px 11px var(--lo), inset -5px -5px 11px var(--hi); }
.tool-icon { flex: 0 0 auto; width: 51px; height: 51px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.26); border-radius: 16px; box-shadow: inset 2px 2px 5px rgba(106,125,118,.12), 4px 4px 9px rgba(90,113,104,.2), -4px -4px 10px var(--hi); font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.tool-icon.coral { color: #b95b3f; background: #f0dcd4; }
.tool-icon.blue { color: #456f8c; background: #d9e7ed; }
.tool-icon.violet { color: #755b8d; background: #e7e0ed; }
.tool-icon.green, .tool-icon.mint { color: #4f806c; background: #dceae3; }
.tool-icon.amber { color: #9a7338; background: #eee5ce; }
.tool-icon.rose { color: #9d5a66; background: #eedde1; }
[data-theme="dark"] .tool-icon { filter: saturate(.72) brightness(.74); color: #f2f4f3; }
.tool-card-copy { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.tool-card-copy strong { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.tool-card-copy small { max-width: 205px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.card-arrow { position: absolute; top: 25px; right: 24px; color: var(--faint); }
.empty-glyph { font-size: 31px; transform: rotate(-15deg); }
.popular-label { position: absolute; top: 31px; left: 88px; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.empty-state { min-height: 310px; display: grid; place-items: center; align-content: center; border-radius: 26px; color: var(--muted); box-shadow: inset 6px 6px 14px var(--lo), inset -6px -6px 14px var(--hi); text-align: center; }
.empty-state h3 { margin: 14px 0 4px; color: var(--ink); font-family: Georgia, serif; font-size: 22px; }
.empty-state p { margin: 0 0 19px; font-size: 12px; }

.principles { margin-top: 128px; padding: 62px 5px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 95px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle-intro h2 { font-size: clamp(34px, 4vw, 49px); line-height: 1.08; }
.principle-list { display: grid; }
.principle-list > div { padding: 22px 0; display: grid; grid-template-columns: 45px 170px 1fr; gap: 14px; align-items: start; border-bottom: 1px solid var(--line); }
.principle-list > div:last-child { border-bottom: 0; }
.principle-list span { color: var(--accent); font-size: 9px; font-weight: 800; }
.principle-list strong { font-family: Georgia, serif; font-size: 16px; }
.principle-list p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.privacy-note { margin-top: 66px; padding: 24px 27px; display: flex; align-items: center; gap: 17px; border: 1px solid var(--line-light); border-radius: 22px; box-shadow: inset 3px 3px 8px rgba(118,143,134,.2), inset -3px -3px 8px var(--hi); }
.privacy-icon { flex: 0 0 39px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #4d8069; box-shadow: 4px 4px 9px var(--lo), -4px -4px 9px var(--hi); }
.privacy-note strong { font-size: 13px; }
.privacy-note p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.privacy-label { margin-left: auto; color: var(--faint); font-size: 9px; font-weight: 820; letter-spacing: .14em; }
footer { margin-top: 70px; padding-top: 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; }
footer > span { justify-self: end; }
footer p { margin: 0; }
.footer-brand { font-size: 14px; }
.footer-brand .brand-mark { width: 29px; height: 29px; border-radius: 9px; padding: 7px; }

/* Modal and shared tool controls */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; padding: 28px; display: grid; place-items: center; background: rgba(16, 27, 23, .52); backdrop-filter: blur(16px); animation: fade-in .2s ease both; }
.tool-modal { width: min(920px, 100%); max-height: min(780px, calc(100vh - 56px)); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line-light); border-radius: 30px; background: var(--modal); box-shadow: 28px 28px 70px rgba(6,15,12,.35), -10px -10px 30px rgba(255,255,255,.12); animation: modal-in .25s ease both; }
.modal-header { padding: 24px 26px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-header .tool-icon { width: 47px; height: 47px; border-radius: 14px; }
.modal-header > div:nth-child(2) { flex: 1; }
.modal-header > div:nth-child(2) > span { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.modal-header h2 { margin-top: 2px; font-size: 25px; }
.modal-close { margin-left: auto; }
.modal-body { flex: 1; overflow-y: auto; padding: 30px; }
.modal-privacy { padding: 13px 25px; display: flex; justify-content: center; align-items: center; gap: 7px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; letter-spacing: .03em; }
.workspace-grid, .calculator-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 27px; align-items: stretch; }
.single-workspace { max-width: 700px; margin: 0 auto; display: grid; gap: 20px; }
.control-panel { display: flex; flex-direction: column; gap: 19px; }
.dropzone { min-height: 225px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; border: 1px dashed rgba(83,112,102,.3); border-radius: 22px; color: var(--muted); text-align: center; cursor: pointer; box-shadow: inset 5px 5px 12px var(--lo), inset -5px -5px 12px var(--hi); transition: border-color .2s ease, transform .2s ease; }
.dropzone:hover { border-color: var(--accent); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone strong { max-width: 90%; color: var(--ink); font-family: Georgia, serif; font-size: 18px; }
.dropzone small { max-width: 88%; overflow: hidden; color: var(--faint); font-size: 10px; line-height: 1.5; text-overflow: ellipsis; }
.drop-icon { width: 46px; height: 46px; margin-bottom: 5px; display: grid; place-items: center; border-radius: 15px; color: var(--accent); box-shadow: 4px 4px 9px var(--lo), -4px -4px 9px var(--hi); }
.dropzone.has-file { border-style: solid; }
.image-preview { height: 86px; padding: 10px; margin-top: 14px; display: flex; align-items: center; gap: 13px; border-radius: 16px; box-shadow: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi); }
.image-preview img { width: 66px; height: 66px; border-radius: 11px; object-fit: cover; }
.image-preview span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.field { display: flex; flex-direction: column; gap: 9px; color: var(--ink); font-size: 11px; font-weight: 720; }
.field > span { display: flex; justify-content: space-between; gap: 10px; }
.field > span small { color: var(--faint); font-size: 9px; font-weight: 650; }
.field input[type="number"], .field input[type="date"], .field textarea, .select-wrap, .conversion-box { width: 100%; min-height: 48px; border: 1px solid var(--line-light); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: inset 4px 4px 9px var(--lo), inset -4px -4px 9px var(--hi); }
.field input[type="number"], .field input[type="date"] { padding: 0 14px; outline: 0; }
.field textarea { padding: 13px 14px; outline: 0; resize: vertical; line-height: 1.5; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select { width: 100%; height: 46px; padding: 0 38px 0 14px; appearance: none; border: 0; outline: 0; color: var(--ink); background: transparent; cursor: pointer; }
.select-wrap svg { position: absolute; right: 14px; color: var(--faint); pointer-events: none; }
input[type="range"] { width: 100%; height: 5px; appearance: none; border-radius: 99px; outline: none; background: rgba(119,143,134,.24); box-shadow: inset 2px 2px 4px var(--lo); accent-color: var(--accent); }
input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; border: 4px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 2px 2px 6px var(--lo), -2px -2px 6px var(--hi); cursor: pointer; }
.two-fields, .three-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.three-fields { grid-template-columns: repeat(3, 1fr); }
.inline-note { padding: 12px 13px; display: flex; align-items: flex-start; gap: 9px; border-radius: 12px; color: var(--muted); background: rgba(var(--paper-rgb), .4); box-shadow: inset 2px 2px 5px var(--lo), inset -2px -2px 5px var(--hi); font-size: 9.5px; line-height: 1.45; }
.inline-note svg { flex: 0 0 auto; color: var(--accent); }
.primary-button { min-height: 50px; padding: 0 19px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; color: #fff; background: #293b35; box-shadow: 5px 5px 12px var(--lo), -4px -4px 10px var(--hi); font-size: 11px; font-weight: 750; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.primary-button .button-icon { font-size: 15px; }
[data-theme="dark"] .primary-button { color: #1e2925; background: #e3ebe7; }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); }
.primary-button:active:not(:disabled) { transform: none; box-shadow: inset 4px 4px 8px rgba(0,0,0,.24); }
.secondary-button { min-height: 39px; padding: 0 15px; border: 1px solid var(--line-light); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 3px 3px 7px var(--lo), -3px -3px 7px var(--hi); font-size: 10px; font-weight: 720; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 680; cursor: pointer; }
.check-row input { position: absolute; opacity: 0; }
.check-row > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: transparent; box-shadow: inset 2px 2px 4px var(--lo), inset -2px -2px 4px var(--hi); }
.check-row input:checked + span { color: #fff; background: var(--accent); box-shadow: 2px 2px 5px var(--lo), -2px -2px 5px var(--hi); }
.file-list { max-height: 150px; padding: 7px; display: grid; gap: 4px; overflow-y: auto; border-radius: 14px; box-shadow: inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi); }
.file-list span { padding: 8px 10px; display: flex; align-items: center; gap: 9px; border-radius: 9px; color: var(--muted); font-size: 9.5px; }
.file-list b { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: rgba(214,108,72,.1); font-size: 8px; }
.error-text { margin: 0; color: #bd544b; font-size: 10px; line-height: 1.5; }
.spin { animation: spin 1s linear infinite; }

/* Individual tools */
.qr-preview { min-height: 310px; padding: 25px; display: grid; place-items: center; align-content: center; gap: 12px; border-radius: 22px; color: var(--faint); box-shadow: inset 5px 5px 12px var(--lo), inset -5px -5px 12px var(--hi); }
.qr-preview img { width: min(245px, 86%); height: auto; border-radius: 13px; box-shadow: 6px 6px 14px var(--lo), -6px -6px 14px var(--hi); }
.qr-preview small { font-size: 9px; }
.color-input { width: 100%; height: 48px; padding: 7px; border: 1px solid var(--line-light); border-radius: 14px; background: var(--surface); box-shadow: inset 4px 4px 9px var(--lo), inset -4px -4px 9px var(--hi); cursor: pointer; }
.calculator-layout { align-items: stretch; }
.result-card { min-height: 280px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid var(--line-light); border-radius: 23px; text-align: center; box-shadow: inset 5px 5px 12px var(--lo), inset -5px -5px 12px var(--hi); }
.result-card.empty { color: var(--faint); }
.result-card.empty strong { margin-top: 13px; color: var(--muted); font-family: Georgia, serif; font-size: 16px; }
.result-card.empty p { margin: 6px 0 0; font-size: 9px; }
.result-eyebrow { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.age-result { margin: 24px 0; display: flex; gap: 28px; }
.age-result b { display: flex; flex-direction: column; font-family: Georgia, serif; font-size: 42px; font-weight: 500; letter-spacing: -.05em; }
.age-result small { margin-top: 4px; color: var(--faint); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.result-details { width: 100%; padding-top: 15px; display: flex; justify-content: center; gap: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.result-details.vertical { flex-direction: column; gap: 6px; }
.result-details b { color: var(--ink); }
.segmented { padding: 5px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; border-radius: 15px; box-shadow: inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi); }
.segmented.compact { grid-template-columns: repeat(2, 1fr); }
.segmented button { min-height: 38px; padding: 0 8px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 720; cursor: pointer; }
.segmented button.selected { color: var(--ink); background: var(--surface); box-shadow: 3px 3px 7px var(--lo), -3px -3px 7px var(--hi); }
.conversion-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; }
.conversion-box { padding: 19px; display: flex; flex-direction: column; gap: 12px; }
.conversion-box input, .conversion-box strong { min-height: 42px; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.conversion-box select { border: 0; outline: 0; color: var(--muted); background: transparent; font-size: 10px; }
.conversion-box.output { box-shadow: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi); }
.swap-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 13px; color: var(--accent); background: var(--surface); box-shadow: 4px 4px 8px var(--lo), -4px -4px 8px var(--hi); cursor: pointer; }
.formula-note { margin: 0; color: var(--faint); text-align: center; font-size: 10px; }
.formula-note b { color: var(--ink); }
.large-textarea { min-height: 210px !important; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.result-stat { min-height: 78px; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 15px; box-shadow: 4px 4px 9px var(--lo), -4px -4px 9px var(--hi); }
.result-stat strong { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.result-stat span { color: var(--faint); font-size: 8px; }
.password-output { min-height: 76px; padding: 14px 15px 14px 19px; display: flex; align-items: center; gap: 15px; border-radius: 18px; box-shadow: inset 5px 5px 11px var(--lo), inset -5px -5px 11px var(--hi); }
.password-output code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 16px; line-height: 1.5; }
.password-output button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 13px; color: var(--ink); background: var(--surface); box-shadow: 3px 3px 7px var(--lo), -3px -3px 7px var(--hi); cursor: pointer; }
.strength-row { display: flex; justify-content: space-between; color: var(--faint); font-size: 8.5px; }
.strength-row span { display: flex; align-items: center; gap: 6px; }
.strength-dot { width: 7px; height: 7px; border-radius: 50%; background: #b99556; }
.strength-dot.strong, .strength-dot.excellent { background: #5f9c7f; }
.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.big-result { margin: 17px 0 3px; font-family: Georgia, serif; font-size: 66px; line-height: 1; letter-spacing: -.06em; }
.result-label { color: var(--muted); font-size: 11px; }
.bmi-scale { width: 100%; height: 7px; margin-top: 28px; position: relative; display: grid; grid-template-columns: 1fr 1.55fr 1.1fr 1.45fr; gap: 3px; }
.bmi-scale span { border-radius: 99px; background: #7ca1b0; }
.bmi-scale span:nth-of-type(2) { background: #72a88e; }
.bmi-scale span:nth-of-type(3) { background: #c2a264; }
.bmi-scale span:nth-of-type(4) { background: #bc6c62; }
.bmi-scale i { width: 13px; height: 13px; position: absolute; top: -3px; z-index: 2; border: 3px solid var(--surface); border-radius: 50%; background: var(--ink); transform: translateX(-50%); box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.scale-labels { width: 100%; margin-top: 7px; display: grid; grid-template-columns: 1fr 1.55fr 1.1fr 1.45fr; color: var(--faint); font-size: 7px; }
.wide-controls { grid-template-columns: 1.2fr .8fr; }
.json-workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.code-area { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace !important; font-size: 10.5px !important; }
.output-area { color: #4f806c !important; }
.button-row { margin-top: 10px; display: flex; gap: 9px; }
.copy-output { margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 70; padding: 12px 17px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-light); border-radius: 13px; color: var(--ink); background: var(--modal); box-shadow: 8px 8px 22px rgba(8,18,14,.25); font-size: 10px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .principles { grid-template-columns: 1fr; gap: 30px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .site-shell { width: min(100% - 30px, 620px); padding-top: 16px; }
  .topbar { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .mobile-menu { display: grid; }
  .hero-section { margin: 70px auto 82px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .principle-list > div { grid-template-columns: 38px 145px 1fr; }
  footer { grid-template-columns: 1fr 1fr; }
  footer p { display: none; }
  .modal-backdrop { padding: 15px; align-items: end; }
  .tool-modal { max-height: calc(100vh - 30px); border-radius: 25px; }
  .workspace-grid, .calculator-layout, .json-workspace { grid-template-columns: 1fr; }
  .wide-controls { grid-template-columns: 1fr; }
  .dropzone { min-height: 180px; }
}
@media (max-width: 520px) {
  .site-shell { width: min(100% - 24px, 470px); }
  .header-actions .mobile-menu { display: none; }
  .hero-section { margin: 58px auto 70px; }
  .eyebrow { font-size: 8.5px; }
  h1 { font-size: clamp(45px, 14vw, 62px); }
  .hero-copy { max-width: 420px; font-size: 13.5px; }
  .search-box { height: 62px; padding-left: 18px; border-radius: 19px; }
  .hero-meta { gap: 12px; flex-wrap: wrap; }
  .hero-meta span:last-child { flex-basis: 100%; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 27px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 176px; }
  .principles { margin-top: 90px; padding: 48px 4px; }
  .principle-list > div { grid-template-columns: 30px 1fr; gap: 10px; }
  .principle-list p { grid-column: 2; }
  .privacy-note { padding: 19px; }
  .privacy-label { display: none; }
  .modal-backdrop { padding: 0; }
  .tool-modal { width: 100%; max-height: 94vh; border-radius: 25px 25px 0 0; border-bottom: 0; }
  .modal-header { padding: 18px; }
  .modal-body { padding: 22px 18px 26px; }
  .modal-header h2 { font-size: 21px; }
  .conversion-row { grid-template-columns: 1fr; }
  .swap-button { margin: -4px auto; transform: rotate(90deg); }
  .age-result { gap: 18px; }
  .age-result b { font-size: 36px; }
  .three-fields { grid-template-columns: repeat(2, 1fr); }
  .three-fields .field:last-child { grid-column: 1 / -1; }
  .segmented { overflow-x: auto; grid-template-columns: repeat(4, minmax(78px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
