:root {
  color-scheme: light;
  font-family: "Photon Inter", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0d1f3c;
  background: #f1f4f8;
  --ink: #0d1f3c;
  --muted: #46526b;
  --line: #dce3ec;
  --accent: #1b3a6b;
  --accent-dark: #102e57;
  --accent-tint: #e9eff7;
  --teal: #1d7a5a;
  --surface: #fff;
  --radius: 13px;
  --shadow: 0 2px 5px rgb(24 33 70 / 4%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
::selection { background: #ffe6a8; color: #0d1f3c; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { height: 67px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-start; padding: 0 29px 0 22px; gap: 14px; position: relative; z-index: 3; }
.brand { display: inline-flex; align-items: center; text-decoration: none; gap: 10px; font-size: 1.31rem; font-weight: 720; letter-spacing: -.04em; }
.brand img { display: block; }
.brand-divider { height: 20px; width: 1px; background: var(--line); margin-left: 5px; }
.brand-label { font-size: .86rem; letter-spacing: 0; font-weight: 520; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.top-button, .angle-select, .icon-button { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 7px 10px; min-height: 35px; font-size: .87rem; font-weight: 600; white-space: nowrap; }
.top-button .icon { width: 16px; height: 16px; }
.top-button .chevron { width: 13px; height: 13px; }
.top-button:hover, .icon-button:hover, .angle-select:hover { background-color: #f0f4fa; }
.angle-select { appearance: none; border-color: #e4dbc9; background: #fffcf4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%238a5a00' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 8px center no-repeat; color: #75510b; padding-right: 24px; }
.file-menu-wrap { position: relative; }
.file-menu { min-width: 200px; position: absolute; top: calc(100% + 8px); right: 0; z-index: 1; border: 1px solid var(--line); background: var(--surface); padding: 5px; border-radius: 10px; box-shadow: 0 8px 22px #0d1f3c25; }
.file-menu button { display: block; background: none; width: 100%; text-align: left; border: 0; padding: 10px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
.file-menu button:hover { background: var(--accent-tint); }
.shell { display: grid; grid-template-columns: 204px minmax(0, 1fr); min-height: calc(100dvh - 67px); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border-right: 1px solid var(--line); padding: 26px 13px 18px; }
.nav-label { color: #59657c; font-size: .75rem; letter-spacing: .11em; font-weight: 700; text-transform: uppercase; margin: 0 10px 12px; }
.sidebar a { display: flex; align-items: center; text-decoration: none; gap: 11px; border-radius: 8px; border: 1px solid transparent; padding: 10px; margin-bottom: 4px; font-size: .93rem; font-weight: 570; color: #46526b; white-space: nowrap; }
.sidebar a:hover { background: #f0f4fa; color: var(--ink); }
.sidebar a.selected { background: #e9eff7; border-color: #dce7f4; color: #1b3a6b; font-weight: 680; }
.save-indicator { margin: 12px 5px 0; display: flex; align-items: center; gap: 7px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.save-indicator .icon { width: 15px; height: 15px; color: var(--teal); }
.workspace { max-width: 1612px; margin: 0 auto; padding: 29px 31px 27px; }
.workspace-head { margin: 0 0 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.workspace-head h1 { font-size: clamp(1.8rem, 3vw, 2.25rem); line-height: 1.13; font-weight: 735; letter-spacing: -.045em; margin-bottom: 7px; }
.workspace-head p { color: var(--muted); font-size: 1rem; line-height: 1.45; }
.graph-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.graph-actions > button[aria-expanded="true"] { background: #fff1cf; border-color: #e2bc62; color: #604100; }
.graph-mode { display: flex; padding: 3px; flex: 0 0 auto; background: #e5ebf3; border-radius: 9px; border: 1px solid #dce3ec; }
.graph-mode button { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 6px; padding: 5px 11px; font-size: .875rem; font-weight: 650; }
.graph-mode button[aria-pressed="true"] { border-color: #d4dde9; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.graph-mode button:hover { color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.panel-head { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1rem; font-weight: 680; }
.subtle-button, .primary-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 620; }
.subtle-button:hover { background: #eff4fb; border-color: #cad8e9; }
.primary-button { border-color: var(--accent); background: var(--accent); color: #fff; }
.primary-button:hover { background: var(--accent-dark); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(262px, 1fr); gap: 16px; align-items: start; }
.calc-workspace { display: grid; grid-template-columns: minmax(0, 650px) minmax(250px, 340px); gap: 17px; align-items: start; }
.calc-device { padding: 12px; background: #e9eff6; }
.calc-screen { border: 1px solid #d2dce9; border-top: 3px solid #d49720; border-radius: 10px; background: #fff; }
.calc-screen .panel-head { padding: 10px 12px; }
.calc-history { height: clamp(100px, 21vh, 210px); overflow-y: auto; padding: 12px 14px; display: grid; align-content: start; gap: 7px; }
.calc-history p { padding: 10px 2px; color: var(--muted); line-height: 1.5; }
.calc-entry { background: #f5f7fa; border: 1px solid #e8edf5; border-radius: 9px; display: grid; gap: 4px; width: 100%; text-align: left; padding: 11px 13px; color: var(--ink); overflow-wrap: anywhere; }
.calc-entry:hover { border-color: #c1d2e8; }
.calc-entry code { font-family: ui-monospace, monospace; font-size: .87rem; color: var(--muted); }
.calc-entry strong { font: 650 1.12rem ui-monospace, monospace; text-align: right; }
.calc-entry :is(code,strong) { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.calc-entry code math { color: var(--ink); font-size: 1.04rem; }
.calc-entry strong:has(math) { display: flex; justify-content: safe flex-end; }
.calc-entry.error strong { color: #a62744; font: 600 .9rem system-ui, sans-serif; }
.calc-form { gap: 8px; padding: 13px; border-top: 1px solid var(--line); }
.calc-form, .notes-math { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.calc-form > button, .notes-math > button { grid-column: 2; grid-row: 1; }
.math-draft { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding: 8px 10px; overflow-x: auto; scrollbar-width: thin; color: var(--ink); background: #f3f6fb; border: 1px solid #e4eaf3; border-inline-start: 3px solid #d3a445; border-radius: 7px; }
.math-draft math { font-size: 1.19rem; math-style: normal; }
.device-entry .math-draft { padding-block: 3px; }
.device-entry .math-draft math { font-size: 1rem; }
.calc-form input, .notes-title, .notes-content, .notes-math input { min-width: 0; flex: 1; line-height: 1.4; color: var(--ink); border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 10px; }
.calc-form input, .notes-math input { font-family: ui-monospace, monospace; }
.calc-handheld { margin-top: 12px; }
.calc-handheld .handheld-direction { border: 1px solid #d7e2ee; background: #e0e8f2; }
.calc-handheld .handheld-key[data-wide][data-action="submit"] { background: #f0a500; color: #0d1f3c; border-color: #d59200; }
.calc-handheld .handheld-key[data-wide][data-action="submit"]:hover { background: #ffbd35; }
.calc-mode { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.calc-mode input { accent-color: var(--accent); }
.calc-catalog { padding: 15px 15px 16px; }
.calc-catalog h2 { font-size: 1rem; font-weight: 680; }
.calc-stat-shortcuts { border-bottom: 1px solid var(--line); }
.calc-stat-shortcuts > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.calc-examples { display: grid; gap: 5px; padding-top: 8px; }
.calc-examples button { text-align: left; border: 0; border-radius: 6px; padding: 6px 8px; background: #f1f4f8; color: var(--ink); overflow-wrap: anywhere; font: .84rem ui-monospace, monospace; }
.calc-examples button:has(math) { overflow-x: auto; scrollbar-width: thin; }
.calc-examples button math { font-size: .98rem; }
.calc-examples button:hover { background: var(--accent-tint); }
.graph-work { min-width: 0; }
.key-choices { padding: 9px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.key-choices-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 7px; }
.key-choices-head p { font-size: .875rem; font-weight: 650; }
.key-choices-close { border: 0; background: transparent; color: var(--accent); padding: 3px 6px; font-size: .875rem; }
.key-choices-list { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: .875rem; }
.key-choices-list button { overflow-wrap: anywhere; }
.device-menu-notation { margin-inline-start: auto; flex: none; max-width: 45%; overflow-x: auto; scrollbar-width: thin; color: var(--accent-dark); }
.device-menu :is(.device-menu-notation, .device-menu-label) math { font-size: 1rem; }
.notes-body { padding: 16px; display: grid; gap: 12px; }
.notes-title { font-weight: 670; }
.notes-content { min-height: 43vh; width: 100%; resize: vertical; line-height: 1.65; }
.notes-math { gap: 6px; }
.notes-result { color: var(--teal); font: .95rem ui-monospace, monospace; line-height: 1.6; overflow-wrap: anywhere; }
.notes-body p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
dialog { width: min(540px, calc(100% - 28px)); max-height: calc(100dvh - 36px); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 65px #0d1f3c4a; padding: 0; }
dialog::backdrop { background: #191e39a0; }
.guide-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 18px; }
.guide-head h2 { font-size: 1.2rem; }
.guide-content { padding: 17px 19px; color: #46526b; line-height: 1.52; }
.guide-content dt { font-weight: 690; color: var(--ink); }
.guide-content dd { margin: 3px 0 13px; }
.guide-content code { background: #edf2f8; border-radius: 3px; padding: 1px 3px; overflow-wrap: anywhere; }
.tool-dialog { background: var(--surface); border-top: 3px solid var(--gold); }
.tool-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; background: #f1f5fa; border-bottom: 1px solid var(--line); }
.tool-dialog-head h2 { font-size: 1.17rem; font-weight: 720; }
.tool-dialog-head .icon-button { min-height: 32px; padding: 5px; }
.tool-dialog-form { display: grid; gap: 13px; padding: 16px 18px; }
.tool-dialog-fields { display: grid; gap: 10px; }
.tool-dialog-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 4px 12px; align-items: center; }
.tool-dialog-field label { font-size: .91rem; font-weight: 620; overflow-wrap: anywhere; }
.tool-dialog-field :is(input:not([type="checkbox"]),select,textarea) { min-width: 0; width: 100%; min-height: 38px; padding: 7px 9px; color: var(--ink); background: white; border: 1px solid #cad6e5; border-radius: 7px; }
.tool-dialog-field :is(input:not([type="checkbox"]),textarea) { font-family: ui-monospace, SFMono-Regular, monospace; }
.tool-dialog-field textarea { resize: vertical; }
.tool-dialog-field small { grid-column: 2; font-size: .81rem; color: var(--muted); line-height: 1.4; }
.tool-dialog-check { display: flex; justify-content: flex-start; gap: 9px; }
.tool-dialog-check input { flex: none; accent-color: var(--accent); }
.tool-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.tool-dialog-actions [data-keypad] { margin-right: auto; }
.tool-dialog-actions [data-keypad][aria-expanded="true"] { background: var(--accent-tint); }
.tool-dialog-keypad { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #eff4fa; }
.tool-dialog-keypad :is([data-action="home"],[data-action="doc"],[data-action="menu"],[data-action="scratchpad"],[data-action="catalog"],[data-action="var"]) { visibility: hidden; }
.tool-dialog-error { color: #9c1c3d; background: #fdf0f3; border-radius: 7px; padding: 9px 11px; line-height: 1.42; }
.tool-dialog-result { border: 1px solid #d6e2ee; border-radius: 9px; background: #f2f6fa; padding: 10px 12px; }
.tool-dialog-result dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 7px 10px; margin: 0; }
.tool-dialog-result dt { font-weight: 630; }
.tool-dialog-result dd { margin: 0; font-family: ui-monospace, SFMono-Regular, monospace; overflow-wrap: anywhere; text-align: right; }
.tool-dialog-result p { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.tool-dialog-result dl + p { margin-top: 9px; }
@media (max-width: 480px) {
  .tool-dialog-head, .tool-dialog-form { padding-inline: 12px; }
  .tool-dialog-field { grid-template-columns: minmax(0, 1fr); }
  .tool-dialog-field small { grid-column: 1; }
}
@media (max-width: 1050px) {
  .shell { grid-template-columns: 174px minmax(0, 1fr); }
  .workspace { padding-inline: 22px; }
}
@media (max-width: 780px) {
  .topbar { height: 58px; padding-inline: 13px; }
  .shell { display: block; min-height: calc(100dvh - 58px); }
  .sidebar { border: 0; border-bottom: 1px solid var(--line); padding: 5px 12px; }
  .sidebar nav { display: flex; gap: 4px; overflow: auto; scrollbar-width: thin; }
  .sidebar a { margin: 0; padding: 7px 9px; gap: 5px; font-size: .86rem; }
  .sidebar .icon { width: 17px; height: 17px; }
  .nav-label, .save-indicator { display: none; }
  .workspace { padding: 18px 13px 24px; }
  .workspace-head { margin-bottom: 16px; }
  .brand-label, .brand-divider { display: none; }
}
@media (max-width: 590px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .top-actions { gap: 5px; }
  .top-button { gap: 4px; padding-inline: 7px; }
  .brand img { width: 32px; height: 32px; }
  .brand { gap: 6px; font-size: 1.15rem; }
  .calc-history { height: 135px; }
  .calc-device { padding: 8px; }
  .calc-form { padding: 8px; }
  .graph-actions { align-self: start; gap: 5px; }
  .graph-actions .subtle-button { padding-inline: 7px; }
  .graph-mode button { padding-inline: 7px; }
}
@media (max-width: 1120px) { .calc-workspace { grid-template-columns: minmax(0, 650px) minmax(215px, .65fr); } }
@media (max-width: 700px) { .calc-workspace { grid-template-columns: minmax(0, 1fr); } }
.geometry-layout { grid-template-columns: minmax(0, 2.35fr) minmax(240px, 1fr); }
.geometry-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; }
.geometry-toolbar .subtle-button { padding-inline: 9px; }
.geometry-toolbar button[aria-pressed="true"] { background: var(--accent-tint); border-color: #cbd9e9; color: #1b3a6b; }
.geometry-canvas { padding: 0 10px; }
.geometry-canvas svg { display: block; width: 100%; max-height: 540px; border: 1px solid var(--line); border-radius: 7px; touch-action: none; user-select: none; cursor: crosshair; }
.geometry-canvas svg[data-tool="move"] { cursor: grab; }
.geometry-canvas svg[data-tool="move"]:active { cursor: grabbing; }
.geometry-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 12px; color: var(--muted); font-size: .875rem; }
.geometry-footer label { white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.geometry-footer input { accent-color: var(--accent); }
.geometry-measurements { padding: 13px 15px; display: grid; gap: 9px; max-height: 325px; overflow: auto; }
.geometry-measurements > div { padding: 8px 10px; background: #f1f4f8; border-radius: 8px; }
.geometry-measurements strong { font-size: .9rem; }
.geometry-measurements p, .geometry-coordinates p { font-size: .88rem; line-height: 1.45; color: var(--muted); }
.geometry-coordinates { border-top: 1px solid var(--line); padding: 13px 15px 0; }
.geometry-coordinates > div { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.geometry-coordinates input { min-width: 0; width: 65px; border: 1px solid var(--line); border-radius: 6px; padding: 7px; }
.geometry-coordinates button { white-space: nowrap; }
.geometry-actions { padding: 12px 15px; }
@media (max-width: 850px) {
  .geometry-layout { grid-template-columns: minmax(0, 1fr); }
}

@font-face {
  font-family: "Photon Inter";
  src: url("./brand/inter-regular.woff") format("woff");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Photon Inter";
  src: url("./brand/inter-semibold.woff") format("woff");
  font-weight: 550 800;
  font-display: swap;
}
@font-face {
  font-family: "Photon Fraunces";
  src: url("./brand/fraunces-semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
:root { --gold: #f0a500; --gold-text: #8a5a00; }
.topbar { border-top: 3px solid var(--gold); height: 72px; }
.brand { flex: 0 0 auto; }
.brand img { width: 174px; height: auto; }
.brand-divider { margin: 0 2px; flex: 0 0 1px; }
.brand-label { white-space: nowrap; }
.shell { min-height: calc(100dvh - 72px); }
.workspace-head h1, .guide-head h2 {
  font-family: "Photon Fraunces", Georgia, serif;
  font-weight: 600;
  font-variant-ligatures: none;
  letter-spacing: -.035em;
}
.workspace-head h1 { font-size: clamp(2.125rem, 3.3vw, 2.75rem); margin-bottom: 6px; }
.sidebar { justify-content: start; gap: 36px; }
.sidebar-end { margin-top: auto; }
.owl-guide {
  width: 100%; display: grid; justify-items: center; align-content: end; min-height: 144px;
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 50% 32%, #294574, #162e54 68%, #10264a);
  border: 1px solid #173761; border-radius: 11px; padding: 5px 8px 10px; color: #fff;
}
.owl-guide::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-radial-gradient(circle at 50% 38%, transparent 0 17px, #ffffff10 18px 19px, transparent 20px 26px);
  mask-image: linear-gradient(#000 8%, #0005 75%, transparent);
}
.owl-guide-label {
  display: inline-block; font-size: .8rem; font-weight: 630; background: #ffffff10;
  border-radius: 6px; padding: 5px 9px; margin-top: -1px; transition: background .2s ease;
}
.owl-guide:hover .owl-guide-label, .owl-guide:focus-visible .owl-guide-label { color: #182742; background: #ffe29b; }
.owl-art {
  position: relative; display: block; width: 95px; aspect-ratio: 458 / 550; transform-origin: 50% 85%;
  animation: owl-arrival .74s .15s both cubic-bezier(.22,.7,.25,1.25);
}
.owl-art img { position: absolute; display: block; pointer-events: none; user-select: none; }
.owl-art [data-part="centre-flame"] { transform-origin: 50% 84%; animation: owl-flame 1.05s .45s 3 ease-in-out; }
.owl-art [data-part$="eyelid-closed"] { opacity: 0; animation: owl-blink 1.9s .65s 2; }
.owl-art [data-part="gold-sparkle"] { opacity: 0; }
.owl-guide:hover .owl-art, .owl-guide:focus-visible .owl-art { animation: owl-hover .54s both ease-in-out; }
.owl-guide:hover [data-part="gold-sparkle"], .owl-guide:focus-visible [data-part="gold-sparkle"] {
  animation: owl-spark .75s both ease-out;
}
.view-enter { animation: view-open .24s cubic-bezier(.21,.82,.31,1) both; }
.primary-button { background: var(--gold); border-color: #d59200; color: var(--ink); }
.primary-button:hover { background: #ffbd35; border-color: #d59200; }
@keyframes owl-arrival { from { opacity: 0; transform: translateY(10px) scale(.88); } to { opacity: 1; transform: none; } }
@keyframes owl-flame { 0%, 100% { transform: none; } 50% { transform: scaleY(.88) rotate(-5deg); } }
@keyframes owl-blink { 0%, 70%, 82%, 100% { opacity: 0; } 75%, 78% { opacity: 1; } }
@keyframes owl-hover { 0%, 100% { transform: none; } 48% { transform: translateY(-6px) rotate(-5deg); } }
@keyframes owl-spark { 0% { opacity: 0; transform: scale(.55); } 45% { opacity: 1; transform: translate(5px,-6px) scale(1.4); } 100% { opacity: 0; transform: translate(12px,-15px) scale(.85); } }
@keyframes view-open { from { opacity: .62; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 780px) {
  .topbar { height: 64px; }
  .shell { min-height: calc(100dvh - 64px); }
  .brand img { width: 151px; }
  .sidebar { gap: 0; }
  .sidebar-end { display: none; }
}
@media (max-width: 460px) {
  .topbar { padding-inline: 10px; gap: 5px; }
  .brand img { width: 133px; }
  .guide-button span { display: none; }
  .guide-button { padding-inline: 8px; }
}
@media (max-width: 370px) {
  .topbar { padding-inline: 8px; }
  .brand img { width: 112px; }
  .file-button span, .file-button .chevron { display: none; }
  .file-button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .owl-guide *, .view-enter { animation: none !important; transition: none !important; }
}

/* Page heading in the top bar, and content below the calculator (both views) */
h1.brand-label { margin: 0; font-size: .95rem; font-weight: 640; color: var(--ink); letter-spacing: -.005em; }
h1.brand-label span { color: var(--muted); font-weight: 520; }
.workspace-head h2 { font-family: "Photon Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(2.125rem, 3.3vw, 2.75rem); line-height: 1.13; letter-spacing: -.035em; margin: 0 0 6px; }
.noscript { padding: 18px; }
.about { border-top: 1px solid var(--line); background: #fff; }
.about-inner { max-width: 1040px; margin: 0 auto; padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 32px); color: #33415c; line-height: 1.62; }
.about h2 { margin: 40px 0 12px; font-family: "Photon Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); }
.about h2:first-child { margin-top: 0; }
.about-lede { max-width: 760px; font-size: 1.07rem; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 22px; }
.about-grid article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafd; }
.about-grid h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.about-grid p { font-size: .93rem; }
.how-to { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 10px 22px; margin: 0; }
.how-to dt { font-weight: 700; color: var(--ink); }
.how-to dd { margin: 0; }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 650; color: var(--ink); }
.faq details p { padding: 0 0 14px; }
.about-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 44px; padding: 22px 24px; border-radius: 18px; background: linear-gradient(135deg, #1b3a6b, #0d1f3c); color: #dfe8f5; }
.about-cta h2 { margin: 0 0 4px; color: #fff; font-size: 1.4rem; }
.about-cta p { margin: 0; }
.about-cta-owl { width: 64px; height: 64px; border-radius: 50%; }
.about-cta-button { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 22px; border-radius: 999px; background: var(--gold); color: #0d1f3c; font-weight: 750; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 24px #f0a50038; }
.about-cta-button:hover { background: #ffbd35; }
.site-foot { background: #0d1f3c; color: #b9c6db; }
.site-foot-inner { max-width: 1040px; margin: 0 auto; padding: 26px clamp(18px, 4vw, 32px) 30px; display: grid; gap: 14px; font-size: .9rem; }
.site-foot-brand img { width: 120px; height: auto; filter: brightness(0) invert(1); opacity: .92; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0; }
@media (max-width: 700px) {
  .how-to { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .how-to dd { margin-bottom: 12px; }
  .about-cta { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .about-cta-owl { display: none; }
}
@media (max-width: 780px) { h1.brand-label { display: none; } }
@media (max-width: 1150px) { h1.brand-label span { display: none; } }
