/* CalcKeep's shared tokens are loaded before this page. */
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; }
a { color: var(--brand); text-underline-offset: 4px; }
a:hover { color: var(--brand-hover); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3, dl { margin-top: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); margin-bottom: 20px; font-weight: 650; }
h3 { font-size: 1.07rem; font-weight: 650; }
p { margin-bottom: 16px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 40px; }
.skip-link { position: absolute; z-index: 5; left: 16px; top: -100px; padding: 12px 16px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 100px; gap: 24px; border-bottom: 1px solid var(--border); }
.wordmark { font-size: 1.6rem; letter-spacing: -.055em; font-weight: 750; color: var(--fg); text-decoration: none; white-space: nowrap; }
.wordmark span, .accent { color: var(--brand); }
.site-header nav, .site-footer nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { text-decoration: none; font-size: .88rem; font-weight: 550; padding-block: 12px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; padding-block: 42px 38px; }
.hero-copy { min-width: 0; }
.scene { margin: 0; min-width: 0; }
.scene img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.scene figcaption { margin-top: 9px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.scene figcaption span { white-space: nowrap; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; color: var(--brand); margin-bottom: 18px; }
h1 { font-size: clamp(2.4rem, 4.7vw, 3.65rem); font-weight: 650; margin-bottom: 22px; }
.lead { color: var(--muted); max-width: 66ch; font-size: 1.13rem; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 8px; font-size: .76rem; color: var(--muted); margin-top: 24px; }
.hero-meta span::before { content: "✓"; color: var(--brand); margin-right: 7px; }
.calculator { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.input-panel { background: var(--surface); padding: 32px 36px; }
.result-panel { background: var(--brand-soft); padding: 32px 36px; border-left: 1px solid var(--border); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.025em; }
.text-button { border: 0; background: none; color: var(--brand); padding: 10px 0; font-size: .79rem; font-weight: 600; min-height: 44px; }
.text-button:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 4px; }
.panel-intro { font-size: .8rem; color: var(--muted); margin-bottom: 26px; }
.field { margin-top: 22px; }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.label-note { font-weight: 400; font-size: .8rem; color: var(--muted); margin-left: 4px; }
.input-wrap { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; min-height: 58px; }
.input-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.input-wrap:has([aria-invalid="true"]) { border-color: var(--brand); }
.input-wrap input { appearance: none; border: 0; outline: 0; min-width: 0; width: 100%; background: transparent; color: var(--fg); padding: 12px 16px; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.input-wrap span { padding-right: 16px; font-size: .82rem; color: var(--muted); }
.hint, .field-error { font-size: .78rem; line-height: 1.55; color: var(--muted); margin-block: 8px 0; }
.field-error { color: var(--brand); font-weight: 600; }
.fill-guide { display: flex; align-items: center; gap: 10px; margin: 24px 0 0; padding: 14px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.fill-guide svg { width: 100px; height: 106px; flex-shrink: 0; }
.jar-fill { fill: var(--brand-soft); }
.jar-outline, .jar-rim { stroke: var(--muted); stroke-width: 2; fill: none; }
.jar-wick { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
.fill-callout { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.fill-point { fill: var(--brand); }
.jar-point { fill: var(--muted); }
.fill-guide figcaption { display: grid; gap: 5px; font-size: .73rem; color: var(--muted); min-width: 0; }
.fill-guide strong { color: var(--fg); font-size: .83rem; margin-bottom: 3px; }
.fill-guide b { color: var(--fg); font-weight: 600; }
.fill-guide small { font-size: .67rem; line-height: 1.45; margin-top: 4px; }
.key { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.fill-key, .oil-key { background: var(--brand); }
.jar-key, .wax-key { background: var(--muted); }
.mix-visual { margin: 24px 0; }
.mix-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .76rem; margin-bottom: 12px; }
.mix-heading strong { font-weight: 600; }
.mix-heading > span { color: var(--muted); font-size: .68rem; }
.mix-bar { display: block; width: 100%; height: 18px; border-radius: 4px; overflow: hidden; }
.mix-wax { fill: var(--muted); }
.mix-oil { fill: var(--brand); }
.mix-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: .72rem; }
.mix-legend b { font-variant-numeric: tabular-nums; font-weight: 600; margin-left: 3px; }
.mix-visual figcaption, .mix-empty { color: var(--muted); font-size: .71rem; line-height: 1.5; margin-top: 10px; }
.input-footnote { color: var(--muted); font-size: .75rem; padding-top: 20px; margin: 24px 0 0; border-top: 1px solid var(--border); }
.badge { font-size: .72rem; color: var(--brand); border: 1px solid var(--border); border-radius: 100px; padding: 4px 10px; overflow-wrap: anywhere; }
.result-label { font-size: .82rem; font-weight: 600; }
.weight p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.weight output { font-size: clamp(2.35rem, 4.8vw, 3.5rem); font-weight: 550; line-height: 1.2; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.result-unit { color: var(--muted); font-size: 1.2rem; }
.fragrance { color: var(--brand); }
.result-details { margin-bottom: 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: .82rem; }
.result-details div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }
.result-details dt { color: var(--muted); }
.result-details dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.rounding-note { font-size: .71rem; line-height: 1.55; color: var(--muted); margin-block: 15px 20px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button { min-height: 46px; padding: 11px 18px; border: 1px solid var(--border); border-radius: 8px; font-size: .82rem; font-weight: 600; line-height: 1.4; }
.secondary { background: var(--surface); color: var(--fg); flex: 1; white-space: nowrap; }
.secondary:hover:enabled { border-color: var(--brand); color: var(--brand); }
.primary { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.primary:hover:enabled { background: var(--brand-hover); border-color: var(--brand-hover); }
.keep-link { display: block; text-align: center; font-size: .79rem; font-weight: 600; margin-top: 12px; padding-block: 8px; text-decoration: none; }
.keep-link:hover { text-decoration: underline; }
.action-status { min-height: 24px; margin-block: 12px 0; font-size: .82rem; color: var(--brand); }
.copy-fallback, .notice { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); margin-block: 16px; background: var(--surface); }
.copy-fallback textarea { display: block; width: 100%; height: 200px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); padding: 12px; font-size: .8rem; resize: vertical; }
.content-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; padding-block: 64px 72px; }
.method > p, .percentage-note p { color: var(--muted); font-size: .92rem; }
.method strong, .percentage-note strong { color: var(--fg); }
.formula-steps { list-style: none; padding: 0; margin: 30px 0; counter-reset: formula; }
.formula-steps li { counter-increment: formula; display: flex; gap: 18px; margin-bottom: 28px; }
.formula-steps li::before { content: counter(formula, decimal-leading-zero); font-size: .76rem; color: var(--brand); padding-top: 2px; font-variant-numeric: tabular-nums; }
.formula-steps h3 { margin-bottom: 9px; }
.formula-steps p { font-size: .84rem; color: var(--muted); margin-bottom: 6px; }
.formula-steps .formula { color: var(--fg); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .79rem; overflow-wrap: anywhere; }
.percentage-note { padding: 32px; background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); align-self: start; }
.note-number { display: block; font-size: 4.2rem; line-height: 1; color: var(--brand); letter-spacing: -.065em; margin-bottom: 26px; }
.percentage-note h2 { font-size: 1.6rem; }
.percentage-note a { font-size: .82rem; }
.ratio { display: flex; flex-wrap: wrap; column-gap: 12px; font-size: .85rem; padding-block: 18px; margin-bottom: 20px; border-block: 1px solid var(--border); }
.ratio strong { flex-basis: 100%; margin-top: 5px; }
.app-section { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; padding: 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.app-section h2 { font-size: 2.2rem; }
.app-section p { color: var(--muted); font-size: .92rem; }
.app-section .app-status, .app-section .hint { font-size: .77rem; }
.app-section .primary { margin-block: 4px 8px; }
.import-guide { border-left: 1px solid var(--border); padding-left: 32px; }
.import-guide h3 { margin-bottom: 22px; }
.import-guide ol { margin: 0; padding-left: 20px; font-size: .84rem; }
.import-guide li { padding-left: 7px; margin-bottom: 16px; }
.import-guide li::marker { color: var(--brand); }
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; padding-block: 80px 64px; }
.faq h2 { max-width: 9em; }
.faq-list { border-top: 1px solid var(--border); }
details { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; padding: 21px 0; font-size: .9rem; font-weight: 600; }
summary:hover { color: var(--brand); }
details p { font-size: .86rem; color: var(--muted); padding-bottom: 10px; }
.sources { padding-block: 28px 48px; border-top: 1px solid var(--border); max-width: 85ch; }
.sources h2 { font-size: .9rem; letter-spacing: 0; }
.sources p { font-size: .77rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding-block: 28px; }
.site-footer .wordmark { font-size: 1.25rem; }
.site-footer p { font-size: .75rem; color: var(--muted); margin: 0; flex: 1; }
.site-footer nav { gap: 20px; }
.site-footer nav a { font-size: .72rem; padding-block: 12px; }
@media (max-width: 900px) {
  .wrap { padding-inline: 28px; }
  .hero { gap: 28px; }
  .fill-guide { flex-direction: column; align-items: flex-start; }
  .input-panel, .result-panel { padding: 26px; }
  .content-grid { gap: 36px; }
  .app-section { padding: 30px; gap: 30px; }
  .faq { gap: 32px; }
}
@media (max-width: 680px) {
  .wrap { padding-inline: 20px; }
  .site-header { min-height: 80px; gap: 12px; }
  .site-header .wordmark { font-size: 1.4rem; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: .72rem; }
  .site-header nav a:first-child { display: inline; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 30px 28px; }
  .scene img { max-height: 180px; object-position: center 62%; aspect-ratio: 2 / 1; }
  .fill-guide { flex-direction: row; align-items: center; }
  h1 { font-size: 2.55rem; }
  .lead { font-size: 1rem; }
  .hero-meta { gap: 8px 16px; font-size: .7rem; }
  .calculator, .content-grid, .app-section, .faq { grid-template-columns: 1fr; }
  .input-panel, .result-panel { padding: 24px; }
  .result-panel { border-left: 0; border-top: 1px solid var(--border); }
  .weight output { font-size: 3.1rem; }
  .content-grid { padding-block: 40px 48px; gap: 24px; }
  .percentage-note { padding: 26px; }
  .note-number { font-size: 3.3rem; margin-bottom: 18px; }
  .app-section { padding: 26px; gap: 28px; }
  .app-section h2 { font-size: 1.9rem; }
  .app-section .primary { width: 100%; }
  .import-guide { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .faq { padding-block: 48px; gap: 16px; }
  .faq h2 { max-width: none; }
  .site-footer { gap: 12px 20px; }
  .site-footer nav { flex-basis: 100%; flex-wrap: wrap; }
}
.compact-method { max-width: 75ch; padding-block: 24px 32px; }
.compact-method h2, .compact-related h2 { font-size: 1.25rem; }
.compact-method > p { font-size: .9rem; line-height: 1.8; }
.compact-method .hint { font-size: .8rem; color: var(--muted); }
.compact-details { border-top: 1px solid var(--border); }
.compact-details details > p { max-width: 85ch; }
.compact-details .button { margin-bottom: 16px; }
.compact-related { padding-block: 32px; }
.compact-related a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 32px; font-size: .85rem; }
@media (max-width: 360px) {
  .wrap { padding-inline: 16px; }
  h1 { font-size: 2.3rem; }
  .input-panel, .result-panel { padding: 20px; }
  .label-note { display: block; margin: 2px 0 0; }
  .result-actions { flex-direction: column; }
  .weight output { font-size: 2.7rem; }
  .fill-guide { padding-inline: 8px; gap: 8px; }
  .fill-guide svg { width: 72px; height: 88px; }
}
