@font-face {
  font-family: 'Cal Sans';
  src: url('/assets/fonts/CalSans-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #171b35;
  --muted: #62677e;
  --accent: #4338ca;
  --accent-dark: #3327a8;
  --border: #e2e3ee;
  --surface: #f8f8fc;
  --lavender: #eeedff;
  --green: #16785b;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #7666dc; outline-offset: 4px; }
input::placeholder, textarea::placeholder { color: #70758b; opacity: 1; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
h2 { font-size: 28px; line-height: 1.35; font-weight: 650; letter-spacing: -.6px; }
.container { width: 100%; max-width: 1240px; padding: 0 32px; margin: 0 auto; }
.icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; background: #fff; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid #ececf4; background: #fff; position: relative; z-index: 5; }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; flex: none; align-items: center; min-height: 44px; }
.brand-logo { display: block; width: 228px; height: auto; }
.site-header .brand-logo { width: 210px; }
.header-inner .header-nav { display: flex; align-items: center; gap: 4px; padding: 0; color: #55596f; font-size: 14px; font-weight: 500; }
.header-nav > a, .header-resources > summary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 14px; border-radius: 9px; white-space: nowrap; transition: background .15s, color .15s; }
.header-nav > a:hover, .header-resources > summary:hover, .header-resources[open] > summary { color: var(--accent); background: #f5f3ff; }
.header-nav > a:focus-visible, .header-resources > summary:focus-visible { outline-offset: 1px; }
.breadcrumb a:hover { color: var(--accent); }
.header-resources { position: relative; }
.header-resources > summary { list-style: none; cursor: pointer; }
.header-resources > summary::-webkit-details-marker { display: none; }
.header-nav > a > .icon, .header-resources > summary > .icon { width: 16px; height: 16px; color: #7b7192; }
.header-resources > summary > span { display: inline-flex; align-items: center; gap: 5px; }
.header-resources > summary .nav-chevron { width: 13px; height: 13px; transition: transform .15s; }
.header-resources[open] > summary .nav-chevron { transform: rotate(180deg); }
.resources-menu { position: absolute; top: calc(100% + 18px); right: -12px; width: 492px; max-width: calc(100vw - 40px); padding: 22px 14px 0; border: 1px solid #e5e4ef; border-radius: 18px; background: #fff; box-shadow: 0 18px 60px #2420441c, 0 3px 10px #24204405; }
.resources-heading { display: block; padding: 0 12px 14px; color: #73768b; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; }
.resources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.resources-grid > a { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 10px; min-height: 72px; }
.resources-grid > a:hover { background: #f5f4ff; }
.resource-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; color: #6555b7; background: #f3f1fc; border: 1px solid #ece8f7; border-radius: 10px; }
.resource-icon .icon { width: 18px; height: 18px; }
.resources-grid strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.resources-grid small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: #71758b; }
.resources-menu .resources-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; margin-top: 15px; padding: 14px 12px; border-top: 1px solid #eeedf5; font-size: 12px; color: #6555b7; }
.resources-footer .icon { width: 17px; height: 17px; }
.saved-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 15px; border: 1px solid #e4e2f0; border-radius: 12px; font-size: 13px; font-weight: 550; white-space: nowrap; color: #5e5874; background: #fff; transition: border-color .15s, background .15s; }
.saved-link:hover { color: var(--accent); border-color: #cac4e8; background: #f8f7ff; }
.saved-link .icon { width: 18px; height: 18px; }
.hero { background: radial-gradient(ellipse at 88% 30%,#eeecff 0%,#f8f7ff 38%,#fafafd 75%); padding: 70px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 76px; align-items: center; padding-bottom: 64px; }
.hero-copy { min-width: 0; }
.hero h1 { font-family: 'Cal Sans', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: clamp(48px,5.2vw,72px); letter-spacing: -1.8px; line-height: 1.06; font-weight: 400; margin-bottom: 24px; }
.hero h1 > span { color: var(--accent); }
.hero-copy > p { color: #707188; font-size: 17px; line-height: 1.8; margin-bottom: 28px; }
.search-box { display: flex; align-items: center; background: #fff; border: 1px solid #dcd8ef; border-radius: 16px; padding: 8px 8px 8px 20px; box-shadow: 0 8px 32px #4338ca0b, 0 2px 5px #171b3503; gap: 13px; min-height: 72px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within, .filter-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #4338ca14; }
.search-box > .icon { color: #77708e; width: 22px; height: 22px; }
.search-box input { background: none; border: none; min-width: 0; width: 100%; font-size: 16px; padding: 12px 0; color: var(--ink); }
.search-box input:focus-visible, .filter-search input:focus-visible { outline: 0; }
.search-box input::placeholder { color: var(--muted); }
.search-box kbd { color: #81788e; font: 13px ui-monospace, monospace; background: #faf9fd; border: 1px solid #ebe7f2; border-radius: 5px; padding: 2px 7px; }
.search-box button { background: var(--accent); border: 1px solid var(--accent); border-radius: 11px; color: #fff; padding: 14px 19px; min-height: 54px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 13px; box-shadow: 0 3px 8px #4338ca20; transition: background .15s; }
.search-box button > .icon { width: 18px; height: 18px; }
.search-box button:hover, .primary-button:hover { background: var(--accent-dark); }
.quick-links { margin-top: 20px; display: flex; align-items: center; gap: 13px; }
.quick-links > span { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.quick-link-list { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; color: #656078; background: #ffffffa6; padding: 7px 12px; font-size: 12px; border: 1px solid #e4e0ef; border-radius: 999px; transition: border-color .15s, color .15s, background .15s; }
.quick-links a > .icon { width: 12px; height: 12px; color: #968aad; }
.quick-links a:hover { border-color: #bcb2e8; color: var(--accent); background: #fff; }
.quick-links a:hover > .icon { color: var(--accent); }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 23px; font-size: 11px; color: var(--muted); }
.hero-note > .icon { width: 14px; height: 14px; color: #5f907c; }
.hero-note > span { color: #b8b0c6; margin: 0 1px; }
.hero-collection { border: 1px solid #e0dced; background: #ffffffb3; border-radius: 24px; padding: 28px 28px 0; max-width: 440px; width: 100%; justify-self: end; box-shadow: 0 22px 60px #3c30a209; }
.collection-label { display: flex; gap: 9px; align-items: center; color: #6d6283; font-size: 12px; letter-spacing: 1px; font-weight: 650; }
.collection-line { width: 22px; height: 2px; background: #8c7ccc; flex: none; }
.hero-collection h2 { font-size: 30px; line-height: 1.25; letter-spacing: -.8px; margin: 20px 0 12px; }
.hero-collection > p { color: #6d6283; font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.collection-list { display: flex; flex-direction: column; gap: 10px; }
.collection-list > a { display: flex; align-items: center; gap: 12px; border: 1px solid #e5e1ee; background: #fff; border-radius: 10px; padding: 14px 12px; transition: border-color .15s; }
.collection-list > a:hover { border-color: #aaa0d7; }
.collection-list > a > span:nth-child(2) { min-width: 0; }
.collection-icon { height: 40px; width: 40px; flex: none; border-radius: 9px; background: #f2effb; color: #715aab; display: flex; align-items: center; justify-content: center; }
.collection-icon > .icon { height: 20px; width: 20px; }
.collection-list strong { display: block; font-size: 15px; color: #443b55; font-weight: 600; line-height: 1.4; }
.collection-list small { display: block; font-size: 13px; color: #746a84; margin-top: 4px; line-height: 1.5; }
.collection-list > a > .icon { margin-left: auto; height: 17px; width: 17px; color: #7f718f; }
.collection-footer { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 0; color: #6d6283; font-size: 13px; min-height: 44px; }
.collection-footer > .icon { height: 16px; width: 16px; color: var(--green); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; border-top: 1px solid #e4e2ee; padding-top: 22px; padding-bottom: 22px; }
.hero-stats > div { display: flex; gap: 9px; align-items: baseline; }
.hero-stats strong { font-size: 22px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 14px; color: var(--muted); }
.hero-stats > a { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-height: 44px; }
.hero-stats > a .icon { width: 18px; }
.category-section { padding-top: 56px; padding-bottom: 48px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.overline { color: var(--muted); font-size: 12px; letter-spacing: 1.3px; font-weight: 650; display: block; margin-bottom: 8px; line-height: 1.5; }
.section-heading h2 { margin: 0; }
.text-link { color: var(--accent); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.text-link > .icon { width: 18px; }
.category-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }
.category-card { border: 1px solid var(--border); border-radius: 12px; padding: 22px 18px 18px; transition: border-color .15s, transform .15s; display: flex; flex-direction: column; min-width: 0; }
.category-card:hover { border-color: #b9afe5; transform: translateY(-3px); }
.tool-icon { display: flex; width: 44px; height: 44px; flex: none; border-radius: 11px; background: #f1f0fd; color: var(--accent); align-items: center; justify-content: center; }
.tool-icon.finance { background: #efefff; color: #5547c8; }
.tool-icon.math { background: #edf5fd; color: #3975ac; }
.tool-icon.health { background: #eef8f3; color: #2d7f5c; }
.tool-icon.education { background: #fff7e9; color: #91712b; }
.tool-icon.units { background: #f6effc; color: #8952a0; }
.tool-icon.code { background: #edf4f7; color: #447181; }
.category-card h3 { font-size: 16px; margin: 18px 0 8px; font-weight: 650; line-height: 1.45; letter-spacing: -.2px; }
.category-card p { font-size: 14px; color: var(--muted); margin: 0 0 20px; line-height: 1.6; }
.category-card small { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: 13px; color: var(--muted); }
.category-card small > .icon { width: 17px; height: 17px; }
.tools-section { padding-bottom: 56px; }
.muted { color: var(--muted); font-size: 14px; }
.library-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; background: #fff; min-width: 240px; flex: 1; min-height: 48px; }
.filter-search > .icon { width: 19px; height: 19px; color: var(--muted); }
.filter-search input { min-width: 0; border: 0; font-size: 16px; width: 100%; color: var(--ink); background: transparent; }
.library-toolbar select { max-width: 300px; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-size: 16px; min-height: 48px; color: #55596f; background: #fff; }
.inventory-toggle { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); padding: 8px 0; min-height: 44px; cursor: pointer; }
.inventory-toggle input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.tool-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.tool-card { border: 1px solid var(--border); border-radius: 14px; background: #fff; position: relative; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .15s, border-color .15s; }
.tool-card:hover { border-color: #b9afe5; box-shadow: 0 7px 26px #171b3508; }
.tool-card:focus-within { border-color: var(--accent); }
.card-top { padding: 20px 20px 0; display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.star-button { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 8px; color: #71758d; width: 44px; height: 44px; padding: 10px; margin: -4px -6px 0 0; }
.star-button:hover { background: var(--lavender); color: var(--accent); }
.star-button .icon { width: 20px; height: 20px; }
.is-saved { color: var(--accent) !important; }
.is-saved .icon { fill: #eeedff; }
.card-link { padding: 18px 20px 20px; display: flex; flex: 1; flex-direction: column; min-width: 0; }
.card-category { font-size: 12px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.card-link h3 { font-size: 18px; letter-spacing: -.3px; font-weight: 650; line-height: 1.45; margin-bottom: 10px; overflow-wrap: anywhere; }
.card-link p { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; border-top: 1px solid #ededf5; padding-top: 14px; font-size: 12px; color: var(--muted); }
.card-bottom > span { display: flex; align-items: center; gap: 6px; }
.card-bottom > span > .icon { width: 16px; height: 16px; color: var(--green); }
.card-bottom > .icon { width: 18px; height: 18px; color: #756b95; }
.status-pending { font-size: 12px; padding: 5px 8px; color: #795723; background: #faf4e9; border-radius: 5px; text-align: center; }
.pending-card { background: #fcfcfd; }
.pending-card .tool-icon { color: #727183; background: #f1f1f5; }
.inventory-explanation { font-size: 14px; color: var(--muted); padding: 14px 16px; border-radius: 9px; background: var(--surface); margin-bottom: 20px; }
.inventory-explanation button { min-height: 44px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 32px; font-size: 14px; color: var(--muted); }
.pagination button { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.pagination button:hover:enabled { border-color: var(--accent); color: var(--accent); }
.pagination .icon { width: 18px; height: 18px; }
.trust-section { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; width: calc(100% - 64px); max-width: 1176px; margin-bottom: 56px; }
.trust-icon { background: #eae8fc; color: var(--accent); height: 56px; width: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.trust-icon .icon { height: 26px; width: 26px; }
.trust-section h2 { font-size: 24px; margin-bottom: 8px; }
.trust-section p { font-size: 15px; color: var(--muted); max-width: 650px; margin: 0; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d4cde8; color: #514389; border-radius: 9px; background: #fff; padding: 10px 14px; font-size: 14px; min-height: 44px; }
.outline-button:hover { border-color: var(--accent); background: #faf9ff; }
.outline-button > .icon { width: 19px; height: 19px; }
.trust-section .outline-button { margin-left: auto; flex: none; }
.site-footer { background: #fafafd; border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 24px; }
.footer-top .brand-logo { width: 196px; margin-bottom: 8px; }
.footer-top p { font-size: 14px; color: var(--muted); margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; }
.footer-links a:hover { color: var(--accent); }
.footer-links .icon { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.calculator-page { padding-top: 28px; padding-bottom: 56px; }
.breadcrumb { display: flex; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; overflow-wrap: anywhere; }
.breadcrumb a { padding: 4px 0; }
.calculator-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.calculator-heading > div { min-width: 0; flex: 1; }
.calculator-heading .tool-icon { width: 56px; height: 56px; border-radius: 13px; }
.calculator-heading h1 { font-size: clamp(28px,3vw,36px); letter-spacing: -.8px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.calculator-heading .outline-button { margin-left: auto; flex: none; }
.calculator-intro { color: var(--muted); font-size: 16px; margin: 18px 0 28px; max-width: 85ch; }
.calculator-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 24px; align-items: start; }
.calculator-panel { border: 1px solid var(--border); border-radius: 16px; background: #fff; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 22px 28px; border-bottom: 1px solid var(--border); background: #fafafd; border-radius: 16px 16px 0 0; }
.panel-heading h2 { font-size: 20px; letter-spacing: -.3px; margin: 0; }
.panel-heading span { font-size: 13px; color: var(--muted); }
#calculator-form { padding: 28px; }
.number-help { font-size: 14px; color: var(--muted); margin: 0 0 24px; line-height: 1.7; padding: 12px 14px; background: var(--surface); border-radius: 8px; }
.field { margin-bottom: 22px; min-width: 0; }
.field > label { display: block; font-size: 16px; font-weight: 600; color: #454b63; margin-bottom: 8px; line-height: 1.5; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid #d3d5e3; border-radius: 8px; background: #fff; padding: 12px 14px; font-size: 16px; color: var(--ink); min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field [aria-invalid=true] { border-color: #b53a45; background: #fffafa; }
.field textarea { resize: vertical; min-height: 136px; }
.field small { display: block; font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.65; overflow-wrap: anywhere; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 9px; color: #fff; background: var(--accent); padding: 13px 24px; min-height: 48px; font-size: 16px; font-weight: 600; }
.primary-button .icon { width: 20px; height: 20px; }
.reset-button { border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 15px; padding: 12px 16px; min-height: 48px; }
.reset-button:hover { background: var(--surface); color: var(--ink); }
.form-error { font-size: 15px; color: #a32b36; background: #fff3f3; border: 1px solid #f1cdd1; border-radius: 8px; padding: 12px 14px; margin-bottom: 20px; }
.result-panel { border: 1px solid #ded9f0; border-radius: 16px; background: #f8f7ff; padding: 28px; position: sticky; top: 24px; min-width: 0; }
.result-panel > .overline { color: #75678f; }
.result-placeholder { color: #65567e; padding: 44px 0; text-align: center; }
.result-placeholder > .icon { width: 44px; height: 44px; margin-bottom: 18px; color: #7767a6; }
.result-placeholder h2 { font-size: 20px; letter-spacing: -.3px; margin-bottom: 12px; }
.result-placeholder p { font-size: 15px; color: #75678f; margin: 0; }
.result-label { display: block; margin: 20px 0 8px; color: #6b5e83; font-size: 15px; }
.result-value { font-size: clamp(32px,3.5vw,44px); line-height: 1.35; font-weight: 700; letter-spacing: -1px; color: var(--accent); overflow-wrap: anywhere; white-space: pre-wrap; font-variant-numeric: tabular-nums; }
.result-value > span { font-weight: 500; font-size: 18px; letter-spacing: 0; margin-left: 8px; }
.result-value.is-text { font-family: ui-monospace,SFMono-Regular,monospace; font-size: 16px; letter-spacing: 0; max-height: 450px; overflow: auto; background: #f1effa; border-radius: 8px; padding: 14px; line-height: 1.7; }
.result-details { margin: 24px 0 0; }
.result-details > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 12px 20px; padding: 13px 0; border-top: 1px solid #e1ddee; font-size: 15px; align-items: start; }
.result-details dt { color: #746784; overflow-wrap: anywhere; }
.result-details dd { margin: 0; color: #473c5d; text-align: right; overflow-wrap: anywhere; white-space: pre-wrap; font-variant-numeric: tabular-nums; }
.result-note { display: flex; align-items: start; gap: 9px; margin: 24px 0 0; font-size: 14px; color: #75678f; line-height: 1.7; }
.result-note > .icon { width: 18px; height: 18px; margin-top: 3px; }
.copy-button { background: #fff; border: 1px solid #d4cde8; border-radius: 8px; font-size: 14px; min-height: 44px; padding: 10px 14px; margin-top: 24px; color: #65517f; }
.copy-button:hover { border-color: var(--accent); color: var(--accent); }
.result-table-wrap { overflow: auto; max-height: 480px; margin-top: 20px; border: 1px solid #ded8ec; border-radius: 9px; overscroll-behavior-x: contain; }
table { border-collapse: collapse; font-size: 14px; width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid #e1dcee; padding: 12px; white-space: nowrap; }
th { color: #625274; background: #eeebf6; position: sticky; top: 0; font-weight: 600; }
.method-section { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 40px; padding: 36px 0; margin-top: 32px; border-top: 1px solid var(--border); }
.method-section > div { min-width: 0; }
.method-section h2 { font-size: 24px; margin-bottom: 16px; }
.method-section p { font-size: 16px; color: var(--muted); line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.validation-note { display: flex; align-items: start; gap: 9px; font-size: 14px; color: #3c725c; line-height: 1.7; }
.validation-note > .icon { width: 18px; height: 18px; margin-top: 3px; }
.source-box { background: #fafafd; border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; align-self: start; }
.source-box h3 { font-size: 17px; margin-bottom: 12px; font-weight: 600; }
.source-box a { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: #67557e; padding: 12px 0; border-bottom: 1px solid var(--border); min-height: 44px; overflow-wrap: anywhere; }
.source-box a:hover { color: var(--accent); }
.source-box a:last-child { border: 0; }
.source-box .icon { width: 18px; height: 18px; }
.source-box p { font-size: 14px; margin: 0; color: var(--muted); }
.related-section { padding-top: 24px; }
.related-section h2 { font-size: 24px; margin-bottom: 24px; }
.prose-page { max-width: 950px; padding-top: 60px; padding-bottom: 72px; }
.prose-page h1 { font-size: clamp(32px,4vw,44px); letter-spacing: -1px; line-height: 1.25; margin-bottom: 24px; }
.prose-page h2 { font-size: 24px; margin-top: 36px; margin-bottom: 14px; }
.prose-page > p { color: var(--muted); font-size: 16px; line-height: 1.9; max-width: 78ch; }
.prose-page .lead { font-size: 20px; color: #615777; max-width: 72ch; line-height: 1.8; }
.pending-title { font-size: clamp(28px,3vw,36px); line-height: 1.35; letter-spacing: -.8px; max-width: 32ch; overflow-wrap: anywhere; }
.pending-panel { padding: 32px; border: 1px solid #e7dfce; background: #fdfbf7; border-radius: 14px; max-width: 800px; }
.pending-panel h2 { font-size: 24px; margin: 20px 0 16px; }
.pending-panel p { color: #70634f; font-size: 16px; max-width: 68ch; line-height: 1.8; overflow-wrap: anywhere; }
.pending-panel .primary-button { margin-top: 12px; }
.empty-state { grid-column: 1/-1; padding: 40px 24px; text-align: center; border: 1px dashed #c9c0df; border-radius: 14px; color: #75678f; }
.empty-state > .icon { width: 40px; height: 40px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; color: #514362; }
.empty-state p { font-size: 15px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); border-radius: 10px; background: var(--ink); color: #fff; font-size: 15px; padding: 12px 20px; box-shadow: 0 4px 20px #0002; z-index: 20; width: max-content; max-width: calc(100% - 32px); text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .hero-grid { gap: 40px; }
  .header-inner .header-nav { font-size: 13px; }
  .header-nav > a, .header-resources > summary { padding: 8px 11px; }
  .site-header .brand-logo { width: 190px; }
  .header-inner { gap: 16px; }
  .header-inner nav { gap: 16px; }
  .brand-logo { width: 212px; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tool-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .trust-section { flex-wrap: wrap; }
  .trust-section > div:nth-child(2) { flex: 1; }
  .trust-section .outline-button { margin-left: 80px; }
}
@media (max-width: 1000px) {
  .saved-link { width: 44px; height: 44px; padding: 10px; }
  .saved-link > span { display: none; }
}
@media (max-width: 850px) {
  .header-inner { flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; gap: 8px 16px; position: relative; }
  .header-inner .header-nav { order: 3; width: 100%; justify-content: center; gap: 4px; padding: 0; }
  .header-nav > a, .header-resources > summary { min-height: 40px; padding: 8px 18px; }
  .header-resources { position: static; }
  .resources-menu { top: calc(100% - 2px); right: 32px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 40px; gap: 32px; }
  .hero-copy { max-width: 680px; }
  .hero h1 { font-size: 64px; }
  .hero-collection { justify-self: stretch; max-width: none; }
  .hero-collection h2 br, .hero-collection > p br { display: none; }
  .hero-stats { gap: 12px 24px; }
  .hero-stats > a { margin-left: 0; width: 100%; }
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-top { align-items: start; }
  .footer-links { flex-direction: column; gap: 0; }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .method-section { grid-template-columns: 1fr; gap: 24px; }
  .calculator-heading .tool-icon { display: none; }
  .calculator-heading { align-items: start; }
  .calculator-heading .outline-button { margin-top: 4px; }
}
@media (max-width: 600px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .header-inner .header-nav { gap: 2px; font-size: 11px; }
  .header-nav > a, .header-resources > summary { flex: 1; flex-direction: column; gap: 4px; min-height: 50px; padding: 5px 7px; }
  .header-resources { flex: 1; }
  .header-resources > summary { width: 100%; gap: 4px; }
  .resources-menu { right: 20px; }
  .saved-link { width: 44px; height: 44px; padding: 10px; }
  .saved-link > span { display: none; }
  .site-header .brand-logo { width: 182px; }
  .brand-logo { width: 184px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: clamp(42px,8.8vw,54px); letter-spacing: -1.3px; margin-bottom: 20px; }
  .hero-copy > p { font-size: 16px; }
  .desktop-break { display: none; }
  .search-box { padding: 7px 7px 7px 14px; gap: 9px; min-height: 66px; border-radius: 14px; }
  .search-box kbd { display: none; }
  .search-box button { min-height: 50px; padding: 11px 14px; font-size: 13px; }
  .search-box button > .icon { display: none; }
  .quick-links { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 18px; }
  .quick-link-list { gap: 7px; }
  .quick-links a { min-height: 40px; padding: 8px 11px; }
  .hero-note { margin-top: 20px; }
  .hero-collection { padding: 24px 20px 0; border-radius: 18px; }
  .hero-collection h2 { font-size: 26px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-stats > div { flex-direction: column; gap: 0; }
  .hero-stats > a { grid-column: 1/-1; }
  .hero-stats strong { font-size: 24px; }
  .category-section { padding-top: 40px; padding-bottom: 40px; }
  h2, .section-heading h2 { font-size: 25px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .category-card { padding: 18px 16px; }
  .tool-grid { grid-template-columns: 1fr; gap: 16px; }
  .library-toolbar { gap: 12px; }
  .filter-search { min-width: 100%; }
  .library-toolbar select { width: 100%; max-width: none; }
  .inventory-toggle { width: 100%; }
  .tools-section { padding-bottom: 40px; }
  .trust-section { width: calc(100% - 40px); padding: 24px; gap: 16px; margin-bottom: 40px; }
  .trust-icon { height: 44px; width: 44px; border-radius: 11px; }
  .trust-section > div:nth-child(2) { flex: 1; min-width: 0; }
  .trust-section .outline-button { margin-left: 0; width: 100%; }
  .footer-top { flex-direction: column; gap: 20px; }
  .footer-links { flex-direction: row; gap: 8px 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .calculator-page { padding-top: 20px; padding-bottom: 40px; }
  .breadcrumb { margin-bottom: 24px; }
  .calculator-heading { flex-wrap: wrap; gap: 16px; }
  .calculator-heading > div { flex-basis: 100%; }
  .calculator-heading h1 { font-size: 28px; }
  .calculator-heading .outline-button { margin: 0; }
  .calculator-intro { margin: 16px 0 24px; }
  .panel-heading { padding: 20px; }
  #calculator-form, .result-panel { padding: 20px; }
  .form-actions .primary-button { flex: 1; }
  .result-value { font-size: 34px; }
  .method-section { padding-top: 28px; margin-top: 28px; }
  .source-box { padding: 20px; }
  .prose-page { padding-top: 40px; padding-bottom: 48px; }
  .prose-page .lead { font-size: 18px; }
  .pending-panel { padding: 24px; }
  .pending-panel .primary-button { width: 100%; }
  .pagination { gap: 12px; }
  .pagination button { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .saved-link { font-size: 13px; gap: 6px; }
  .brand-logo { width: 164px; }
  .header-inner { column-gap: 8px; }
  .header-inner .header-nav { gap: 0; font-size: 11px; }
  .header-nav > a, .header-resources > summary { padding: 7px 6px; }
  .resources-menu { right: 16px; max-width: calc(100vw - 32px); padding: 18px 10px 0; }
  .resources-grid { gap: 2px; }
  .resources-grid > a { gap: 8px; padding: 10px 8px; }
  .resource-icon { width: 28px; height: 32px; }
  .resources-grid strong { font-size: 13px; }
  .resources-grid small { font-size: 10px; }
  .hero h1 { font-size: 40px; }
  .category-card { padding: 16px 12px; }
  .category-card h3 { font-size: 15px; }
  .collection-list > a { gap: 10px; }
  .collection-icon { width: 32px; height: 36px; }
  .collection-list > a > .icon { display: none; }
  .collection-footer { justify-content: flex-start; }
  .trust-section { width: calc(100% - 32px); }
  .pagination { gap: 8px; }
  .pagination .icon { display: none; }
  .result-details > div { grid-template-columns: 1fr; gap: 4px; }
  .result-details dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.result-table-wrap caption { padding: 12px; color: #625274; font-size: 14px; text-align: left; background: #f4f1fa; }
td.result-text-cell { white-space: normal; overflow-wrap: anywhere; min-width: 140px; max-width: 320px; vertical-align: top; }
.collection-list small, .collection-footer, .category-card small, .card-category, .card-bottom, .status-pending, .footer-bottom, .panel-heading span { font-size: 14px; }
@media (max-width: 380px) { .header-inner nav, .saved-link { font-size: 14px; } }
.result-panel:has(.result-table-wrap), .result-panel:has(.result-value.is-text), .result-panel:has(.result-details > div:nth-child(7)) { position: static; }
.share-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 28px; font-size: 14px; color: var(--muted); }
.share-tools > span { margin-right: 4px; }
.share-tools button, .share-tools a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #514389; font-size: 14px; }
.share-tools button:hover, .share-tools a:hover { border-color: var(--accent); background: #faf9ff; }
.category-index { max-width: 1240px; }
.category-index .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 32px; gap: 20px; }
.category-index .category-card h2 { font-size: 20px; line-height: 1.4; margin: 18px 0 10px; }
.category-index .category-card p { font-size: 15px; }
.category-page h1 { font-size: clamp(28px,3vw,36px); line-height: 1.3; letter-spacing: -.8px; }
.category-page .section-heading { gap: 12px 24px; flex-wrap: wrap; }
.category-page .section-heading h2 { font-size: 24px; margin-bottom: 0; }
.category-search .filter-search { flex-basis: 320px; }
.category-search .outline-button { min-height: 48px; }
.category-jump { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }
.category-jump a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; color: var(--accent); font-size: 15px; }
.category-directory { padding-top: 32px; padding-bottom: 40px; margin-top: 32px; border-top: 1px solid var(--border); }
.category-directory h2 { font-size: 24px; margin-bottom: 12px; }
.category-directory p { font-size: 16px; color: var(--muted); }
.category-directory > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.category-directory a { display: flex; align-items: center; min-height: 48px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 9px; color: #514389; font-size: 15px; line-height: 1.5; }
.category-directory a:hover { border-color: var(--accent); background: #faf9ff; }
.calculator-guide { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; margin: 28px 0 16px; }
.guide-section { min-width: 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.guide-section h2 { font-size: 24px; margin-bottom: 16px; }
.guide-section p { font-size: 16px; color: var(--muted); line-height: 1.85; overflow-wrap: anywhere; }
.guide-section p:last-child { margin-bottom: 0; }
.worked-example, .faq-section { grid-column: 1/-1; }
.example-inputs { margin: 24px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 32px; }
.example-inputs > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.example-inputs dt { color: var(--muted); overflow-wrap: anywhere; }
.example-inputs dd { margin: 0; text-align: right; overflow-wrap: anywhere; white-space: pre-wrap; font-variant-numeric: tabular-nums; }
.example-answer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; padding: 20px; border-radius: 10px; background: var(--lavender); color: #65517f; }
.example-answer strong { font-size: 26px; line-height: 1.45; color: var(--accent); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; min-width: 0; }
.worked-example ol { padding-left: 24px; margin: 24px 0 0; color: var(--muted); font-size: 16px; }
.worked-example li { padding-left: 4px; margin-bottom: 10px; overflow-wrap: anywhere; }
.faq-section details { border-top: 1px solid var(--border); }
.faq-section summary { padding: 18px 28px 18px 0; min-height: 48px; font-size: 16px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.faq-section summary::marker { color: var(--accent); }
.faq-section details[open] summary { color: var(--accent); }
.faq-section details p { padding: 0 0 20px; margin: 0; }
@media (max-width: 850px) {
  .category-index .category-grid, .category-directory > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calculator-guide { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .category-index .category-grid { grid-template-columns: 1fr; }
  .category-directory > div { grid-template-columns: 1fr; }
  .guide-section { padding: 20px; }
  .example-inputs { grid-template-columns: 1fr; }
  .example-answer { flex-direction: column; align-items: stretch; }
  .share-tools > span { width: 100%; }
}
@media (max-width: 380px) {
  .example-inputs > div { grid-template-columns: 1fr; gap: 4px; }
  .example-inputs dd { text-align: left; }
}

.share-link-fallback{flex-basis:100%;padding:12px;border:1px solid var(--border);border-radius:8px;max-width:100%;font-size:14px}
.result-table-wrap th, .result-table-wrap td { text-align: right; }
.result-table-wrap td.result-text-cell { text-align: left; }


.calculator-intro { overflow-wrap: anywhere; }
.search-box button { flex: none; white-space: nowrap; }
.field input[type=file] { padding: 10px; }
.field input[type=file]::file-selector-button { font: inherit; min-height: 36px; padding: 6px 12px; margin-right: 12px; border: 0; border-radius: 6px; background: var(--lavender); color: var(--accent); cursor: pointer; }
.file-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.file-downloads a { overflow-wrap: anywhere; max-width: 100%; }

.generated-preview{display:block;max-width:100%;width:320px;height:auto;margin:20px auto;background:#fff}.file-downloads{display:flex;flex-wrap:wrap;gap:10px}.file-downloads .outline-button{max-width:100%;overflow-wrap:anywhere}
