:root {
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  color: #203a3c;
  background: #f6f5f0;
  --ink: #123b5a;
  --accent: #22597f;
  --muted: #60706d;
  --line: #d9dfd8;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #bd8951; outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-160%); z-index: 20; padding: 12px; background: white; }
.skip-link:focus { transform: translateY(0); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--ink); color: #f5f4e9; padding: 38px 26px 28px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: block; color: white; text-decoration: none; font-size: 19px; letter-spacing: 0; }
.navigation { flex: 1; display: flex; flex-direction: column; }
.nav-label { color: #a4bab7; font-size: 10px; letter-spacing: .18em; margin: 56px 12px 16px; }
nav a { display: flex; gap: 13px; padding: 14px 12px; margin: 4px 0; border-radius: 4px; color: #d4e0dc; text-decoration: none; font-size: 14px; transition: background .15s, color .15s; overflow-wrap: anywhere; }
nav a:hover { background: #234b50; color: white; }
nav a[aria-current="page"] { color: white; background: #32605f; box-shadow: inset 3px 0 #d1b58a; }
.nav-number { color: #a8beb9; font-size: 10px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; padding: 50px 12px 0; }
.sidebar-bottom p { color: #b4c7c2; font-size: 13px; line-height: 1.7; max-width: 170px; }
.editor-link { color: #e0d0b8; font-size: 13px; display: flex; justify-content: space-between; margin-top: 26px; text-decoration: none; }
.nav-toggle { display: none; }
main { max-width: 1130px; margin: 0 0 0 260px; padding: 58px clamp(24px, 6vw, 88px) 26px; min-height: 100vh; }
.page-header { background: transparent; color: var(--ink); padding: 0; margin-bottom: 32px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .15em; color: var(--accent); margin: 0 0 23px; display: block; }
h1 { font: normal clamp(36px, 4.8vw, 64px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 0 0 20px; max-width: 720px; }
.page-subtitle { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0; max-width: 600px; white-space: pre-line; }
.page-copy { line-height: 1.85; font-size: 16px; max-width: 690px; overflow-wrap: anywhere; }
.page-copy p { margin: 0 0 22px; white-space: pre-line; }
.tool-link { display: flex; align-items: center; justify-content: space-between; gap: 25px; background: #e4ebe2; border: 1px solid #cbd8cb; margin: 40px 0; padding: 32px; text-decoration: none; color: var(--ink); transition: transform .2s, background .2s; }
.tool-link:hover { transform: translateY(-3px); background: #dce6da; }
.tool-link .eyebrow { margin-bottom: 16px; }
.tool-link h2 { font: 29px/1.25 Georgia, serif; margin: 0 0 12px; }
.tool-link p { color: #52655c; font-size: 14px; margin: 0; line-height: 1.7; }
.tool-arrow { font-size: 36px; color: var(--accent); }
.home-note { border-top: 1px solid var(--line); padding-top: 26px; }
.home-note .eyebrow { margin-bottom: 12px; }
.home-note p { line-height: 1.7; font-size: 14px; }
.site-footer { margin-top: 62px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.site-attribution { flex-basis: 100%; line-height: 1.7; }
.inline-edit-trigger { opacity: 0; min-width: 48px; min-height: 44px; border: 0; padding: 6px 10px; color: inherit; background: transparent; font-size: 12px; margin-left: auto; }
.site-footer:hover .inline-edit-trigger, .inline-edit-trigger:focus-visible { opacity: 1; }
body[data-page="home"] { background: #123b5a; color: white; }
body[data-page="home"] main { display: flex; flex-direction: column; min-height: 100vh; }
body[data-page="home"] .page-header { color: white; padding-top: 12vh; }
body[data-page="home"] h1 { font-family: "Trebuchet MS", sans-serif; font-size: clamp(28px, 4vw, 52px); letter-spacing: -.025em; font-weight: 400; }
body[data-page="home"] .page-subtitle { color: white; font-size: 19px; }
body[data-page="home"] .site-footer { margin-top: auto; border-color: #456784; color: #d2e0ec; padding-bottom: 6px; align-items: center; }
body[data-page="home"] .page-copy { color: white; }
.password-dialog { max-width: 420px; width: calc(100% - 40px); border: 1px solid #b9c9d4; border-radius: 6px; padding: 26px; background: #fffefa; color: #203a3c; }
.password-dialog::backdrop { background: #0e283bcc; }
.inline-editor-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 30; background: #fffefa; color: #203a3c; border: 1px solid #b9c9d4; border-radius: 6px; box-shadow: 0 5px 30px #123b5a33; padding: 14px 18px; width: min(640px, calc(100% - 32px)); }
.inline-editor-bar .actions { margin: 10px 0 0; }
.inline-editor-bar p { margin: 0; font-size: 13px; line-height: 1.5; }
[contenteditable="plaintext-only"] { outline: 2px dashed #c49c60; outline-offset: 6px; min-height: 1.5em; }
#page-content[contenteditable="plaintext-only"]:empty::before { content: "Add page text…"; opacity: .6; }
body.is-editing main { padding-bottom: 160px; }
.notice, .calculator .warning { border: 1px solid #e1cfad; border-left: 3px solid #ac813e; background: #faf1df; border-radius: 3px; padding: 18px 22px; font-size: 13px; line-height: 1.7; margin: 25px 0; }
.notice p { margin: 6px 0 0; }
.calculator-intro { font-size: 14px; }
.calculator .card, .editor-card { background: #fffefa; border: 1px solid var(--line); border-radius: 6px; padding: 25px; margin: 18px 0; box-shadow: none; }
h2, .calculator h2 { font-size: 20px; margin: 0 0 18px; }
label { display: block; font-size: 13px; font-weight: 700; margin: 20px 0 8px; }
input, textarea, select { display: block; width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid #a5b7ad; border-radius: 4px; background: white; color: #203a3c; font-size: 16px; }
input:focus, textarea:focus, select:focus { outline: 2px solid #7da497; outline-offset: 1px; border-color: #326d65; }
textarea { resize: vertical; line-height: 1.65; }
input[readonly] { background: #eef1eb; color: #657269; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0 8px; }
button { min-height: 46px; padding: 12px 18px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 14px; }
button.primary { background: var(--accent); color: white; border: 1px solid var(--accent); }
button.secondary { background: transparent; border: 1px solid #a9b9ac; color: var(--ink); }
button:hover { filter: brightness(.94); }
button:disabled { cursor: wait; opacity: .55; }
.calculator button.remove { border-radius: 4px; font-size: 13px; }
.calculator .readout { background: #eef2eb; border-radius: 4px; }
.calculator .readout strong, .calculator .total .big { color: var(--accent); }
.calculator .total { background: #e4ebe2; border-color: #bdcfbe; border-radius: 6px; }
.calculator .tag { color: #526c60; font-size: 10px; }
.calculator input { border: 1px solid #a5b7ad; border-radius: 4px; }
.calculator label { font-size: 13px; margin-top: 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.7; }
.status { color: #942d24; }
.editor-status { min-height: 24px; font-size: 14px; line-height: 1.7; color: var(--accent); overflow-wrap: anywhere; }
.editor-status[data-error="true"] { color: #942d24; }
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.editor-toolbar h2 { margin: 0; }
.field-help { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 8px 0 18px; }
.text-link { font-size: 13px; }
.setup-help { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; font-size: 13px; line-height: 1.8; }
summary { cursor: pointer; color: var(--accent); font-weight: 700; }
@media (max-width: 760px) {
  .sidebar { position: relative; width: 100%; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: visible; }
  .brand { font-size: 18px; }
  .nav-toggle { display: block; color: white !important; border-color: #819c96 !important; }
  .navigation { grid-column: 1 / -1; }
  .sidebar[data-collapsed="true"] .navigation { display: none; }
  .nav-label { margin-top: 25px; }
  .sidebar-bottom { padding: 12px; }
  .sidebar-bottom p { display: none; }
  .editor-link { margin-top: 12px; max-width: 180px; }
  main { margin: 0; padding: 34px 22px 24px; }
  body[data-page="home"] main { min-height: calc(100svh - 82px); }
  body[data-page="home"] .page-header { padding-top: 10vh; }
  h1 { font-size: 40px; }
  .tool-link { padding: 24px; }
  .editor-card, .calculator .card { padding: 20px; }
  .actions button { flex: 1 1 180px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .skip-link, .site-footer { display: none; }
  main { margin: 0; padding: 0; max-width: none; }
  .page-header { display: block; }
}
