:root,
[data-palette="forest"] {
  --ink: #1c1915;
  --muted: #6b645c;
  --paper: #f4efe6;
  --panel: #fffdf8;
  --line: #ddd4c6;
  --accent: #2f5d50;
  --accent-ink: #f7f3ea;
  --menu: #1f3f37;
  --field: #ffffff;
  --wash: #f7f1e6;
  --glow: #fff8ea;
  --shadow: 0 18px 40px rgba(48, 38, 24, 0.08);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

[data-palette="coastal"] {
  --ink: #1c1915;
  --muted: #5d6a6c;
  --paper: #f3eee4;
  --panel: #fffcf7;
  --line: #d9d0c3;
  --accent: #1f4e5a;
  --accent-ink: #f7f3ea;
  --menu: #163943;
  --field: #ffffff;
  --wash: #ebe4d6;
  --glow: #f7f3ea;
  --shadow: 0 18px 40px rgba(31, 78, 90, 0.1);
}

[data-palette="clay"] {
  --ink: #2a211c;
  --muted: #7a6356;
  --paper: #f6efe6;
  --panel: #fffcfa;
  --line: #e4d4c6;
  --accent: #9a4a32;
  --accent-ink: #fbf6ee;
  --menu: #7a3826;
  --field: #ffffff;
  --wash: #f3e6d8;
  --glow: #fff6ee;
  --shadow: 0 18px 40px rgba(154, 74, 50, 0.1);
}

[data-palette="graphite"] {
  --ink: #1a1c19;
  --muted: #5c615c;
  --paper: #eef0ec;
  --panel: #ffffff;
  --line: #d5d8d2;
  --accent: #2b2f2c;
  --accent-ink: #f4f5f2;
  --menu: #1c201d;
  --field: #ffffff;
  --wash: #e4e7e2;
  --glow: #f6f7f4;
  --shadow: 0 18px 40px rgba(27, 31, 28, 0.1);
}

[data-palette="blush"] {
  --ink: #241820;
  --muted: #746070;
  --paper: #f4eef3;
  --panel: #fffafd;
  --line: #e5d3de;
  --accent: #a14d86;
  --accent-ink: #fdf6fb;
  --menu: #6c335c;
  --field: #ffffff;
  --wash: #efe3ec;
  --glow: #faeef6;
  --shadow: 0 18px 40px rgba(161, 77, 134, 0.12);
}

[data-palette="aqua"] {
  --ink: #142422;
  --muted: #4f6b66;
  --paper: #e7f5f2;
  --panel: #f7fffd;
  --line: #c3ddd7;
  --accent: #1a8f86;
  --accent-ink: #eefbf8;
  --menu: #125e58;
  --field: #ffffff;
  --wash: #d4efe9;
  --glow: #f1fbf8;
  --shadow: 0 18px 40px rgba(26, 143, 134, 0.12);
}

[data-palette="slate"] {
  --ink: #1b1d2a;
  --muted: #5d6380;
  --paper: #eef0f6;
  --panel: #fbfbfe;
  --line: #d4d7e4;
  --accent: #5b6bb8;
  --accent-ink: #f4f5fb;
  --menu: #3e4a86;
  --field: #ffffff;
  --wash: #e4e7f3;
  --glow: #f3f4fb;
  --shadow: 0 18px 40px rgba(91, 107, 184, 0.12);
}

[data-palette="orange"] {
  --ink: #2a1c12;
  --muted: #7a5844;
  --paper: #f7efe6;
  --panel: #fffbf7;
  --line: #ead5c4;
  --accent: #e06c1a;
  --accent-ink: #fff7ef;
  --menu: #b4530e;
  --field: #ffffff;
  --wash: #f4e4d4;
  --glow: #fff3e6;
  --shadow: 0 18px 40px rgba(224, 108, 26, 0.12);
}

[data-palette="mint"] {
  --ink: #14241c;
  --muted: #4f7260;
  --paper: #e8f4ec;
  --panel: #f6fcf8;
  --line: #c5ddd0;
  --accent: #2a9a68;
  --accent-ink: #f3fff8;
  --menu: #1e7550;
  --field: #ffffff;
  --wash: #d5eadc;
  --glow: #eefaf2;
  --shadow: 0 18px 40px rgba(42, 154, 104, 0.14);
}

[data-palette="brick"] {
  --ink: #241512;
  --muted: #7a534a;
  --paper: #f6eee8;
  --panel: #fffaf7;
  --line: #e6d2c8;
  --accent: #9b3d2e;
  --accent-ink: #fff7f3;
  --menu: #722c22;
  --field: #ffffff;
  --wash: #f0e0d7;
  --glow: #fbf3ee;
  --shadow: 0 18px 40px rgba(155, 61, 46, 0.14);
}

[data-palette="plum"] {
  --ink: #1c1424;
  --muted: #6b5878;
  --paper: #f3eef6;
  --panel: #fcf9fe;
  --line: #ddd0e6;
  --accent: #6e3d8f;
  --accent-ink: #f8f2fc;
  --menu: #522c6c;
  --field: #ffffff;
  --wash: #ebe0f0;
  --glow: #f7f1fb;
  --shadow: 0 18px 40px rgba(110, 61, 143, 0.14);
}

[data-palette="citrus"] {
  --ink: #1f2410;
  --muted: #667044;
  --paper: #f3f6e4;
  --panel: #fbfcec;
  --line: #d8e0b8;
  --accent: #6b8f14;
  --accent-ink: #f7ffe8;
  --menu: #4f6a10;
  --field: #ffffff;
  --wash: #e8efc8;
  --glow: #f6fadf;
  --shadow: 0 18px 40px rgba(107, 143, 20, 0.14);
}

[data-palette="ember"] {
  --ink: #261014;
  --muted: #8a5460;
  --paper: #f8ecee;
  --panel: #fff8f9;
  --line: #ebd0d5;
  --accent: #c42b4a;
  --accent-ink: #fff6f7;
  --menu: #8e1d36;
  --field: #ffffff;
  --wash: #f3dce1;
  --glow: #fdeff1;
  --shadow: 0 18px 40px rgba(196, 43, 74, 0.14);
}

[data-palette="cobalt"] {
  --ink: #101826;
  --muted: #5a6b84;
  --paper: #e8eef6;
  --panel: #f6f9fc;
  --line: #c8d4e4;
  --accent: #1f5f9a;
  --accent-ink: #f3f8ff;
  --menu: #16487a;
  --field: #ffffff;
  --wash: #d7e3f0;
  --glow: #eef4fb;
  --shadow: 0 18px 40px rgba(31, 95, 154, 0.14);
}

[data-palette="moss"] {
  --ink: #162016;
  --muted: #5a6e5c;
  --paper: #e8f0e8;
  --panel: #f6fbf6;
  --line: #c5d6c6;
  --accent: #3d6b48;
  --accent-ink: #f3faf4;
  --menu: #2c5136;
  --field: #ffffff;
  --wash: #d5e4d6;
  --glow: #eef6ee;
  --shadow: 0 18px 40px rgba(61, 107, 72, 0.14);
}

[data-palette="royal"] {
  --ink: #14182c;
  --muted: #5c6584;
  --paper: #e8ebf6;
  --panel: #f6f7fc;
  --line: #c4cbe0;
  --accent: #2f4fd6;
  --accent-ink: #f3f5ff;
  --menu: #243fb0;
  --field: #ffffff;
  --wash: #dce2f4;
  --glow: #eef1fb;
  --shadow: 0 18px 40px rgba(47, 79, 214, 0.14);
}

[data-palette="salmon"] {
  --ink: #2a1614;
  --muted: #8a5e56;
  --paper: #f8eee9;
  --panel: #fffaf7;
  --line: #ead3cb;
  --accent: #e07a66;
  --accent-ink: #fff8f5;
  --menu: #c45d4c;
  --field: #ffffff;
  --wash: #f4e0d8;
  --glow: #fdeee8;
  --shadow: 0 18px 40px rgba(224, 122, 102, 0.14);
}

[data-palette="sky"] {
  --ink: #152433;
  --muted: #5a7388;
  --paper: #e8f3fb;
  --panel: #f7fbfe;
  --line: #c4d8ea;
  --accent: #4aa3dc;
  --accent-ink: #f4fbff;
  --menu: #2b86c4;
  --field: #ffffff;
  --wash: #d7ebf8;
  --glow: #f0f8fd;
  --shadow: 0 18px 40px rgba(74, 163, 220, 0.14);
}

[data-palette="gold"] {
  --ink: #2a2418;
  --muted: #7a6d52;
  --paper: #f6f0e2;
  --panel: #fffdf7;
  --line: #e4d8ba;
  --accent: #d4aa14;
  --accent-ink: #fffdf0;
  --menu: #c4960c;
  --field: #ffffff;
  --wash: #efe4c8;
  --glow: #fff6dc;
  --shadow: 0 18px 40px rgba(212, 170, 20, 0.14);
}

[data-palette="ink"] {
  --ink: #1c1915;
  --muted: #6b645c;
  --paper: #f3eee4;
  --panel: #fbf7ef;
  --line: #ddd4c6;
  --accent: #3d3428;
  --accent-ink: #e8d5a3;
  --menu: #2a241c;
  --field: #ffffff;
  --wash: #ebe4d6;
  --glow: #f7f1e4;
  --shadow: 0 18px 40px rgba(61, 52, 40, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8e0d2;
  --muted: #a3998c;
  --paper: #161410;
  --panel: #221f1a;
  --line: #3d3830;
  --accent: #3f6b5c;
  --accent-ink: #f7f3ea;
  --menu: #12110f;
  --field: #1c1a16;
  --wash: #1a1814;
  --glow: #1f1c18;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--glow) 0, transparent 42%),
    var(--paper);
}

.site-header,
.site-footer {
  background: var(--accent);
  color: var(--accent-ink);
}

.site-header-inner,
.site-footer-inner {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--field);
}

.brand-text {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu,
.lang {
  position: relative;
  z-index: 30;
}

.lang-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(247, 243, 234, 0.35);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lang-toggle svg {
  width: 20px;
  height: 20px;
}

.lang-toggle:focus-visible {
  outline: 3px solid rgba(247, 243, 234, 0.45);
  outline-offset: 2px;
}

.lang-panel {
  width: min(240px, calc(100vw - 32px));
}

.menu-toggle {
  border: 1px solid rgba(247, 243, 234, 0.35);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(247, 243, 234, 0.45);
  outline-offset: 2px;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 88px);
  overflow: auto;
  padding: 6px;
  border-radius: 16px;
  background: var(--menu);
  box-shadow: var(--shadow);
}

.menu-group {
  padding: 8px 10px 10px;
}

.menu-group + .menu-group,
#menu-tools,
#menu-tools + .menu-group {
  border-top: 1px solid rgba(247, 243, 234, 0.16);
}

