:root {
  color-scheme: light;
  --ink: #171c31;
  --muted: #535d71;
  --subtle: #647089;
  --paper: #f6f7fb;
  --white: #fff;
  --line: #e2e6ef;
  --blue: #2449e6;
  --blue-dark: #1939bb;
  --blue-soft: #eef1ff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
a:hover { color: var(--blue); }
button, input { font: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 3px solid #7154df; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.04em; text-wrap: balance; font-weight: 750; }
p { color: var(--muted); }
.shell { width: min(1216px, calc(100% - 88px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: .35rem; padding: .5rem 1rem; background: white; z-index: 10; translate: 0 -150%; }
.skip:focus { translate: 0; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; }
.top-inner > .brand { justify-self: start; }
.brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -.065em; text-decoration: none; display: inline-flex; gap: .56rem; color: var(--ink); align-items: center; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-accent { color: var(--blue); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--blue); color: white; border-radius: .59rem; }
.primary-nav { display: flex; align-items: center; gap: clamp(20px, 3.4vw, 48px); }
.primary-nav a, .footer nav a { font-size: .9rem; text-decoration: none; color: var(--muted); font-weight: 650; }
.primary-nav a:hover, .primary-nav [aria-current], .footer nav a:hover { color: var(--blue-dark); }
.top-tool-search { position: relative; justify-self: end; width: min(100%, 260px); min-width: 0; }
.top-tool-search-field { display: flex; align-items: center; border: 1px solid #dfe4ef; border-radius: 8px; background: #fbfcff; }
.top-tool-search-field:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.top-tool-search-field input { width: 100%; min-width: 0; min-height: 44px; padding: 0 0 0 12px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: .9375rem; }
.top-tool-search-field input::placeholder { color: var(--muted); opacity: 1; }
.top-tool-search-field button { display: grid; place-items: center; flex: 0 0 44px; height: 44px; padding: 0; color: var(--blue-dark); border: 0; border-radius: 0 7px 7px 0; background: transparent; }
.top-tool-search-field button:hover { background: var(--blue-soft); }
.top-tool-search-results { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 28px)); max-height: min(55vh, 360px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 10px 28px #17234420; }
.top-tool-search-results ul { list-style: none; margin: 0; padding: 4px; }
.top-tool-search-results a { display: grid; align-content: center; gap: 2px; min-height: 48px; padding: 8px 12px; border-radius: 5px; color: var(--ink); font-size: .9375rem; font-weight: 650; line-height: 1.35; text-decoration: none; }
.top-tool-search-results small { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.top-tool-search-results a:is(:hover, :focus-visible, [aria-selected="true"]) { background: var(--blue-soft); color: var(--blue-dark); }
.top-tool-search-results p { padding: 12px; font-size: .9375rem; }
.footer { margin-top: 64px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 134px; padding-block: 24px; }
.footer p { margin-top: 8px; font-size: .9rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 36px; align-items: stretch; padding-top: 46px; }
.hero-content { min-width: 0; align-self: center; padding: 18px 0 24px; }
.hero-label { display: inline-flex; min-height: 30px; align-items: center; gap: 8px; color: var(--blue-dark); background: var(--blue-soft); border: 1px solid #dce3ff; border-radius: 6px; padding: 4px 9px; font-size: .78rem; font-weight: 750; letter-spacing: .09em; }
.hero h1 { font-size: clamp(3.05rem, 6.15vw, 6rem); line-height: .99; letter-spacing: -.065em; margin: 22px 0 20px; max-width: 12ch; font-weight: 800; text-wrap: initial; }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero p { max-width: 40ch; font-size: clamp(1.03rem, 1.6vw, 1.24rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; padding: 9px 15px; border-radius: 8px; font-weight: 700; font-size: .91rem; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.primary:hover { color: #fff; background: var(--blue-dark); border-color: var(--blue-dark); }
.secondary { color: var(--ink); background: #fff; border-color: #dce2ee; }
.secondary:hover { background: var(--blue-soft); color: var(--blue-dark); border-color: #b5c2ff; }
.hero-figure { min-height: 376px; border-radius: 17px; position: relative; background: #ded4c7; overflow: hidden; }
.hero-figure img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.hero-figure figcaption { position: absolute; width: fit-content; max-width: calc(100% - 24px); inset: auto auto 12px 12px; padding: 4px 8px; border-radius: 5px; color: #fff; font-size: .8rem; background: #161b2be8; }
.hero-figure figcaption a { color: inherit; }
.quick-find { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; margin-top: 28px; }
.home-search, .catalog-search { display: flex; align-items: center; border: 1px solid #dce2ef; background: #fbfcff; border-radius: 8px; color: var(--blue-dark); padding: 5px 5px 5px 13px; gap: 8px; }
.home-search { flex: 1 1 600px; max-width: 680px; }
.home-search:focus-within, .catalog-search:focus-within { outline: 2px solid #7a8fff; outline-offset: 2px; }
.home-search input, .catalog-search input { min-width: 0; width: 100%; flex: 1; color: var(--ink); padding: 6px 2px; background: transparent; border: 0; outline: none; }
.home-search input::placeholder, .catalog-search input::placeholder { color: var(--subtle); opacity: 1; }
.home-search .button { min-height: 36px; padding: 6px 13px; border-radius: 6px; }
.find-note { display: inline-flex; min-width: max-content; align-items: center; gap: 8px; color: var(--muted); font-size: .87rem; font-weight: 650; padding-inline: 6px; }
.find-note svg { color: #20784d; }
.home-section, .related { margin-top: 49px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.section-title h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); }
.section-title p { margin-top: 6px; }
.text-link { color: var(--blue-dark); font-size: .94rem; font-weight: 700; }
.section-title .text-link { white-space: nowrap; }
.tool-grid, .category-grid { display: grid; list-style: none; padding: 0; margin: 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.tool-card, .guide-card { background: #fff; min-width: 0; padding: 17px 18px 19px; border: 1px solid var(--line); border-radius: 11px; position: relative; }
.tool-card:hover, .guide-card:hover { border-color: #b3c0f4; box-shadow: 0 3px 13px #2945820e; }
.tool-card:focus-within, .guide-card:focus-within { outline: 2px solid #7154df; outline-offset: 2px; }
.tool-card a, .guide-card a { color: var(--ink); text-decoration: none; }
.tool-card a::after, .guide-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-card a:hover, .guide-card a:hover { color: var(--blue-dark); }
.card-top { display: flex; list-style: none; align-items: center; gap: 9px; margin-bottom: 11px; }
.icon-tile { display: inline-grid; place-items: center; min-width: 37px; height: 37px; border-radius: 8px; color: #2945bc; background: #edf0ff; }
.tone-box, .tone-materials, .tone-returns { color: #9a4315; background: #fff0e3; }
.tone-pallet, .tone-sustain, .tone-cost { color: #20714d; background: #e8f7ee; }
.tone-labels, .tone-cushion, .tone-quality { color: #6545ad; background: #f1eaff; }
.card-tag, .guide-meta { font-size: .82rem; color: var(--muted); font-weight: 650; }
.tool-card h3, .guide-card h3 { font-size: 1.12rem; letter-spacing: -.025em; }
.tool-card p, .guide-card p { font-size: 1rem; margin-top: 7px; line-height: 1.5; }
.category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.category-grid a { display: flex; align-items: center; gap: 11px; min-height: 74px; border: 1px solid var(--line); padding: 10px 12px; border-radius: 9px; background: #fff; color: var(--ink); text-decoration: none; }
.category-grid a:hover { color: var(--blue-dark); border-color: #b3c0f4; }
.category-grid strong { display: block; font-size: .95rem; line-height: 1.35; }
.category-grid small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.guide-card { padding: 0; }
.guide-card img { display: block; width: 100%; height: auto; aspect-ratio: 16/8; object-fit: cover; border-radius: 10px 10px 0 0; background: #e7e5df; }
.guide-card-body { padding: 16px 18px 19px; }
.guide-meta { display: flex; align-items: center; gap: 6px; color: var(--blue-dark); margin-bottom: 12px; }
.guide-meta span { color: var(--muted); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 3px 9px; margin-block: 22px 25px; align-items: center; font-size: .87rem; color: var(--subtle); }
.breadcrumbs [aria-current] { color: var(--ink); }
.page-head { margin-bottom: 28px; }
.page-head .icon-tile { margin-bottom: 10px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); max-width: 23ch; }
.page-head p { max-width: 70ch; margin-top: 13px; font-size: 1.11rem; }
.catalog-search { max-width: 620px; min-height: 48px; padding-inline: 13px; background: #fff; }
.catalog-search kbd { border: 1px solid #e2e6ef; padding: 0 7px; border-radius: 5px; font-size: .86rem; color: var(--subtle); background: #f7f8fc; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 17px 23px; }
.chip { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; min-height: 36px; border-radius: 7px; border: 1px solid var(--line); padding: 5px 11px; background: #fff; color: var(--ink); font-size: .875rem; font-weight: 650; }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: white; }
.chip[aria-pressed="false"]:hover, a.chip:hover { color: var(--blue-dark); border-color: #aebbff; }
.catalog-count { font-size: .92rem; font-weight: 650; margin-bottom: 10px; color: var(--muted); }
.empty-state { background: #fff; border: 1px dashed #b7c3dd; padding: 25px; border-radius: 9px; }
.load-row { text-align: center; margin-top: 21px; }
.eyeline { display: block; color: var(--blue-dark); font-size: .9rem; font-weight: 750; margin-bottom: .5rem; }
.tool-head { display: flex; justify-content: space-between; gap: 15px 28px; align-items: flex-end; }
.save-button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-dark); border-color: #b5c2ff; }
.save-button[aria-pressed="true"] svg { fill: #c3ceff; }
.workbench, .tool-detail { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.tool-detail { margin-top: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: clamp(16px, 3vw, 26px); min-width: 0; }
.panel h2 { font-size: 1.35rem; }
.panel h3 { font-size: 1.11rem; margin: 17px 0 8px; }
.panel p { margin-top: 9px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 19px; }
.field-grid label { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; font-size: .91rem; color: var(--ink); font-weight: 650; }
.input-unit { display: flex; width: 100%; border: 1px solid #cbd3e5; border-radius: 7px; align-items: stretch; min-height: 44px; background: #fff; }
.input-unit:focus-within { outline: 2px solid #6c83ef; outline-offset: 2px; }
.input-unit input { min-width: 0; width: 100%; border: 0; border-radius: 7px 0 0 7px; outline: none; background: transparent; padding: 8px 9px; font-size: 1rem; color: var(--ink); }
.input-unit span { display: grid; align-content: center; white-space: nowrap; background: #f2f4f9; border-left: 1px solid #e4e9f2; border-radius: 0 6px 6px 0; padding: 4px 8px; font-size: .83rem; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.result-panel { background: #203fc6; border-color: #203fc6; color: #fff; align-self: stretch; }
.result-panel h2 { font-size: 1.21rem; max-width: 25ch; color: #f2f5ff; }
.result-value { display: block; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.06; margin-top: 16px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-panel .result-unit { color: #e6ebff; font-size: 1.05rem; margin-top: 4px; }
.result-panel .result-status { margin-top: 12px; color: #edf1ff; font-size: .9rem; }
.result-panel .form-error { margin-top: 12px; padding: 7px 9px; border: 1px solid #f2b2be; background: #fff1f4; color: #97243d; border-radius: 6px; }
.result-copy { background: #fff; color: #1935a4; margin-top: 14px; }
.result-copy:hover { background: #e9eeff; }
.example-inputs { display: grid; gap: 5px; margin-top: 12px; }
.example-inputs span { color: var(--muted); }
.example-inputs strong, .example-answer strong { margin-inline-start: 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.example-answer { border-top: 1px solid var(--line); padding-top: 9px; }
.formula { font-size: .98rem; padding: 10px 12px; border-radius: 7px; border: 1px solid #e3e8f6; background: #f7f9ff; overflow-wrap: anywhere; }
.formula code { color: #253877; }
.variables { margin: 10px 0 0; font-size: .88rem; }
.variables div { display: flex; gap: 8px; padding-block: 2px; }
.variables dt { min-width: 1.5rem; color: var(--blue-dark); font-weight: 700; }
.variables dd { margin: 0; color: var(--muted); }
.prose { max-width: 780px; }
.prose .page-head { margin-block-end: 24px; }
.feature-photo { margin: 0 0 22px; }
.feature-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16/8; object-fit: cover; border-radius: 12px; background: #e7e5df; }
.feature-photo figcaption { margin-top: 4px; font-size: .82rem; color: var(--muted); }
.prose section { margin-top: 23px; scroll-margin-top: 16px; }
.prose h2 { font-size: 1.52rem; margin-bottom: 7px; }
.prose p { line-height: 1.72; }
.prose section p + p { margin-top: 8px; }
.contents { border-radius: 9px; border: 1px solid var(--line); padding: 13px 16px; background: white; }
.contents ol { margin: 5px 0 0; padding-left: 22px; }
@media (max-width: 940px) {
  .shell { width: calc(100% - 56px); }
  .hero { gap: 24px; }
  .hero-figure { min-height: 330px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .input-unit span { white-space: normal; max-width: 55%; overflow-wrap: anywhere; }
}
@media (max-width: 730px) {
  .shell { width: calc(100% - 36px); }
  .top-inner { gap: 10px; min-height: 61px; }
  .primary-nav { gap: 13px; }
  .primary-nav a { font-size: .84rem; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .hero-content { padding-block: 13px 5px; }
  .hero h1 { margin: 17px 0 14px; }
  .hero-actions { margin-top: 18px; }
  .hero-figure { min-height: 0; aspect-ratio: 16/9; border-radius: 12px; }
  .quick-find { flex-wrap: wrap; gap: 9px; padding: 11px; margin-top: 17px; }
  .tool-grid, .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .home-section, .related { margin-top: 33px; }
  .section-title { align-items: start; }
  .footer { margin-top: 37px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .workbench, .tool-detail { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top-inner { position: relative; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 8px; gap: 6px; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; padding-bottom: 8px; gap: 21px; }
  .top-tool-search { position: static; grid-column: 2; grid-row: 1; }
  .top-tool-search-field input { font-size: 1rem; }
  .top-tool-search-results { top: auto; width: min(360px, 100%); margin-top: 8px; }
}
@media (max-width: 475px) {
  .shell { width: calc(100% - 28px); }
  .brand { font-size: 1.15rem; }
  .brand-mark { width: 31px; height: 31px; }
  .hero h1 { font-size: clamp(2.85rem, 12.6vw, 3.85rem); }
  .hero-actions { column-gap: 8px; }
  .hero-actions .button { min-height: 41px; padding-inline: 11px; font-size: .85rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .category-grid a { gap: 7px; padding-inline: 7px; }
  .category-grid strong { font-size: .88rem; }
  .category-grid .icon-tile { min-width: 31px; height: 33px; }
  .section-title { flex-direction: column; gap: 7px; }
  .tool-head { flex-direction: column; align-items: start; }
  .field-grid { grid-template-columns: 1fr; }
}
@media print {
  .top, .footer, .breadcrumbs, .save-button, .form-actions, .result-copy, .related { display: none !important; }
  .shell { width: 100%; }
  .panel, .result-panel, .result-panel h2, .result-panel .result-status, .result-panel .result-unit { background: white; color: black; }
}
