/* aec-ai public site. Design F "Soft Blueprint". */
:root {
  --paper: #F7F5F0;
  --white: #FFFFFF;
  --ink: #1F3550;
  --muted: #50627A;
  --faint: #5D6E84;
  --line: #DCE3EC;
  --line-soft: #E6EBF1;
  --field-line: #C9D4E2;
  --sky: #E9F0F8;
  --sky-soft: #F4F8FC;
  --blue: #2F6CB3;
  --blue-soft: #5B8BC9;
  --dash: #A9B6C6;
  --cta: #F5A54A;
  --cta-hover: #F7B566;
  --cta-ink: #2B1700;
  --warm: #B5650F;
  --warm-soft: #FDEBD3;
  --head: Manrope, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 'Source Sans 3', system-ui, sans-serif; }
a { color: var(--blue); }
a:hover { color: var(--ink); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Type */
.h1 { font-family: var(--head); font-weight: 800; font-size: clamp(38px, 5.5vw, 60px); line-height: 1.05; letter-spacing: -0.025em; }
.h2 { font-family: var(--head); font-weight: 800; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -0.02em; }
.h2-sm { font-size: 30px; }
.h3 { font-family: var(--head); font-weight: 600; font-size: 20px; line-height: 1.3; }
.h3-lg { font-size: 22px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.warm { color: var(--warm); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.small { font-size: 16px; }
.fine { font-size: 14px; }
.tiny { font-size: 12px; }
.lede { font-size: 20px; max-width: 580px; }
.tagline { font-family: var(--mono); font-size: 13px; color: var(--blue); background: var(--sky); border-radius: 999px; padding: 5px 12px; align-self: flex-start; }

/* Layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 80px; padding-bottom: 80px; }
.section-after { padding-top: 24px; padding-bottom: 88px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack-sm { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.tight { gap: 8px; }
.row.baseline { gap: 8px 16px; align-items: baseline; }
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.self-start { align-self: flex-start; }
.white-band { background: var(--white); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.sky {
  background-color: var(--sky);
  background-image: linear-gradient(rgba(91, 139, 201, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(91, 139, 201, 0.09) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Parts */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 1px 2px rgba(31, 53, 80, 0.05), 0 10px 28px rgba(31, 53, 80, 0.06); }
.card.flat { box-shadow: none; }
.btn {
  font: inherit; font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  border: 1px solid var(--field-line); background: var(--white); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--blue-soft); background: var(--sky-soft); color: var(--ink); }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn.slim { min-height: 44px; padding: 10px 20px; }
.nav { font-size: 15px; color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: 999px; }
.nav:hover { background: var(--sky); }
.link-cta { font-size: 16px; font-weight: 600; color: var(--blue); text-decoration: none; padding: 10px 6px; }
.link-cta:hover { color: var(--ink); text-decoration: underline; }
.tab {
  font: inherit; font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
}
.tab:hover { border-color: var(--blue-soft); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip { font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--sky); color: var(--ink); text-decoration: none; }
.chip.small { font-size: 13px; }
.chip.white { background: var(--white); }
.chip.off, .chip.next { background: transparent; border: 1px dashed var(--dash); color: var(--faint); }
.chip.beta { background: var(--warm-soft); color: #6B3D06; }
.field { font: inherit; font-size: 16px; color: var(--ink); background: var(--white); border: 1px solid var(--field-line); border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%; }
input[type=range] { width: 100%; accent-color: var(--blue); height: 32px; }
.btn:focus-visible, .tab:focus-visible, .nav:focus-visible, .field:focus-visible, input:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.num { color: var(--blue); width: 24px; flex: none; }

/* Header and hero */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 800; font-size: 22px; }
.topnav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 96px; }
.hero-text { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-figure { flex: 1 1 440px; min-width: 0; overflow: hidden; }
.hero-art { display: block; width: 100%; height: auto; background: #FBFCFE; }
.title-block { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.title-block span { padding: 12px 16px; border-right: 1px solid var(--line-soft); }
.title-block span:last-child { border-right: 0; }
.title-block b { display: block; color: var(--ink); font-weight: 500; }
.title-block b.warm { color: var(--warm); }

/* How it works */
.steps { flex: 1 1 360px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.step { box-shadow: none; padding: 16px 20px; display: flex; gap: 16px; }
.step.first { border-color: var(--cta); padding: 0; }
.step.first a { padding: 16px 20px; display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); width: 100%; }
.step-text { flex: 1; display: flex; flex-direction: column; }
.demo { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.video { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; background: #FBFCFE; }
.video > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.chapters { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; font-size: 13px; color: var(--muted); }

/* Catalog */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.offer { box-shadow: none; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.offer-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.offer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* Codes */
.codes { padding: 36px; display: flex; flex-wrap: wrap; gap: 36px; }
.codes-lead { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.regions { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.region { background: var(--sky-soft); border-radius: 16px; padding: 18px; display: flex; gap: 14px; }
.region-name { width: 64px; flex: none; }
.codes-examples { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; }

/* Disciplines */
.disc-head { gap: 8px 16px; padding: 4px 2px; }
.disc-draws { flex: 1 1 360px; }

/* General notes */
.notes { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.note { box-shadow: none; padding: 22px; display: flex; gap: 14px; }

/* Fees */
.fees > .stack-sm { flex: 1 1 440px; min-width: 0; }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grade { padding: 18px; display: flex; flex-direction: column; }
.fee-notes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.calc { flex: 1 1 400px; min-width: 0; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.calc-label { display: flex; justify-content: space-between; }
.calc-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-out > div { background: var(--sky-soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.calc-out .h3 { font-size: 22px; }
.calc-out .keep { background: var(--warm-soft); color: var(--cta-ink); }

/* References and closing */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.quote { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.quote blockquote { font-size: 19px; }
.quote figcaption { margin-top: auto; }
.closing-wrap { padding-bottom: 88px; }
.closing { background: var(--ink); border-color: var(--ink); color: var(--white); padding: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.closing .h2 { max-width: 720px; }
.on-navy { color: var(--white); }
.on-navy:hover { color: var(--sky); }

/* Footer */
.footer { background: var(--white); border-top: 1px solid var(--line-soft); padding: 48px 0; }
.foot-top { gap: 8px 20px; }
.foot-brand { font-family: var(--head); font-weight: 800; font-size: 20px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; font-size: 15px; }
.disclaimers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 32px; font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .topnav { display: none; }
  .top-actions { margin-left: auto; }
  .top-actions .btn { min-height: 44px; padding: 8px 16px; }
  .hero { padding-top: 24px; padding-bottom: 64px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .codes, .closing { padding: 22px; }
  .grades, .calc-out { grid-template-columns: 1fr; }
  .step.first a .nowrap { display: none; }
}

/* The app bar on signed-in pages (D3): the role's pages, then the avatar and its menu. */
.app-bar { background: var(--white); border-bottom: 1px solid var(--line-soft); }
.app-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.app-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; }
.nav[aria-current="page"] { background: var(--sky); font-weight: 600; }
.avatar-menu { position: relative; }
.avatar { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--white); font-family: var(--head); font-weight: 800; font-size: 15px; cursor: pointer; user-select: none; }
.avatar::-webkit-details-marker { display: none; }
.avatar:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.avatar-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: max-content; max-width: 280px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.avatar-panel p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .app-row { gap: 6px 8px; }
  .app-nav .nav { padding: 10px; font-size: 14px; }
}

/* Account pages (D3): one card, one column. */
.account-page { min-height: 100vh; }
.account-main { display: flex; justify-content: center; padding-top: 32px; padding-bottom: 96px; }
.account-card { width: 100%; max-width: 460px; padding: 36px 32px; box-sizing: border-box; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; border: 0; margin: 0; padding: 0; min-width: 0; }
.form-field input:not([type="checkbox"]):not([type="radio"]), .form-field select, .form-field textarea, .cell-input { font: 400 17px/1.4 'Source Sans 3', system-ui, sans-serif; color: var(--ink); background: var(--white); border: 1px solid var(--field-line); border-radius: 12px; padding: 12px 14px; min-height: 48px; box-sizing: border-box; width: 100%; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .cell-input:focus { outline: 2px solid var(--blue-soft); outline-offset: 1px; border-color: var(--blue-soft); }
.boxes legend { font-weight: 600; margin-bottom: 4px; }
.box { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 16px; line-height: 1.45; padding: 6px 0; cursor: pointer; }
.box input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.form-note { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 16px; }
.form-note.error { background: var(--warm-soft); color: var(--warm); }
.form-note.done { background: var(--sky); color: var(--ink); }
.account-card .btn { align-self: flex-start; }
.account-block { border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 4px; }
.account-block summary { cursor: pointer; }
.account-block summary + form { margin-top: 16px; }
.btn.danger { color: var(--warm); border-color: var(--warm-soft); }
.btn.danger:hover { background: var(--warm-soft); color: var(--warm); }
.link-button { border: 0; background: none; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-family: inherit; }
.account-page .top-actions { margin-left: auto; }
@media (max-width: 560px) {
  .account-card { padding: 28px 20px; border-radius: 16px; }
  .account-card .btn { align-self: stretch; }
}

/* The service page (D1) */
.pad { padding: 24px; }
.center { text-align: center; }
.crumbs { gap: 6px; align-items: center; }
.service-cols { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.service-main { flex: 1 1 560px; min-width: 0; }
.service-price { flex: 1 1 400px; min-width: 0; padding: 26px; gap: 16px; }
.doc-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.doc-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.doc-name { flex: 1 1 260px; }
.table-scroll { overflow-x: auto; }
.grid-table { border-collapse: collapse; width: 100%; }
.grid-table th, .grid-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
.grid-table th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.estimator { background: var(--sky-soft); border-radius: 16px; padding: 18px; }
.stepper { flex-wrap: nowrap; gap: 10px; }
.stepper-name { flex: 1; }
.step-btn { font: inherit; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--white); color: var(--ink); font-size: 20px; font-weight: 600; cursor: pointer; }
.step-btn:hover { border-color: var(--blue-soft); }
.step-btn:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.step-count { width: 36px; text-align: center; font-size: 18px; }
.estimate-out { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.estimate-out .h3 { font-size: 26px; }

/* The catalog admin (D2) */
.grow { flex: 1 1 320px; min-width: 0; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--blue); min-height: 40px; padding: 8px 12px; }
.btn.quiet:hover { background: var(--sky-soft); border-color: transparent; }
.admin-wrap { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.admin-main { padding-top: 28px; padding-bottom: 64px; gap: 20px; }
.admin-title { gap: 12px 20px; align-items: center; }
.admin-title form { margin: 0; }
.admin-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.admin-tree { flex: 1 1 280px; max-width: 360px; padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: none; }
.admin-edit { flex: 999 1 560px; min-width: 0; gap: 20px; }
.admin-tree details > summary { list-style: none; cursor: pointer; }
.admin-tree details > summary::-webkit-details-marker { display: none; }
.tree-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 15px; }
.tree-row:hover { background: var(--sky-soft); color: var(--ink); }
.tree-row.current { background: var(--sky); }
summary.tree-row a { color: var(--ink); font-weight: 600; text-decoration: none; flex: 1; }
.tree-services { list-style: none; margin: 0 0 4px; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 2px; }
.admin-tree form { margin: 0 0 4px 18px; }
.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mail-admin { max-width: 880px; }
.radio-row { display: flex; gap: 10px; align-items: baseline; font-weight: 400; padding: 6px 0; }
.radio-row input { margin: 0; }
.span-2 { grid-column: 1 / -1; }
.form-field legend { padding: 0; margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 15px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--white); }
.pill input { accent-color: var(--blue); margin: 0; }
.pill:has(input:checked) { border-color: var(--ink); }
.cell-input { min-height: 44px; padding: 8px 10px; font-size: 16px; }
.edit-table td { padding: 6px; }
.edit-table.tiers { min-width: 680px; }
.edit-table.docs { min-width: 520px; }
.edit-table.tiers td:nth-child(n+3):nth-child(-n+5) { width: 96px; }
.tick { width: 22px; height: 22px; margin-top: 10px; accent-color: var(--blue); }
.nowrap-row { flex-wrap: nowrap; gap: 6px; }
.billing { background: var(--sky-soft); border-radius: 14px; padding: 16px; }
.field-error { color: var(--warm); font-weight: 600; font-size: 14px; }
.publish { border-color: var(--cta); box-shadow: none; }
.preview { max-width: 380px; }
.history { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.history li { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.history .mono { width: 44px; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--sky-soft); color: var(--muted); }
@media (max-width: 720px) {
  .admin-grid, .admin-grid.three { grid-template-columns: minmax(0, 1fr); }
  .admin-tree { max-width: none; }
}