.menu-group h2 {
  margin: 0 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.7);
}

.menu-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-option,
.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-option {
  width: auto;
}

.menu-option.is-active,
.menu-option:hover,
.menu-link.is-active,
.menu-link:hover {
  background: rgba(247, 243, 234, 0.12);
}

.menu-link.is-active {
  font-weight: 650;
}

.menu-link-name {
  flex: 1;
  min-width: 0;
}

.menu-link.is-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(247, 243, 234, 0.5);
  cursor: default;
}

.menu-link.is-soon .tool-mark {
  opacity: 0.55;
}

.menu-link.is-soon em {
  flex: none;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-panel .segmented {
  background: color-mix(in srgb, var(--accent-ink) 12%, transparent);
  border-color: rgba(247, 243, 234, 0.28);
}

.menu-panel .segment {
  padding: 10px 8px;
  font-size: 0.78rem;
  color: rgba(247, 243, 234, 0.72);
}

.menu-panel .segment.is-active {
  background: var(--accent-ink);
  color: var(--menu);
}

.app {
  width: min(560px, calc(100% - 32px));
  margin: 36px auto;
  flex: 1;
}

.app-wide {
  width: min(760px, calc(100% - 32px));
}

.intro h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.5;
}

.lede-copy-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

.panel,
.results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.home-catalog {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tool-family {
  scroll-margin-top: 80px;
}

.tool-family h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.tool-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.tool-card .label {
  color: var(--swatch, var(--accent));
}

.tool-card strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: color-mix(in srgb, var(--swatch, var(--accent)) 55%, var(--line));
}

