:root {
  --navy: #0b2037;
  --navy-2: #153b61;
  --blue: #2777a9;
  --cyan: #8fc7dc;
  --gold: #d9ae61;
  --gold-light: #f1d49a;
  --paper: #ffffff;
  --ink: #192d40;
  --muted: #617488;
  --line: #d8e3eb;
  --mist: #eef4f7;
  --shadow: 0 22px 55px rgba(11, 32, 55, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  background-image: linear-gradient(rgba(11, 32, 55, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 32, 55, .028) 1px, transparent 1px);
  background-size: 30px 30px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
.topline { height: 5px; background: linear-gradient(90deg, var(--gold) 0 18%, var(--gold-light) 18% 36%, var(--blue) 36% 68%, var(--navy) 68%); }
.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.site-header { position: relative; overflow: hidden; color: white; background: radial-gradient(circle at 82% -20%, rgba(86, 165, 205, .43), transparent 36%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 72%, #1b5175 100%); }
.site-header::after { content: ""; position: absolute; right: -140px; bottom: -250px; width: 600px; height: 600px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.035), 0 0 0 60px rgba(255,255,255,.024); }
.header-content { position: relative; z-index: 1; padding: 24px 0 58px; }
.masthead { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.17); }
.identity { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.identity-mark { display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px; color: var(--navy); background: var(--gold-light); border-radius: 16px; box-shadow: 0 10px 22px rgba(0,0,0,.15); }
.identity-mark svg { width: 38px; height: 38px; }
.identity-text { display: grid; gap: 2px; }
.identity-text small { color: #c8dfef; font-size: .69rem; font-weight: 750; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.identity-text strong { color: white; font-size: 1.11rem; letter-spacing: -.025em; }
.header-meta { color: #c7dceb; font-size: .72rem; font-weight: 750; letter-spacing: .08em; line-height: 1.5; text-align: right; text-transform: uppercase; }
.header-meta span { color: #9bc1d8; font-size: .65rem; letter-spacing: .04em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.site-nav a { padding: 7px 10px; color: #d7e8f3; border: 1px solid rgba(215,232,243,.25); border-radius: 999px; font-size: .74rem; font-weight: 750; text-decoration: none; transition: .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--navy); background: var(--gold-light); border-color: var(--gold-light); }
.hero-kicker { display: inline-flex; gap: 9px; align-items: center; margin: 38px 0 0; color: #d6e8f4; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-kicker::before { content: ""; width: 25px; height: 2px; background: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 15px; color: white; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.55rem, 6vw, 5.35rem); font-weight: 500; letter-spacing: -.055em; line-height: 1.02; }
.hero-copy { max-width: 660px; margin-bottom: 0; color: #d5e4ef; font-size: 1.05rem; line-height: 1.7; }
.page-code { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 8px 11px; color: #d4e8f4; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.page-code::before { content: ""; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(217,174,97,.15); }
main { padding: 35px 0 72px; }
.intro-note { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 25px; padding: 16px 18px; color: #496176; background: rgba(255,255,255,.78); border: 1px solid var(--line); border-radius: 14px; font-size: .9rem; }
.note-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; color: var(--navy); background: var(--gold-light); border-radius: 8px; font-family: Georgia, serif; font-weight: 700; }
.calculator-section { margin-bottom: 48px; }
.calculator-heading { margin-bottom: 16px; }
.calculator-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.calculator-form { padding: 27px 29px 29px; }
.calculator-form-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 23px; }
.tool-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--navy); background: var(--gold-light); border-radius: 12px; font-size: 1.35rem; font-weight: 800; }
.calculator-form-head h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.2rem; letter-spacing: -.025em; }
.calculator-form-head p { max-width: 570px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.calculator-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-place { grid-column: 1 / -1; }
.field-group label { margin-bottom: 7px; }
.field-group input, .field-group select { width: 100%; height: 45px; padding: 0 12px; color: var(--ink); background: #fbfdff; border: 1px solid #cbd9e4; border-radius: 10px; outline: none; font-size: .95rem; transition: border-color .18s ease, box-shadow .18s ease; }
.field-group input:focus, .field-group select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,119,169,.14); }
.quick-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-days button { min-width: 39px; padding: 5px 8px; color: var(--blue); background: #f1f7fa; border: 1px solid #d3e4eb; border-radius: 7px; cursor: pointer; font-size: .75rem; font-weight: 800; }
.quick-days button:hover, .quick-days button:focus-visible { color: white; background: var(--blue); border-color: var(--blue); }
.calculate-button { display: inline-flex; gap: 13px; align-items: center; margin-top: 22px; padding: 12px 17px; color: white; background: var(--navy); border: 0; border-radius: 10px; cursor: pointer; font-size: .85rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; transition: transform .18s ease, background .18s ease; }
.calculate-button:hover, .calculate-button:focus-visible { background: var(--blue); transform: translateY(-1px); }
.calculate-button span { color: var(--gold-light); font-size: 1rem; }
.calculator-error { margin: 12px 0 0; color: #a34242; font-size: .84rem; font-weight: 700; }
.calculator-result { display: flex; min-height: 100%; flex-direction: column; justify-content: center; padding: 31px; color: white; background: radial-gradient(circle at 88% 10%, rgba(93,168,206,.35), transparent 43%), linear-gradient(145deg, var(--navy) 0%, #1b5577 100%); }
.result-eyebrow { margin-bottom: 34px; color: var(--gold-light); font-size: .69rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.result-label { color: #b8d3e4; font-size: .83rem; }
.calculator-result strong { display: block; margin: 5px 0 13px; color: white; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 500; line-height: 1.18; }
.result-detail { min-height: 43px; color: #d8e7f0; font-size: .86rem; line-height: 1.5; }
.result-rule { display: flex; gap: 8px; align-items: flex-start; margin-top: 24px; padding-top: 15px; color: #b9d2e1; border-top: 1px solid rgba(255,255,255,.18); font-size: .76rem; line-height: 1.5; }
.result-rule span:first-child { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; color: var(--navy); background: var(--gold-light); border-radius: 50%; font-size: .65rem; font-weight: 900; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 17px; }
.section-label { margin-bottom: 6px; color: var(--blue); font-size: .7rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h2 { margin-bottom: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.12; }
.section-heading p { max-width: 420px; margin-bottom: 0; color: var(--muted); font-size: .87rem; text-align: right; }
.resource-stage { padding: 26px; background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.resource-card { position: relative; display: flex; min-height: 218px; flex-direction: column; padding: 21px; overflow: hidden; background: white; border: 1px solid #dbe6ee; border-radius: 15px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.resource-card::after { content: ""; position: absolute; right: -32px; bottom: -52px; width: 140px; height: 140px; border: 1px solid rgba(39,119,169,.12); border-radius: 50%; }
.resource-card:hover { border-color: var(--blue); box-shadow: 0 16px 30px rgba(11, 32, 55, .11); transform: translateY(-3px); }
.resource-index { margin-bottom: 28px; color: var(--gold); font-size: .68rem; font-weight: 900; letter-spacing: .12em; }
.resource-card h3 { margin-bottom: 8px; color: var(--navy); font-size: 1.08rem; letter-spacing: -.025em; }
.resource-card p { max-width: 28rem; margin-bottom: 18px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.resource-action { display: flex; justify-content: space-between; align-items: center; margin-top: auto; color: var(--blue); font-size: .78rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.resource-arrow { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--navy); border-radius: 50%; font-size: 1rem; }
.resource-card.primary { background: linear-gradient(145deg, #f7fbfd 0%, #e9f4f8 100%); border-color: #bad9e5; }
.resource-card.primary .resource-index { color: #a57422; }
.coming-soon { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: #778b9b; font-size: .82rem; }
.coming-soon::before { content: ""; width: 7px; height: 7px; background: #9db1bf; border-radius: 50%; }
.footer { padding: 22px 0 28px; color: #748798; border-top: 1px solid var(--line); font-size: .78rem; }
.footer p { margin-bottom: 0; }
.unit-header .header-content { padding-bottom: 46px; }
.unit-header .hero-kicker { color: #f1d49a; }
.unit-header .identity-mark { color: white; background: var(--blue); }
.unit-header h1 { font-size: clamp(2.45rem, 5.4vw, 4.65rem); }
.unit-header .hero-copy { max-width: 630px; }
.unit-header .page-code { border-color: rgba(217,174,97,.42); }
.resource-card.unit-tool { background: linear-gradient(145deg, #102d4a 0%, #1c5675 100%); border-color: transparent; }
.resource-card.unit-tool h3, .resource-card.unit-tool p, .resource-card.unit-tool .resource-action { color: white; }
.resource-card.unit-tool .resource-index { color: var(--gold-light); }
.resource-card.unit-tool .resource-arrow { color: var(--navy); background: var(--gold-light); }
.resource-card.unit-tool::after { border-color: rgba(255,255,255,.15); }
.portal-section { margin-bottom: 48px; }
.portal-tool-grid .resource-card { min-height: 226px; }
.portal-tool-card { background: linear-gradient(145deg, #ffffff 0%, #f2f8fb 100%); }
.portal-tool-card .resource-index { color: #a57422; }
.portal-tool-card h3 { color: var(--navy); }
.portal-tool-card p { color: var(--muted); }
.portal-tool-card .resource-action { color: var(--blue); }
.portal-tool-card .resource-arrow { color: white; background: var(--navy); }
.ocr-section { margin: 48px 0; }
.ocr-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.ocr-card-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 27px 29px 22px; background: linear-gradient(135deg, #f7fbfd 0%, #edf6f8 100%); border-bottom: 1px solid var(--line); }
.ocr-card-head h3 { margin: 0 0 5px; color: var(--navy); font-size: 1.25rem; letter-spacing: -.025em; }
.ocr-card-head p { max-width: 610px; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.ocr-badge { flex: 0 0 auto; padding: 8px 10px; color: #8a6627; background: var(--gold-light); border-radius: 999px; font-size: .67rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.ocr-card-body { padding: 25px 29px 29px; }
.privacy-warning { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 21px; padding: 16px 17px; color: #6d2929; background: #fff4f2; border: 2px solid #d7746d; border-radius: 14px; }
.privacy-warning strong { display: block; margin-bottom: 4px; color: #8b3131; font-size: .84rem; letter-spacing: .04em; text-transform: uppercase; }
.privacy-warning p { margin: 0; font-size: .81rem; line-height: 1.55; }
.privacy-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; color: #fff; background: #b64c4c; border-radius: 9px; font-size: .95rem; font-weight: 900; }
.ocr-controls { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; align-items: end; }
.ocr-file { display: flex; min-height: 92px; flex-direction: column; justify-content: center; padding: 16px; color: var(--blue); background: #fbfdff; border: 1px dashed #aac9d8; border-radius: 12px; cursor: pointer; transition: .18s ease; }
.ocr-file:hover, .ocr-file:focus-within { background: #f1f8fb; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,119,169,.1); }
.ocr-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ocr-file strong { color: var(--navy); font-size: .9rem; }
.ocr-file span { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.ocr-language label { display: block; margin-bottom: 7px; color: var(--navy); font-size: .78rem; font-weight: 800; }
.ocr-language select { width: 100%; height: 45px; padding: 0 11px; color: var(--ink); background: #fbfdff; border: 1px solid #cbd9e4; border-radius: 10px; font-size: .9rem; }
.ocr-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; color: #5e4250; font-size: .79rem; line-height: 1.5; }
.ocr-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue); }
.ocr-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 19px; }
.ocr-button { display: inline-flex; gap: 10px; align-items: center; padding: 11px 15px; color: white; background: var(--navy); border: 0; border-radius: 10px; cursor: pointer; font-size: .8rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; transition: .18s ease; }
.ocr-button:hover:not(:disabled), .ocr-button:focus-visible:not(:disabled) { background: var(--blue); transform: translateY(-1px); }
.ocr-button:disabled { cursor: not-allowed; opacity: .45; }
.ocr-button[aria-disabled="true"] { cursor: not-allowed; opacity: .45; pointer-events: none; }
.ocr-button.secondary { color: var(--navy); background: #eaf3f7; }
.ocr-button.secondary:hover:not(:disabled), .ocr-button.secondary:focus-visible:not(:disabled) { color: white; background: var(--blue); }
.ocr-status { min-height: 21px; margin: 14px 0 0; color: var(--muted); font-size: .82rem; }
.ocr-status.error { color: #a34242; font-weight: 750; }
.ocr-output { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 15px; margin-top: 21px; padding-top: 21px; border-top: 1px solid var(--line); }
.ocr-output[hidden] { display: none; }
.ocr-output-panel { min-width: 0; }
.ocr-output-panel h4 { margin: 0 0 7px; color: var(--navy); font-size: .9rem; }
.ocr-output-panel p { margin: 0 0 10px; color: var(--muted); font-size: .78rem; }
.ocr-text { width: 100%; min-height: 190px; padding: 12px; color: var(--ink); background: #fbfdff; border: 1px solid #cbd9e4; border-radius: 10px; resize: vertical; font: .82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.ocr-footnote { margin: 17px 0 0; color: #778b9b; font-size: .75rem; line-height: 1.55; }
.pdf-tools-section { margin: 48px 0; }
.pdf-tools-note { margin: 0 0 17px; padding: 13px 15px; color: #536b7b; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 12px; font-size: .8rem; line-height: 1.5; }
.pdf-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 17px; }
.pdf-tool-card { min-width: 0; padding: 21px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 14px 35px rgba(11,32,55,.08); }
.pdf-tool-card h3 { margin: 0 0 5px; color: var(--navy); font-size: 1.07rem; }
.pdf-tool-card > p { margin: 0 0 15px; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.pdf-tool-card .privacy-warning { margin-bottom: 15px; padding: 13px 14px; }
.pdf-tool-card .privacy-warning strong { font-size: .76rem; }
.pdf-tool-card .privacy-warning p { font-size: .74rem; }
.pdf-tool-card .privacy-symbol { width: 25px; height: 25px; font-size: .82rem; }
.pdf-tool-upload { display: flex; min-height: 77px; flex-direction: column; justify-content: center; padding: 13px 14px; color: var(--blue); background: #fbfdff; border: 1px dashed #aac9d8; border-radius: 11px; cursor: pointer; }
.pdf-tool-upload:hover, .pdf-tool-upload:focus-within { background: #f1f8fb; border-color: var(--blue); }
.pdf-tool-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pdf-tool-upload strong { color: var(--navy); font-size: .84rem; }
.pdf-tool-upload span { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.pdf-tool-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.pdf-tool-button { display: inline-flex; gap: 8px; align-items: center; padding: 10px 13px; color: white; background: var(--navy); border: 0; border-radius: 9px; cursor: pointer; font-size: .76rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; transition: .18s ease; }
.pdf-tool-button:hover:not(:disabled), .pdf-tool-button:focus-visible:not(:disabled) { background: var(--blue); transform: translateY(-1px); }
.pdf-tool-button:disabled { cursor: not-allowed; opacity: .45; }
.pdf-tool-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 13px; color: #664250; font-size: .75rem; line-height: 1.45; }
.pdf-tool-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; accent-color: var(--blue); }
.pdf-tool-status { min-height: 20px; margin: 12px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.pdf-tool-status.error { color: #a34242; font-weight: 750; }
.pdf-file-list { display: grid; gap: 7px; margin-top: 11px; }
.pdf-file-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 9px; color: #536b7b; background: #f4f8fa; border: 1px solid #dbe7ed; border-radius: 8px; font-size: .76rem; }
.pdf-file-row strong { display: block; overflow: hidden; color: var(--navy); text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-row span { color: var(--muted); font-size: .7rem; }
.pdf-file-order { display: flex; gap: 4px; }
.pdf-file-order button { width: 25px; height: 25px; padding: 0; color: var(--blue); background: white; border: 1px solid #cbdce5; border-radius: 6px; cursor: pointer; font-weight: 850; }
.pdf-file-order button:disabled { color: #aebbc2; cursor: not-allowed; }
.pdf-tool-select, .pdf-tool-input { width: 100%; height: 41px; margin-top: 9px; padding: 0 10px; color: var(--ink); background: #fbfdff; border: 1px solid #cbd9e4; border-radius: 9px; font: inherit; font-size: .82rem; }
.pdf-tool-input.anonymizer-terms { height: 132px; padding: 11px 10px; line-height: 1.45; resize: vertical; }
.pdf-tool-label { display: block; margin-top: 13px; color: var(--navy); font-size: .76rem; font-weight: 800; }
.pdf-page-count { margin: 8px 0 0; color: var(--muted); font-size: .75rem; }
@media (max-width: 800px) {
  .shell { width: min(100% - 36px, 620px); }
  .header-meta { display: none; }
  .calculator-card { grid-template-columns: 1fr; }
  .calculator-result { min-height: 250px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 185px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 9px; text-align: left; }
  .ocr-controls, .ocr-output { grid-template-columns: 1fr; }
  .pdf-tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .shell { width: min(100% - 30px, 620px); }
  .header-content { padding-top: 18px; padding-bottom: 43px; }
  .masthead { padding-bottom: 18px; }
  .identity-mark { width: 46px; height: 46px; border-radius: 13px; }
  .identity-mark svg { width: 33px; height: 33px; }
  .identity-text small { font-size: .6rem; }
  .identity-text strong { font-size: .98rem; }
  .hero-kicker { margin-top: 29px; font-size: .65rem; }
  h1 { font-size: 2.65rem; }
  .hero-copy { font-size: .98rem; }
  main { padding-top: 25px; }
  .calculator-form { padding: 22px 20px 23px; }
  .calculator-fields { grid-template-columns: 1fr; }
  .field-place { grid-column: auto; }
  .calculator-result { min-height: 280px; padding: 25px 22px; }
  .intro-note { font-size: .84rem; }
  .resource-stage { padding: 17px; }
  .ocr-card-head, .ocr-card-body { padding: 22px 20px; }
  .ocr-card-head { display: block; }
  .ocr-badge { display: inline-flex; margin-top: 14px; }
  .pdf-tool-card { padding: 18px; }
}
