:root {
  color-scheme: light dark;
  --canvas: light-dark(#f2f5f9, #0c1424);
  --panel: light-dark(#ffffff, #131f32);
  --raised: light-dark(#f6f8fc, #18273c);
  --ink: light-dark(#14223a, #eef4ff);
  --muted: light-dark(#4d5e76, #b4c1d6);
  --line: light-dark(#d5ddea, #31435e);
  --control: light-dark(#8899b1, #7183a2);
  --crimson: light-dark(#9b2542, #ff9cae);
  --crimson-wash: light-dark(#fbecf0, #3b2030);
  --green: light-dark(#146246, #83e6b9);
  --green-wash: light-dark(#eaf7f0, #142e2b);
  --focus: light-dark(#087350, #8befbb);
  --navy: #101c31;
  --white: #f5f7ff;
  --hero-muted: #bac8df;
  --display: 'Iowan Old Style', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --shadow: 0 12px 34px rgb(4 13 30 / 7%);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: .7rem; left: .7rem; translate: 0 -160%; padding: .65rem 1rem; background: var(--panel); color: var(--ink); border-radius: 7px; }
.skip:focus { translate: 0 0; }

.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 69px; }
.brand { display: inline-flex; flex: 0 0 auto; gap: .58rem; align-items: center; color: var(--ink); font-weight: 820; font-size: 1.08rem; letter-spacing: -.043em; text-decoration: none; }
.brand > span > span { color: var(--crimson); }
.brand img { width: 36px; height: 36px; }
.header-inner nav { display: flex; margin-left: auto; gap: clamp(.8rem, 2.8vw, 2.2rem); }
.header-inner nav a, .site-footer nav a { color: var(--muted); font-size: .88rem; font-weight: 690; text-decoration: none; }
.header-inner nav a:hover, .header-inner nav a[aria-current="page"], .site-footer nav a:hover { color: var(--crimson); text-decoration: underline; }
.theme { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-content: center; background: var(--raised); border: 1px solid var(--line); border-radius: 50%; font-size: 1.2rem; }
.theme:hover { border-color: var(--crimson); color: var(--crimson); }
.site-footer { border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner { min-height: 105px; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.35rem; padding-block: 1.2rem; }
.footer-inner .brand img { width: 32px; height: 32px; }
.footer-inner p { color: var(--muted); font-size: .86rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .55rem .85rem; border: 1px solid transparent; border-radius: 8px; font-size: .88rem; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; }
.button.primary { background: #a02445; color: #fff; box-shadow: 0 3px 9px rgb(80 15 32 / 20%); }
.button.primary:hover:not(:disabled) { background: #851938; }
.button.secondary { border-color: var(--line); color: var(--ink); background: var(--panel); }
.button.quiet { background: var(--raised); border-color: var(--line); color: var(--ink); }
.button.secondary:hover:not(:disabled), .button.quiet:hover:not(:disabled) { border-color: var(--crimson); color: var(--crimson); }
.button:disabled { opacity: .56; box-shadow: none; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.hero { background-color: var(--navy); color: var(--white); background-image: linear-gradient(#ffffff07 1px, transparent 1px), linear-gradient(90deg, #ffffff07 1px, transparent 1px); background-size: 46px 46px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; min-height: 510px; padding-block: clamp(2.75rem, 6vw, 5rem); }
.hero :focus-visible { outline-color: #82ecc0; }
.local-label { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.1rem; color: #8de7bd; font-size: .84rem; font-weight: 720; }
.hero h1 { font: 400 clamp(3rem, 6.25vw, 5.1rem)/.99 var(--display); letter-spacing: -.066em; }
.hero h1 em { color: #f393a4; font-weight: inherit; }
.hero-copy > p { max-width: 31rem; margin-top: 1.2rem; color: var(--hero-muted); font-size: clamp(1rem, 1.4vw, 1.18rem); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.35rem; margin-top: 1.7rem; }
.hero-actions .button { min-height: 49px; padding-inline: 1rem; background: #ad2c4b; }
.hero-actions .button:hover { background: #982541; }
.hero-link { color: var(--white); font-size: .9rem; font-weight: 650; }
.hero-link:hover { color: #8de7bd; }
.vault-graphic { background: #15243b; border: 1px solid #3b4f6e; border-radius: 16px; overflow: hidden; box-shadow: 0 25px 44px #080f1f82; }
.vault-caption { background: #182842; color: #c9d6eb; padding: .8rem 1rem; font: 640 .76rem/1.2 var(--mono); border-bottom: 1px solid #354965; display: flex; gap: .5rem; align-items: center; }
.vault-caption .status-dot { color: #71e0ad; }
.vault-diagram { position: relative; height: clamp(13.5rem, 22vw, 18.5rem); display: grid; place-items: center; background-image: linear-gradient(#9876aa13 1px, transparent 1px), linear-gradient(90deg, #9876aa13 1px, transparent 1px); background-size: 28px 28px; }
.vault-ring { position: absolute; border: 1px solid #4f6587; width: min(15.7rem, 75%); aspect-ratio: 1; border-radius: 50%; }
.vault-ring.inner { width: min(12.2rem, 57%); border-style: dashed; }
.vault-paper { position: absolute; width: 108px; height: 141px; border-radius: 9px; }
.vault-paper.back { border: 1px solid #859abb; background: #283f63; transform: translate(17px, -12px) rotate(13deg); }
.vault-paper.middle { border: 1px solid #8297b8; background: #304566; transform: translate(-20px, -6px) rotate(-13deg); }
.vault-paper.front { background: #f1f5ff; color: #8e2642; padding: 16px 14px; transform: translate(-10px, 10px) rotate(-3deg); box-shadow: 0 12px 24px #0b132370; }
.vault-paper.front span { display: inline-block; margin-bottom: 13px; font: 850 .86rem/1 var(--mono); }
.vault-paper.front i { display: block; height: 4px; width: 100%; margin-bottom: 7px; border-radius: 3px; background: #b5c2d8; }
.vault-paper.front i:nth-last-child(2) { width: 75%; }
.vault-paper.front i:last-child { width: 61%; }
.vault-stamp { position: absolute; display: flex; align-items: center; gap: .45rem; right: max(calc(50% - 152px), 12px); bottom: 20%; padding: .48rem .62rem; color: #a3f4cd; background: #163331; border: 1px solid #6cd8a9; border-radius: 6px; font: 750 .73rem/1.2 var(--mono); }
.vault-stamp b { font-size: 1.02rem; line-height: 1; }
.vault-path { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem .65rem; border-top: 1px solid #354965; padding: .75rem .45rem; color: #c4d4ea; font-size: .76rem; }
.vault-path span:nth-child(even) { color: #82e8b8; }

.home-sections { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section + .section { margin-top: clamp(2.7rem, 7vw, 5rem); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1.4rem; margin-bottom: 1.2rem; }
.section-heading h2 { font: 400 clamp(2.1rem, 4vw, 3.15rem)/1.08 var(--display); letter-spacing: -.055em; }
.section-heading p { color: var(--muted); font-size: .97rem; }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.tool-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .65rem; min-height: 123px; padding: .95rem; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; text-decoration: none; }
.tool-card:hover { border-color: var(--crimson); box-shadow: var(--shadow); }
.tool-icon { display: grid; place-content: center; flex: 0 0 auto; background: var(--crimson-wash); color: var(--crimson); border-radius: 7px; width: 32px; height: 32px; font-size: 1.23rem; line-height: 1; font-weight: 700; }
.tool-card:nth-child(2n) .tool-icon { background: var(--green-wash); color: var(--green); }
.tool-card h3 { line-height: 1.18; font-size: .97rem; letter-spacing: -.02em; padding-top: .17rem; }
.tool-card p { margin-top: .4rem; color: var(--muted); font-size: .83rem; line-height: 1.42; }
.card-arrow { color: var(--crimson); font-size: 1rem; line-height: 1.5; }
.case-list { display: grid; gap: .62rem; }
.case-list details { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.case-list summary, .faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-weight: 730; }
.case-list summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.case-list summary { padding: .74rem 1rem; }
.case-list summary:hover, .faq summary:hover { color: var(--crimson); }
.case-list summary span, .faq summary span { flex: 0 0 auto; color: var(--crimson); font-size: 1.25rem; line-height: 1; }
.case-list details[open] summary span, .faq[open] summary span { rotate: 45deg; }
.case-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1.6rem; margin: 0; padding: .15rem 1rem 1rem 2.15rem; }
.case-list li a { color: var(--muted); font-size: .89rem; }
.case-list li a:hover { color: var(--crimson); }

.tool-main, .info-main { padding-block: clamp(1.2rem, 3.4vw, 2.65rem) 4rem; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .6rem; color: var(--muted); margin-bottom: 1rem; font-size: .82rem; }
.crumbs a:hover { color: var(--crimson); }
.tool-intro { margin-bottom: 1.55rem; max-width: 60rem; }
.tool-intro h1 { margin-bottom: .65rem; font: 400 clamp(2.3rem, 4.95vw, 3.8rem)/1.04 var(--display); letter-spacing: -.052em; text-wrap: balance; }
.tool-intro p { max-width: 48rem; color: var(--muted); font-size: clamp(.97rem, 1.5vw, 1.09rem); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(16rem, .84fr); align-items: start; gap: clamp(1rem, 2.7vw, 2rem); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.workspace { overflow: clip; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .52rem 1rem; border-top: 3px solid var(--crimson); border-bottom: 1px solid var(--line); padding: .9rem clamp(.85rem, 2.3vw, 1.45rem); }
.panel-heading h2, .tool-guide h2, .tool-more h2 { font-size: 1.08rem; line-height: 1.25; letter-spacing: -.02em; }
.panel-heading p { display: flex; color: var(--green); align-items: center; gap: .4rem; margin-top: .22rem; font: 650 .75rem/1.25 var(--mono); }
.panel-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
#tool-form { display: grid; gap: .82rem; min-width: 0; padding: .95rem clamp(.85rem, 2.3vw, 1.45rem) 1.13rem; }
.drop { display: grid; min-height: 149px; place-content: center; justify-items: center; gap: .26rem; position: relative; border: 1.5px dashed var(--control); border-radius: 11px; padding: .8rem; background: var(--raised); text-align: center; }
.drop:hover, .drop.dragging, .drop:focus-within { background-color: var(--green-wash); border-color: var(--green); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop-icon { display: grid; place-content: center; background: var(--panel); border: 1px solid var(--line); width: 31px; height: 31px; border-radius: 50%; color: var(--green); font-size: 1.17rem; }
.drop strong { font-size: .94rem; }
.drop-button { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 5px #101c3110; padding: .34rem .72rem; border-radius: 6px; color: var(--ink); font-size: .85rem; font-weight: 720; }
.drop small { color: var(--muted); font-size: .76rem; }
.drop input { cursor: pointer; position: absolute; inset: 0; width: 100%; opacity: 0; }
.drop input:disabled { cursor: wait; }
#tool-form label:not(.drop) { min-width: 0; display: grid; align-content: start; gap: .31rem; font-size: .87rem; font-weight: 710; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.narrow-field { width: min(100%, 15rem); }
input:not([type="file"]), textarea, select { background: var(--raised); border: 1px solid var(--control); border-radius: 7px; min-width: 0; width: 100%; padding: .52rem .63rem; min-height: 42px; font-weight: 480; font-size: .88rem; }
textarea { resize: vertical; font: .82rem/1.55 var(--mono); min-height: 10rem; }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: 1; }
.field-help { color: var(--muted); font-size: .81rem; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .8rem; }
#action-status { font-size: .82rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.notice { font-size: .875rem; border-radius: 7px; padding: .65rem .75rem; border: 1px solid var(--line); background: var(--raised); }
.notice.error { color: var(--crimson); border-color: var(--crimson); background: var(--crimson-wash); overflow-wrap: anywhere; }
noscript .notice { margin: .7rem 1rem 0; }
.row-list { list-style: none; padding-left: 0; margin: 0; }
.row-list li { display: flex; align-items: center; justify-content: space-between; gap: .38rem .7rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.row-detail { min-width: 0; display: grid; gap: .06rem; overflow-wrap: anywhere; }
.row-detail strong { font-size: .86rem; }
.row-detail small { font-size: .77rem; color: var(--muted); }
.row-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .28rem; }
.row-action { min-height: 36px; min-width: 36px; padding: .36rem .45rem; font-size: .78rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem .7rem; }
.page-heading h3 { font-size: .94rem; }
.page-heading span, .pagination span { color: var(--muted); font-size: .8rem; }
.page-row[data-keep="false"] .row-detail strong { color: var(--muted); text-decoration: line-through; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.order-entry { margin-top: .7rem; }
.order-entry summary, .part-list summary, .measurements summary { cursor: pointer; font-size: .87rem; font-weight: 700; }
.order-field { display: flex; align-items: end; gap: .45rem; margin-block: .5rem; }
.order-field label { flex: 1; }

.tool-guide { display: grid; gap: 1.05rem; }
.guide-primary, .guide-privacy { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.05rem; }
.guide-primary { background: var(--panel); }
.guide-primary ol { margin: .75rem 0 0; padding-left: 1.18rem; color: var(--muted); font-size: .91rem; }
.guide-primary li { padding-left: .14rem; }
.guide-primary li + li { margin-top: .32rem; }
.guide-primary li::marker { font-weight: 800; color: var(--crimson); }
.preset-tip { border-top: 1px solid var(--line); margin-top: .65rem; padding-top: .62rem; font-size: .86rem; color: var(--muted); }
.guide-privacy { background: var(--green-wash); }
.guide-privacy h2 { color: var(--green); }
.guide-privacy h2 .status-dot { margin-right: .13rem; margin-bottom: .13rem; }
.guide-privacy p { margin-top: .5rem; color: var(--muted); font-size: .86rem; }
.guide-privacy a { display: inline-block; margin-top: .57rem; color: var(--green); font-size: .83rem; font-weight: 730; }
.tool-more { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(16rem, .84fr); gap: clamp(1rem, 2.7vw, 2rem); margin-top: 1.6rem; }
.tool-more h2 { margin-bottom: .65rem; }
.faq { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: .7rem .85rem; }
.faq summary { font-size: .89rem; }
.faq p { color: var(--muted); font-size: .86rem; margin-top: .46rem; }
.related { margin: 0; padding-left: 1.05rem; color: var(--muted); font-size: .87rem; }
.related li + li { margin-top: .26rem; }
.related a:hover { color: var(--crimson); }

.result { border-top: 1px solid var(--line); padding: 1rem clamp(.85rem, 2.3vw, 1.45rem); background: var(--raised); }
.result h3 { font-size: 1rem; }
#result-summary { margin: .24rem 0 .6rem; font-size: .9rem; color: var(--green); font-weight: 630; }
.downloads { display: flex; flex-wrap: wrap; gap: .43rem; }
.part-list { margin-top: .6rem; }
.part-list .downloads { margin-top: .45rem; }
.inspection, .comparison { margin-top: .7rem; display: grid; gap: .7rem; }
.comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .65rem .7rem; min-width: 0; }
.report-box h4 { font-size: .89rem; margin-bottom: .24rem; }
.report-fields > div { display: grid; grid-template-columns: minmax(0, 5.8rem) minmax(0, 1fr); gap: .4rem; padding: .23rem 0; }
.report-fields > div + div { border-top: 1px solid var(--line); }
.report-fields dt, .stat-grid dt { color: var(--muted); font-size: .76rem; }
.report-fields dd, .stat-grid dd { color: var(--ink); font-size: .8rem; overflow-wrap: anywhere; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.6rem, 1fr)); gap: .35rem; }
.stat-grid > div { border: 1px solid var(--line); border-radius: 7px; padding: .38rem .5rem; background: var(--panel); }
.stat-grid dd { font-weight: 720; }
.table-wrap { overflow: auto; max-height: 19rem; border: 1px solid var(--line); border-radius: 7px; margin-top: .45rem; }
.page-table { border-collapse: collapse; width: 100%; min-width: 18rem; font-size: .78rem; background: var(--panel); text-align: left; }
.page-table th, .page-table td { padding: .36rem .5rem; border-bottom: 1px solid var(--line); }
.page-table th { position: sticky; top: 0; background-color: var(--raised); }
.page-table tbody tr:last-child td { border: 0; }
.info-main { max-width: 850px; }
.info-panel { padding: clamp(.95rem, 3vw, 1.85rem); margin-bottom: 1rem; }
.info-panel h2 { font-size: 1.18rem; letter-spacing: -.028em; }
.info-panel p { margin-top: .29rem; color: var(--muted); font-size: .95rem; }
.info-panel h2:not(:first-child) { margin-top: 1.2rem; }
.not-found { min-height: 55vh; display: grid; align-items: center; }
.not-found .code { color: var(--crimson); font-family: var(--mono); }
.not-found .button { margin-top: 1rem; }

@media (max-width: 1020px) {
  .wrap { width: min(1200px, calc(100% - 48px)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card { min-height: 92px; }
  .hero-inner { min-height: 450px; }
}
@media (max-width: 750px) {
  .wrap { width: calc(100% - 36px); }
  .hero-inner, .tool-layout, .tool-more { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { gap: 1.6rem; min-height: unset; }
  .hero h1 { font-size: clamp(2.75rem, 9vw, 4.7rem); }
  .vault-graphic { width: 100%; max-width: 520px; }
  .tool-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .footer-inner nav { margin-left: 0; }
}
@media (max-width: 520px) {
  .header-inner { display: grid; grid-template-columns: 1fr 40px; gap: .44rem .55rem; padding-block: .52rem; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; margin-left: 0; gap: 1.1rem; }
  .theme { grid-column: 2; grid-row: 1; }
  .hero-inner { padding-block: 2.2rem; }
  .tool-grid, .case-list ul, .tool-guide, .comparison { grid-template-columns: minmax(0, 1fr); }
  .tool-card { min-height: 65px; padding: .72rem; }
  .tool-card p { margin-top: .21rem; }
  .tool-intro h1 { text-wrap: wrap; }
  #tool-form { gap: .7rem; }
  .field-grid.three { gap: .42rem; }
  #tool-form .field-grid.three label { font-size: .79rem; }
  .page-row { flex-wrap: wrap; }
  .row-actions { max-width: 100%; }
  .drop { min-height: 134px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 28px); }
  .page-row .row-actions { flex-basis: 100%; }
  .panel-heading { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