.tool-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--swatch, var(--accent));
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.tool-mark.is-light {
  color: #2a2418;
}

.menu-link .tool-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.tool-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-link .tool-mark svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.5;
}

[data-swatch="forest"] { --swatch: #2f5d50; }
[data-swatch="coastal"] { --swatch: #1f4e5a; }
[data-swatch="clay"] { --swatch: #9a4a32; }
[data-swatch="graphite"] { --swatch: #4a524c; }
[data-swatch="blush"] { --swatch: #a14d86; }
[data-swatch="aqua"] { --swatch: #1a8f86; }
[data-swatch="slate"] { --swatch: #5b6bb8; }
[data-swatch="orange"] { --swatch: #e06c1a; }
[data-swatch="salmon"] { --swatch: #e07a66; }
[data-swatch="sky"] { --swatch: #4aa3dc; }
[data-swatch="gold"] { --swatch: #d4aa14; }
[data-swatch="ink"] { --swatch: #3d3428; }
[data-swatch="royal"] { --swatch: #2f4fd6; }
[data-swatch="mint"] { --swatch: #2a9a68; }
[data-swatch="brick"] { --swatch: #9b3d2e; }
[data-swatch="plum"] { --swatch: #6e3d8f; }
[data-swatch="citrus"] { --swatch: #6b8f14; }
[data-swatch="ember"] { --swatch: #c42b4a; }
[data-swatch="cobalt"] { --swatch: #1f5f9a; }
[data-swatch="moss"] { --swatch: #3d6b48; }

.about-copy {
  color: var(--ink);
  line-height: 1.55;
}

.about-copy h2 {
  margin: 1.35em 0 0.45em;
  font-size: 1.15rem;
}

.about-copy h2:first-child {
  margin-top: 0;
}

.about-copy p,
.about-copy ul {
  margin: 0 0 1.1em;
}

.about-copy ul {
  padding-left: 1.2em;
}

.about-copy li + li {
  margin-top: 0.35em;
}

.about-copy p:last-child,
.about-copy ul:last-child {
  margin-bottom: 0;
}

.about-copy a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.about-copy .share-menu {
  margin-top: 16px;
}

.about-copy + .panel {
  margin-top: 16px;
}

.feedback h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.feedback-lede {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-lede a {
  color: var(--accent);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-send {
  align-self: flex-start;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--wash);
}

.segmented.is-triple {
  grid-template-columns: 1fr 1fr 1fr;
}

.segmented.is-triple .segment {
  padding: 12px 8px;
  font-size: 0.92rem;
}

.segment {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.segment.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.input-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.same-system {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
}

.same-system input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--accent);
}

input,
select,
textarea,
.swap,
.copy {
  font: inherit;
}

input:not([type="range"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.swap:focus-visible,
.copy:focus-visible,
.segment:focus-visible,
.feedback-send:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

/* Placeholder slots stay in the HTML. Add .is-live when ads are wired.
   Hidden slots keep their 16px margins so neighbouring cards do not touch;
   they collapse to zero height so a live ad does not sit in extra space. */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 16px 0;
}

.ad-slot:not(.is-live) {
  height: 0;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  gap: 0;
  border: 0;
}

.app > .ad-slot:last-child:not(.is-live) {
  margin-bottom: 0;
}

.ad-slot + .results,
.ad-slot + .explain,
.ad-slot + .related-tool,
.ad-slot + .fun-fact {
  margin-top: 0;
}

.ad-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: repeating-linear-gradient(
    -45deg,
    var(--wash),
    var(--wash) 8px,
    var(--panel) 8px,
    var(--panel) 16px
  );
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
}

.results {
  margin-top: 0;
  padding: 8px 8px 12px;
}

.fun-fact,
.related-tool {
  margin-top: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.related-tool {
  margin-top: 16px;
}

.fun-fact-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fun-fact h2,
.related-tool h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.fun-fact p#fun-fact-body,
#related-body {
  margin: 0 0 16px;
  color: var(--ink);
  line-height: 1.5;
}

.fun-fact-next,
.related-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.related-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.fun-fact-next:focus-visible,
.related-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 8px;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.results h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.same-results {
  padding: 0 8px 8px;
}

.same-results h2 {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 20px 10px 12px;
  border-top: 1px solid var(--line);
}

.swap {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}

.result-list li.is-match {
  margin: 4px 0 2px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.result-list li.is-match + li {
  border-top: 0;
}

.result-value {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-unit {
  color: var(--muted);
  text-align: right;
  line-height: 1.3;
}

.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}

.copy-icon {
  width: 14px;
  height: 14px;
}

.copy-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.copy.is-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.empty {
  padding: 18px 18px 24px;
  color: var(--muted);
}

html {
  scroll-behavior: smooth;
}

.back-to-top-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin: 4px 0 -22px;
}

.back-to-top {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

.back-to-top:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.site-footer {
  margin-top: auto;
  padding: 36px 0 36px;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-block h2 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.7);
}

.footer-block p,
.footer-block a {
  margin: 0;
  color: inherit;
  line-height: 1.5;
  font-size: 0.92rem;
}

.footer-block p + p {
  margin-top: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.4em;
}

.footer-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(247, 243, 234, 0.28);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: rgba(247, 243, 234, 0.12);
}

.footer-social a:focus-visible {
  outline: 3px solid rgba(247, 243, 234, 0.45);
  outline-offset: 2px;
}

.panel > .slider-field,
.panel > .field + .field {
  margin-top: 16px;
}

.slider-field input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.slider-field .field-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 2.4em;
}

.input-suffix span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 650;
  pointer-events: none;
}

.loan-readout {
  margin: 4px 2px 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.loan-advanced {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.loan-advanced[hidden] {
  display: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.summary-grid .bmi-note {
  grid-column: 1 / -1;
  margin: 2px 4px 4px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}

.summary-card .label {
  display: block;
  margin-bottom: 0;
}

.summary-card strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.summary-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-value strong {
  min-width: 0;
}

.summary-copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.summary-copy .copy-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.summary-copy:hover,
.summary-copy:focus-visible {
  color: var(--accent);
}

.summary-copy:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
}

.summary-copy.is-copied {
  color: var(--accent);
}

.graph-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, #120f0c 45%, transparent);
}

.graph-overlay[hidden] {
  display: none;
}

.graph-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.graph-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.graph-dialog-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.graph-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}

.graph-close svg {
  width: 14px;
  height: 14px;
}

.graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.graph-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -1px;
}

.graph-swatch.is-invested {
  background: color-mix(in srgb, var(--ink) 28%, var(--panel));
}

.graph-swatch.is-growth {
  background: var(--accent);
}

.graph-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.graph-chart text {
  fill: var(--muted);
  font-size: 11px;
}

.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.export-bar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-icon,
.export-caret {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.download-menu,
.share-menu {
  position: relative;
}

.download-panel,
.share-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 8;
  min-width: 240px;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.download-panel button,
.share-panel button,
.share-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.download-panel button:hover,
.download-panel button:focus-visible,
.share-panel button:hover,
.share-panel button:focus-visible,
.share-panel a:hover,
.share-panel a:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.app-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.export-bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.export-bar button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.table-wrap {
  overflow-x: auto;
  padding: 0 8px 12px;
}

.loan-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.loan-table caption {
  caption-side: top;
  text-align: left;
  padding: 4px 10px 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.loan-table th,
.loan-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  text-align: right;
  font-size: 0.9rem;
}

.loan-table th:first-child,
.loan-table td:first-child {
  text-align: left;
}

.loan-table th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.loan-table tbody tr.is-year {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  font-weight: 650;
}

.panel > .same-system:first-child {
  margin-bottom: 16px;
}

.advanced-toggle {
  margin-top: 22px;
}

body[data-tool="qr"] .panel + .panel {
  margin-top: 36px;
}

.use-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.use-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.use-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.use-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.use-form[hidden] {
  display: none;
}

.use-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.color-row input[type="color"] {
  height: 42px;
  padding: 4px;
  cursor: pointer;
}

#qr-caption::placeholder {
  color: color-mix(in srgb, currentColor 42%, transparent);
  -webkit-text-fill-color: color-mix(in srgb, currentColor 42%, transparent);
}

.qr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 8px;
}

.qr-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.load-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.soft-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.file-label {
  cursor: pointer;
}

.geo-search-field {
  position: relative;
}

.geo-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.geo-suggest {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}

.geo-suggest button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.geo-suggest button:hover,
.geo-suggest button:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.geo-map-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}

.geo-map {
  height: 280px;
  width: 100%;
}

.geo-pin {
  background: none;
  border: 0;
}

.geo-pin svg {
  display: block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(20, 36, 34, 0.35));
}

.leaflet-container {
  font: inherit;
  background: var(--field);
}

.file-pick {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-pick input[type="file"] {
  width: 100%;
  font: inherit;
}

.print-only {
  display: none;
}

.lede strong {
  color: var(--ink);
  font-weight: 700;
}

.lede em {
  font-style: italic;
}

.limits-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.limits-head .label {
  margin: 0;
}

.limits-toggle {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.limits-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

html[data-limits="min"] .limits-head {
  margin-bottom: 0;
}

html[data-limits="min"] .limits-panel {
  padding-top: 16px;
  padding-bottom: 16px;
}

html[data-limits="min"] .limit-list {
  display: none;
}

.limit-list {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
}

.limit-list li + li {
  margin-top: 8px;
}

.drop-zone {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 6%, var(--field));
  text-align: center;
  cursor: pointer;
}

.drop-zone.is-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--field));
}

.drop-zone strong {
  font-size: 1.05rem;
}

.drop-zone p {
  margin: 0;
  color: var(--muted);
}

.drop-zone input[type="file"] {
  display: none;
}

.file-stack {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}

.file-card.is-error {
  border-color: color-mix(in srgb, #9a3b2a 45%, var(--line));
}

.file-card.is-dragging {
  opacity: 0.55;
}

.file-card-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.file-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.file-card-actions button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.file-card-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.combine-status {
  margin: 0 12px 12px;
  color: var(--muted);
}

body[data-tool="combine"] .panel + .panel,
body[data-tool="split"] .panel + .panel {
  margin-top: 24px;
}

body[data-tool="split"] .split-option[hidden] {
  display: none !important;
}

body[data-tool="percent"] .calc-block[hidden],
body[data-tool="percent"] .find-block[hidden],
body[data-tool="percent"] .field[hidden] {
  display: none !important;
}

body[data-tool="percent"] .summary-grid:empty {
  display: none;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-row .segment {
  flex: 1 1 18%;
  min-width: 3.4rem;
}

.pdf-preview {
  margin: 0 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
}

.page-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  scroll-snap-type: x proximity;
}

.page-thumb {
  flex: 0 0 auto;
  width: 132px;
  height: 186px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(40, 32, 12, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.page-thumb img {
  display: block;
  max-width: 86%;
  max-height: 86%;
  object-fit: contain;
}

.page-thumb.is-pdf {
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.page-thumb.is-pdf strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

#preview-hint {
  margin: 0 12px 12px;
}

.input-row-even {
  grid-template-columns: 1fr 1fr;
}

body[data-tool="bmi"] .input-suffix input,
body[data-tool="body-fat"] .input-suffix input,
body[data-tool="tdee"] .input-suffix input,
body[data-tool="hr"] .input-suffix input,
body[data-tool="pace"] .input-suffix input {
  padding-right: 3.2em;
}

body[data-tool="bmi"] .panel > .field,
body[data-tool="bmi"] .panel > .input-row,
body[data-tool="body-fat"] .panel > .field,
body[data-tool="body-fat"] .panel > .input-row,
body[data-tool="tdee"] .panel > .field,
body[data-tool="tdee"] .panel > .input-row,
body[data-tool="hr"] .panel > .field,
body[data-tool="hr"] .panel > .input-row,
body[data-tool="pace"] .panel > .field,
body[data-tool="pace"] .panel > .input-row {
  margin-top: 16px;
}

body[data-tool="bmi"] .panel > .field:first-child,
body[data-tool="body-fat"] .panel > .field:first-child,
body[data-tool="tdee"] .panel > .field:first-child,
body[data-tool="hr"] .panel > .field:first-child,
body[data-tool="pace"] .panel > .field:first-child {
  margin-top: 0;
}

body[data-tool="bmi"] .field[hidden],
body[data-tool="bmi"] .input-row[hidden],
body[data-tool="body-fat"] .field[hidden],
body[data-tool="body-fat"] .input-row[hidden],
body[data-tool="tdee"] .field[hidden],
body[data-tool="tdee"] .input-row[hidden],
body[data-tool="hr"] .field[hidden],
body[data-tool="hr"] .input-row[hidden],
body[data-tool="pace"] .field[hidden],
body[data-tool="pace"] .input-row[hidden],
body[data-tool="pace"] .find-block[hidden],
body[data-tool="retirement"] .loan-advanced[hidden] {
  display: none !important;
}

.bmi-hero {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 18px 18px 10px;
}

.bmi-hero .copy {
  position: absolute;
  top: 18px;
  right: 18px;
}

.bmi-number {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

body[data-tool="retirement"] .bmi-number {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
}

.bmi-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.bmi-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 650;
  color: #fff;
}

.bmi-category[hidden] {
  display: none !important;
}

.bmi-note {
  margin: 0 18px 12px;
  color: var(--muted);
  line-height: 1.5;
}

.bmi-scale {
  position: relative;
  margin: 4px 18px 10px;
}

.bmi-track {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--wash);
}

.bmi-seg {
  height: 100%;
}

.bmi-marker {
  position: absolute;
  top: -7px;
  width: 12px;
  height: 28px;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.bmi-marker span {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.bmi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0 18px 6px;
  list-style: none;
  color: var(--muted);
  font-size: 0.78rem;
}

.bmi-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bmi-legend i {
  width: 10px;
  height: 10px;
  border-radius: 99px;
}

.explain {
  margin-top: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.explain h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.explain h3 {
  margin: 1.15em 0 0.4em;
  font-size: 1rem;
}

.explain .about-copy p:last-of-type {
  margin-bottom: 0;
}

.tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.tip-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
}

.tip-card h3 {
  margin: 0 0 8px;
}

.tip-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.tip-card.is-focus {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.tip-card-wide {
  margin-top: 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 18px 16px;
}

.method-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
}

.method-card .label {
  margin-bottom: 4px;
}

.method-card strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.method-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.field .label em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.method-card.is-zone {
  border-left: 4px solid var(--zone, var(--accent));
}

.energy-bar {
  display: flex;
  height: 14px;
  overflow: hidden;
  margin: 4px 18px 10px;
  border-radius: 999px;
  background: var(--wash);
}

.energy-bar span {
  display: block;
  height: 100%;
}

.energy-bar .is-bmr {
  background: #3d9a6a;
}

.energy-bar .is-activity {
  background: var(--accent);
}

.energy-bar .is-saved {
  background: #8aa890;
}

.energy-bar .is-growth {
  background: #3d6b48;
}

.kcal-unit {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

@media print {
  .menu,
  .lang,
  .header-actions,
  .ad-slot,
  .related-tool,
  .back-to-top-wrap,
  .no-print,
  .export-bar,
  .summary-copy,
  .graph-overlay {
    display: none !important;
  }

  body[data-tool="qr"] .intro,
  body[data-tool="qr"] .panel,
  body[data-tool="qr"] .site-header,
  body[data-tool="qr"] .site-footer,
  body[data-tool="qr"] .results-header {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .screen-only {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .app,
  .app-wide {
    width: 100%;
    margin: 0;
  }

  .panel,
  .results,
  .qr-stage {
    box-shadow: none;
    break-inside: avoid;
  }

  .qr-stage canvas {
    max-width: 80mm;
  }

  .loan-table th,
  .loan-table td {
    font-size: 0.75rem;
    padding: 4px 6px;
  }
}

@media (max-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .input-row,
  .results-header,
  .summary-grid,
  .color-row,
  .tool-grid,
  .tip-grid,
  .method-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
}
