:root {
  color-scheme: light;
  --ink: #172b35;
  --muted: #5d737c;
  --blue: #153b5b;
  --teal: #087c75;
  --accent: #126c72;
  --border: #dce8e8;
  --bg: #f4f8f7;
  --paper: #ffffff;
  --shadow: 0 18px 55px rgba(22, 55, 57, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.site-header { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 11px; color: var(--blue); font-size: 19px; font-weight: 800; letter-spacing: -.035em; }
.brand-icon { width: 36px; height: 36px; background: #e4f5f0; border-radius: 10px; display: grid; place-items: center; }
.brand-icon svg { width: 23px; height: 23px; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover, .top-nav a.active { color: var(--teal); }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; color: var(--teal); }
.hero { padding: 72px 0 44px; }
.hero h1 { max-width: 780px; margin: 14px 0 15px; font-size: clamp(37px,5.5vw,59px); line-height: 1.09; letter-spacing: -.055em; color: var(--blue); }
.hero p { color: var(--muted); font-size: 17px; max-width: 700px; margin: 0; }
.hero-copy { max-width: 760px; }
.hero-tight { padding: 52px 0 28px; }
.hero-tight h1 { font-size: clamp(34px,4.5vw,52px); }
.inline-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; color: #42646a; font-size: 13px; }
.note-pill { border: 1px solid #c9e2de; background: #e8f5f1; color: #196a64; border-radius: 30px; font-weight: 650; padding: 5px 12px; }
.section-heading { display: flex; gap: 20px; justify-content: space-between; align-items: end; margin-bottom: 19px; }
.section-heading h2 { margin: 0 0 5px; color: var(--blue); font-size: 24px; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 70px; }
.tool-card { padding: 28px; min-height: 240px; background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tool-card .symbol { font-size: 27px; line-height: 1; margin-bottom: 25px; }
.tool-card h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.03em; }
.tool-card p { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.tool-card .tool-link { color: var(--teal); text-decoration: none; font-size: 14px; font-weight: 750; margin-top: auto; }
.tool-card .muted-link { color: #8a9ba0; font-weight: 650; margin-top: auto; font-size: 13px; }
.workbench { display: grid; grid-template-columns: minmax(275px,340px) minmax(0,1fr); align-items: start; gap: 22px; padding-bottom: 70px; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }
.controls { padding: 28px; }
.panel-title { margin: 0 0 5px; font-size: 20px; color: var(--blue); letter-spacing: -.03em; }
.panel-subtitle { color: var(--muted); font-size: 13px; margin: 0 0 27px; }
.field { margin: 0 0 20px; }
.field label { display: block; font-size: 14px; font-weight: 750; margin-bottom: 8px; }
.field input { width: 100%; border: 1px solid #c9d8db; border-radius: 10px; padding: 12px 14px; font-size: 16px; color: var(--ink); background: white; outline: none; }
.field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,124,117,.12); }
.field small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.primary-button { width: 100%; background: var(--teal); color: #fff; border: 1px solid var(--teal); border-radius: 10px; font-weight: 750; padding: 13px 16px; }
.primary-button:hover { background: #096c65; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.secondary-button { border: 1px solid #c8dddc; background: #fff; padding: 10px 14px; color: var(--blue); font-weight: 700; border-radius: 9px; font-size: 13px; }
.secondary-button:hover { background: #eef8f5; }
.hint-box { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 25px; color: var(--muted); font-size: 12px; }
.results { padding: 27px; min-width: 0; }
.result-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 12px; margin-bottom: 21px; }
.status { padding: 11px 13px; border-radius: 9px; background: #e9f6f1; color: #247064; font-size: 12px; margin-bottom: 21px; }
.status.error { background: #fff0ed; color: #a73d2e; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0 0 17px; }
.stat { background: #f4f8f8; padding: 15px; border-radius: 10px; }
.stat small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; }
.stat strong { display: block; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .small-sub { display: block; font-size: 11px; color: var(--muted); }
.base-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.base-stat { border: 1px solid var(--border); border-radius: 8px; text-align: center; padding: 8px 5px; }
.base-stat b { display: block; font-size: 14px; }
.base-stat span { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }
.base-a { color: #c36b2a; } .base-t { color: #6a5cab; } .base-g { color: #087b68; } .base-c { color: #277aa4; }
.preview-frame { border: 1px solid var(--border); border-radius: 10px; overflow: auto; background: #fcfefd; }
.preview-frame pre { font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace; font-size: 12px; white-space: pre; line-height: 1.85; margin: 0; min-width: max-content; padding: 16px; letter-spacing: .015em; }
.line-number { color: #9badb2; user-select: none; }
.preview-note { margin-top: 10px; color: var(--muted); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions[hidden], .result-panel[hidden], .empty-state[hidden] { display: none; }
.empty-state { text-align: center; padding: 45px 16px; border: 1px dashed #c9dddd; border-radius: 12px; color: var(--muted); }
.empty-state svg { width: 46px; height: 46px; margin-bottom: 10px; color: #7aa8a2; }
.empty-state strong { display:block; font-size: 15px; color: var(--blue); }
.empty-state p { font-size: 13px; margin: 5px 0 0; }
footer { background: #eaf2f0; border-top: 1px solid #dce8e8; color: #567078; font-size: 13px; padding: 26px 0; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer a { text-decoration: none; color: #205e66; }
@media (max-width: 850px) {
 .cards { grid-template-columns: 1fr; }
 .tool-card { min-height: 0; }
 .workbench { grid-template-columns: 1fr; }
 .hero { padding-top: 50px; }
}
@media (max-width: 550px) {
 .container { padding: 0 16px; }
 .top-nav { gap: 12px; font-size: 12px; }
 .header-inner { min-height: 65px; }
 .controls,.results { padding: 20px; }
 .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .hero h1 { font-size: 38px; }
 .hero p { font-size: 15px; }
}
