/* ==========================================================================
   AeroCostControl — stylesheet
   Brand tokens shared with aviatoria.com: red #FF3131, khaki #6F6352,
   black header, light paper, League Spartan headings.
   ========================================================================== */

:root {
  --red: #ff3131;
  --red-dark: #d81f1f;
  --khaki: #6f6352;
  --khaki-light: #a89c88;
  --ink: #141210;
  --ink-soft: #55504a;
  --paper: #ffffff;
  --paper-alt: #f5f3ef;
  --paper-deep: #ece8e1;
  --header-bg: #0a0a0a;
  --line: rgba(20, 17, 15, 0.1);
  --line-strong: rgba(20, 17, 15, 0.2);
  --good: #1f7a4d;
  --bad: #b3261e;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 24px 48px -28px rgba(20, 17, 15, 0.35);
  --font-head: "League Spartan", Arial, "Helvetica Neue", sans-serif;
  --font-body: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --container-w: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper-alt);
  color: var(--ink-soft);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; padding-top: 28px; padding-bottom: 96px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--ink);
}
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header { background: var(--header-bg); color: #fff; position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo-chip { background: #fff; border-radius: 8px; padding: 3px 6px; display: inline-flex; }
.logo-chip img { height: 38px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: 0.04em; color: #fff; }
.brand-name span { color: var(--red); }
.brand-by { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--khaki-light); margin-top: 3px; }
.header-nav { display: flex; gap: 6px; margin-left: 12px; }
.header-nav a { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: #d8d3cb; }
.header-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.header-nav a.is-active { color: #fff; background: rgba(255,255,255,0.14); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.header-tools { margin-left: auto; display: flex; gap: 10px; }
.seg { display: inline-flex; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; padding: 2px; }
.seg button { font: inherit; font-size: 12.5px; letter-spacing: 0.04em; background: none; border: 0; color: #cfc9bf; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; }

.demo-banner { background: #fff4d6; border-bottom: 1px solid #ecd58a; color: #5c4700; font-size: 13px; padding: 8px 0; }

/* ---------- buttons / fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 9px 18px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.field .op { color: var(--red); font-weight: 700; margin-right: 4px; }
.input-wrap { position: relative; }
.input, select.input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px;
}
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,49,49,0.15); }
.input-wrap .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--khaki); pointer-events: none; }
.input-wrap .input.has-unit { padding-right: 78px; }
.field .hint { font-size: 12px; color: var(--khaki); }
.phone-field { display: flex; gap: 8px; }
.phone-field .phone-cc { flex: 0 0 128px; width: 128px; padding-left: 8px; padding-right: 4px; }
.phone-field input.input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .phone-field .phone-cc { flex-basis: 108px; width: 108px; } }

/* ---------- search view ---------- */
.hero { margin-bottom: 22px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 8px; }
.hero p { max-width: 720px; font-size: 16px; margin: 0; }

.search-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 18px 8px; position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow: auto; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters-head h2 { font-size: 18px; margin: 0; }
.link-btn { font: inherit; font-size: 13px; color: var(--red-dark); background: none; border: 0; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.fgroup { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.fgroup:first-of-type { border-top: 0; padding-top: 4px; }
.fgroup > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--khaki); margin-bottom: 10px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.results-head h2 { font-size: 20px; margin: 0; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sort select { width: auto; padding: 6px 10px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; color: var(--ink); }
.chip button { border: 0; background: var(--paper-deep); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1; color: var(--ink); }
.chip button:hover { background: var(--red); color: #fff; }

.cards { display: grid; gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; display: grid; grid-template-columns: minmax(200px, 1.1fr) 3fr auto; gap: 18px; align-items: center; transition: box-shadow .15s, border-color .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.15; }
.card-make { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--khaki); font-weight: 600; }
.card-sub { font-size: 13px; margin-top: 6px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--ink); margin-right: 6px; }
.tag-demo { background: #fff4d6; color: #5c4700; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stat { min-width: 0; }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--khaki); }
.stat .v { font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.stat.match .v { color: var(--red-dark); }
.stat .v.na { color: var(--khaki-light); font-weight: 400; }
.card-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.cmp-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; user-select: none; }
.cmp-toggle input { accent-color: var(--red); margin: 0; }
.cmp-toggle.is-on { border-color: var(--red); background: rgba(255,49,49,0.06); }
.empty { background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 36px; text-align: center; }

/* ---------- report view ---------- */
.crumbs { font-size: 13px; margin-bottom: 14px; }
.crumbs a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.cl-link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; cursor: pointer; color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.report-head { background: var(--header-bg); color: #fff; border-radius: var(--radius-lg); padding: 26px 28px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: flex-end; }
.report-head h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin: 6px 0 10px; }
.report-head .card-make { color: var(--khaki-light); }
.report-head .tag { background: rgba(255,255,255,0.12); color: #fff; }
.report-head .tag-demo { background: #fff4d6; color: #5c4700; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--khaki); }
.kpi .v { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-top: 4px; }
.kpi .v small { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--khaki); }
.kpi .v.na { color: var(--khaki-light); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--khaki); margin-bottom: 8px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.spec-row:first-of-type { border-top: 0; }
.spec-row .n { color: var(--ink-soft); }
.spec-row .d { color: var(--ink); font-weight: 600; text-align: right; }
.spec-row .d.na { color: var(--khaki-light); font-weight: 400; }
.section-title { margin: 28px 0 6px; font-size: 22px; }
.section-note { font-size: 13.5px; color: var(--khaki); margin-bottom: 14px; }
.alt-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: 14px; }
.alt-table th, .alt-table td { padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); }
.alt-table thead th { background: var(--paper-deep); border-top: 0; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--khaki); }
.alt-table td.num { white-space: nowrap; }
.alt-table a.name { color: var(--ink); font-weight: 700; font-family: var(--font-head); font-size: 16px; }
.alt-table a.name:hover { color: var(--red-dark); }
.delta { font-size: 12.5px; margin-left: 6px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.locked { margin-top: 26px; border: 1px dashed var(--khaki-light); border-radius: var(--radius-lg); padding: 20px 22px; background: repeating-linear-gradient(135deg, #fbfaf7, #fbfaf7 10px, #f5f3ef 10px, #f5f3ef 20px); }
.locked h3 { margin-bottom: 4px; }
.locked p { margin: 0; font-size: 14px; }

/* ---------- compare view ---------- */
.cmp-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14.5px; }
.cmp-table th, .cmp-table td { padding: 11px 16px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.cmp-table thead th { border-top: 0; background: #fff; vertical-align: bottom; padding-top: 18px; padding-bottom: 14px; }
.cmp-table thead th:first-child { width: 190px; }
.cmp-table .group th { background: var(--paper-deep); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--khaki); padding-top: 8px; padding-bottom: 8px; }
.cmp-table td.best { color: var(--red-dark); font-weight: 700; }
.cmp-table td.na { color: var(--khaki-light); }
.cmp-table tbody th { font-weight: 500; color: var(--ink-soft); }
.cmp-head-name { font-family: var(--font-head); font-size: 19px; font-weight: 700; color: var(--ink); display: block; line-height: 1.15; }
.cmp-head-name:hover { color: var(--red-dark); }
.cmp-remove { font-size: 12.5px; }
.legend { font-size: 13px; color: var(--khaki); margin-top: 10px; }
.legend b { color: var(--red-dark); }

/* ---------- compare bar / footer ---------- */
.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--header-bg); color: #fff; padding: 12px 0; box-shadow: 0 -12px 30px -14px rgba(0,0,0,0.5); }
.compare-bar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.compare-bar-actions { display: flex; gap: 10px; }
.site-footer { border-top: 1px solid var(--line-strong); padding: 18px 0 26px; font-size: 13px; color: var(--khaki); }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-row a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .search-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .card { grid-template-columns: 1fr; }
  .card-actions { flex-direction: row; }
  .card-actions > * { flex: 1; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .header-nav { margin-left: 0; order: 3; width: 100%; }
  .header-tools { margin-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .fgrid { grid-template-columns: 1fr; }
}

/* ---------- print (report → PDF) ---------- */

/* ==========================================================================
   Accounts: entry screen, dashboard header, quota, gate, locked download
   ========================================================================== */
.userbox { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 13.5px; color: #d8d3cb; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.entry { display: grid; grid-template-columns: 1fr minmax(380px, 520px); gap: 40px; align-items: start; padding-top: 12px; }
.entry-intro h1 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 14px; }
.entry-intro p { font-size: 17px; max-width: 560px; }
.ticks { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--red); }
.ticks li::after { content: ""; position: absolute; left: 5px; top: 8px; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.test-note { display: inline-block; background: #fff4d6; border: 1px solid #ecd58a; color: #5c4700; border-radius: var(--radius); padding: 8px 12px; font-size: 14px !important; }
.entry-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px 20px; box-shadow: var(--shadow); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-deep); border-radius: 999px; padding: 3px; margin-bottom: 18px; }
.tab { text-align: center; padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.form-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--khaki); margin: 6px 0 10px; }
.entry-card .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.err { min-height: 0; font-size: 12.5px; color: var(--bad); }
.err:empty { display: none; }
.form-err { background: #fdecea; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13.5px; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin: 6px 0 4px; color: var(--ink-soft); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--red); }
.btn-block { width: 100%; padding: 12px 18px; margin-top: 10px; font-size: 15px; }
.btn[disabled] { cursor: not-allowed; }
.btn-red[disabled] { opacity: .6; }
.proto-note { margin: 14px 0 0; font-size: 12px; color: var(--khaki); }
/* Account screens: forgot / check inbox / reset / verified (2026-09-29) */
.forgot-row { margin: -4px 0 10px; text-align: right; font-size: 13px; }
.forgot-row a, .acct-back a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.acct-h { font-size: 22px; margin: 4px 0 8px; }
.acct-p { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 12px; }
.acct-muted { font-size: 13px; color: var(--khaki); }
.acct-user { background: var(--paper-deep); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }
.acct-back { margin: 14px 0 0; font-size: 13.5px; text-align: center; }
.acct-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fdecea; color: var(--red); font-size: 24px; font-weight: 700; margin: 4px 0 12px; }
.acct-icon.acct-ok { background: #e6f4ea; color: #1e7e34; }
.form-err.form-ok { background: #e6f4ea; color: #1e7e34; }
.resend-inline { margin-top: 6px; font-size: 13px; }

.dash-head { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: 24px; align-items: start; margin-bottom: 16px; }
.dash-head h1 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 6px; }
.dash-head p { margin: 0; }
.hub-head { margin-bottom: 4px; }
.hub-head h1 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 6px; }
.hub-head p { margin: 0; }
.quota { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; }
.quota-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.quota-top b { font-family: var(--font-head); font-size: 18px; }
.bar { height: 8px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 999px; }
.quota p { margin: 10px 0 0; font-size: 12.5px; color: var(--khaki); }
.myreports { padding: 14px 18px; margin-bottom: 4px; }
.myreports h3 { margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { background: var(--paper-alt); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.chip-link:hover { border-color: var(--red); color: var(--red-dark); }
.muted { color: var(--khaki); font-size: 14px; }
.section-title { margin-top: 22px; }
.apps-title { margin-top: 0; }
.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 8px; }
.app-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.app-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.app-card.is-active { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.app-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--paper-alt); color: var(--red-dark); display: flex; align-items: center; justify-content: center; }
.app-body { display: flex; flex-direction: column; gap: 4px; }
.app-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.app-badge { display: inline-block; font-family: var(--font-body, inherit); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red-dark); background: rgba(255,49,49,0.1); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
.app-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 720px) { .apps-grid { grid-template-columns: 1fr; } }
.cost-hero { display: flex; gap: 16px; align-items: flex-start; background: var(--header-bg); color: #fff; border-radius: var(--radius-lg); padding: 22px 24px; margin: 18px 0; }
.cost-hero .app-icon { background: rgba(255,255,255,0.12); color: #fff; }
.cost-hero h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #fff; }
.cost-hero .app-badge { background: rgba(255,255,255,0.16); color: #fff; }
.cost-hero p { margin: 0; color: rgba(255,255,255,0.82); max-width: 62ch; }
.cost-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 4px; }
.cost-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.9; }
.cost-list-nested { line-height: 1.6; }
.cost-list-nested .cost-cat { margin: 10px 0; }
.cost-list-nested .cost-cat:first-child { margin-top: 0; }
.cost-cat-t { font-weight: 700; color: var(--ink); }
.cost-sublist { list-style: circle; margin: 4px 0 0; padding-left: 20px; font-weight: 400; color: var(--ink-soft); line-height: 1.7; }
.cost-cta { margin: 14px 0 0; }
.cost-form { margin: 18px 0; }
.cost-form .fgrid { margin-bottom: 4px; }
#cf-enroll-detail { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 2px; }
.cf-check-row { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 4px; }
.cf-warn { background: #fff4d6; border: 1px solid #ecd58a; color: #5c4700; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; line-height: 1.5; margin-top: 6px; }
.cf-check { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; color: var(--ink); }
.cf-check input { width: 16px; height: 16px; }
@media (max-width: 720px) { .cost-cols { grid-template-columns: 1fr; } .cost-hero { flex-direction: column; } }
.tag-own { background: rgba(31,122,77,0.12); color: var(--good); }
.kpi-total .v { color: var(--red-dark); }
.cr-split { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 18px; }
.cr-donut-label { font-family: var(--font-head); font-size: 22px; font-weight: 700; fill: var(--ink); }
.cr-legend { font-size: 15px; }
.cr-detail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; list-style: none; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cr-detail-row:last-child { border-bottom: none; }
.cr-detail-nums { color: var(--ink-soft); white-space: nowrap; font-size: 13.5px; }
.cr-detail-nums b { color: var(--ink); font-size: 14px; margin-left: 6px; }
.cr-detail { padding-left: 0; }
.cr-hbars { display: flex; flex-direction: column; gap: 10px; }
.cr-hbar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; align-items: center; gap: 12px; }
.cr-hbar-label { font-size: 13px; color: var(--ink-soft); line-height: 1.3; }
.cr-hbar-track { background: var(--paper-alt); border-radius: 999px; height: 14px; overflow: hidden; }
.cr-hbar-fill { display: block; height: 100%; border-radius: 999px; }
.cr-hbar-value { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; text-align: right; }
@media (max-width: 640px) {
  .cr-hbar-row { grid-template-columns: 1fr; row-gap: 4px; }
  .cr-hbar-value { text-align: left; }
}

.gate { max-width: 640px; margin: 18px auto 0; padding: 28px 30px; }
.gate h2 { font-size: 26px; }
.gate p { font-size: 15.5px; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- plan badge (hub header) ---------- */
.tag-plan { text-decoration: none; cursor: pointer; }
.tag-plan:hover { background: var(--line-strong); }

/* ---------- pricing page ---------- */
.pricing-cycle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 24px; }
.pricing-toggle { display: inline-flex; background: var(--paper-deep); border-radius: 999px; padding: 4px; }
.pricing-promo { font-size: 13px; font-weight: 700; color: var(--red-dark); background: rgba(255,49,49,0.08); border: 1px solid rgba(255,49,49,0.3); border-radius: 999px; padding: 6px 14px; }
.pricing-toggle button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 8px 18px; border: 0; border-radius: 999px; background: none; color: var(--khaki); cursor: pointer; }
.pricing-toggle button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,17,15,0.15); }
.pricing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px; }
.pricing-card.is-highlight { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.pricing-card.is-current { background: var(--paper-deep); }
.pricing-card h3 { font-size: 17px; margin: 0 0 6px; }
.pricing-badge { position: absolute; top: -11px; left: 20px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pricing-price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 2px; }
.pricing-price b { font-size: 28px; }
.pricing-price span { font-size: 13px; color: var(--khaki); }
.pricing-yearly-note { font-size: 12px; color: var(--khaki); margin-bottom: 10px; }
.pricing-feats { list-style: none; margin: 10px 0 0; padding: 0; flex: 1; }
.pricing-feats li { font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--line); }
.pricing-feats li:first-child { border-top: 0; }
.pricing-cta { margin-top: 16px; }
.pricing-cta .btn { width: 100%; text-align: center; }
.pricing-test-note { margin-top: 22px; font-size: 12.5px; color: var(--khaki); text-align: center; }
.cmp-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-locked { opacity: .75; }
.btn-line.btn-locked { color: var(--khaki); }

@media (max-width: 980px) {
  .entry { grid-template-columns: 1fr; gap: 24px; }
  .dash-head { grid-template-columns: 1fr; }
  .user-name { display: none; }
}
@media (max-width: 520px) {
  .entry-card .fgrid { grid-template-columns: 1fr; }
}
@media print {
  /* Blocks Ctrl+P/Cmd+P from bypassing a disabled/locked download button. `no-download` is already computed
     per-view in route() (aircraft-comparison vs. Smart Cost Control's own PDF quota), so no view needs an
     exemption here any more. */
  body.no-download > * { display: none !important; }
}

.test-hint { margin: 14px 0 0; padding: 8px 12px; background: #fff4d6; border: 1px solid #ecd58a; border-radius: 8px; font-size: 13px; color: #5c4700; }

/* ---------- dashboard: filters first, list after Enter ---------- */
.search-layout { scroll-margin-top: 84px; }
.filter-actions { position: sticky; bottom: 0; background: #fff; display: flex; flex-direction: column; gap: 6px; padding: 10px 0 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.filter-actions .btn { width: 100%; padding: 11px 18px; }
.filter-actions .hint { font-size: 12.5px; color: var(--khaki); min-height: 0; }
.filter-actions .hint:empty { display: none; }
.search-layout.is-pre { grid-template-columns: 1fr; }
.search-layout.is-pre .results-col { display: none; }
.search-layout.is-pre .filters { position: static; max-height: none; overflow: visible; padding: 22px 26px 6px; }
.search-layout.is-pre .fgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 34px; }
.search-layout.is-pre .fgroup { border-top: 0; padding-top: 0; margin-top: 0; }
.search-layout.is-pre .filter-actions { position: static; flex-direction: row; align-items: center; gap: 16px; }
.search-layout.is-pre .filter-actions .btn { width: auto; min-width: 220px; }

.tag-src { background: rgba(111,99,82,0.14); color: var(--khaki); }
.source-note { margin-top: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.source-note a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.source-note p { margin: 8px 0 0; font-size: 13px; color: var(--khaki); }

.extra-src { margin: 4px 0 8px 18px; padding: 0; font-size: 13.5px; color: var(--ink-soft); }
.extra-src li { margin: 2px 0; }

.stats { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* photos */
.card.has-photo { grid-template-columns: 168px minmax(190px, 1.1fr) 3fr auto; }
.card-photo { display: block; width: 168px; height: 100px; border-radius: 10px; overflow: hidden; background: var(--line); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 10px 0 6px; }
.photo { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--line); }
.photo .ph-box { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 13.5px; color: var(--ink-soft); background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(0,0,0,0.03) 10px 20px); }
.photo figcaption { font-size: 12.5px; color: var(--ink-soft); padding: 8px 12px 10px; line-height: 1.45; }
.photo figcaption a { color: inherit; text-decoration: underline; }
@media (max-width: 900px) { .card.has-photo { grid-template-columns: 1fr; } .card-photo { width: 100%; height: 160px; } }
.card.has-photo { grid-template-columns: 140px minmax(180px, 1fr) minmax(300px, 2.2fr) auto; }
.card-photo { width: 140px; height: 90px; }
.card.has-photo .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
@media (max-width: 1100px) { .card.has-photo { grid-template-columns: 140px 1fr auto; } .card.has-photo .stats { grid-column: 1 / -1; } }
@media (max-width: 900px) { .card.has-photo { grid-template-columns: 1fr; } .card-photo { width: 100%; height: 160px; } }

/* range map */
.range-map { position: relative; background: #e8e4da; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 10px 0 6px; }
.range-map canvas { display: block; width: 100%; }
.rm-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 14px; }
.rm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; flex: none; }
.rm-legend { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.rm-legend .rm-basis { color: var(--ink-soft); font-size: 12.5px; }
.rm-legend .na { color: var(--ink-soft); }
#rm-reach > div { margin: 2px 0; }

/* Smart Cost Control Plus — editable assumptions panel */
.app-badge-plus { color: var(--khaki); background: rgba(111,99,82,0.14); margin-left: 4px; }
.app-badge-live { color: #fff; background: var(--red); margin-left: 4px; }
.cost-hero .app-badge-live { background: var(--red); color: #fff; }
.cf-assump { margin-top: 18px; }
.cf-assump-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cf-assump-sub { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--khaki); margin: 20px 0 8px; }
.cf-assump-sub:first-of-type { margin-top: 10px; }
.cf-assump-cat { margin-bottom: 8px; }
.cf-assump-cat h4 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.cf-assump-field.is-custom .input { border-color: var(--red-dark); background: #fff8f6; }
.cf-assump-field.is-custom > label::after { content: " •"; color: var(--red-dark); }
.cr-custom-tag { background: rgba(216,31,31,0.1); color: var(--red-dark); }

/* Cost report footer: generation date, prepared-by, Aviatoria attribution — shown on screen and in the PDF */
.cr-meta { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--khaki); }
.cr-meta p { margin: 0 0 4px; }
.cr-meta a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }

/* Cost report: aircraft photo alongside the headline KPIs */
.cr-top-row { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; margin: 18px 0; }
.cr-photo { flex: 0 0 280px; }
.cr-photo .photo { height: 100%; display: flex; flex-direction: column; }
.cr-photo .photo img { flex: 1; aspect-ratio: auto; }
.cr-kpis { flex: 1; min-width: 280px; margin: 0; }
@media (max-width: 860px) { .cr-top-row { flex-direction: column; } .cr-photo { flex: none; } }

/* ==========================================================================
   PDF report format (user, 2026-10-22: "format B" cover + "format C" inner styling).
   Everything below is print-only; the screen layout is untouched.
   - #pdf-cover: full-bleed cover, filled by app.js buildPdfFrame() at print time
   - .print-frame: index.html wraps <main> in a one-cell table; on screen every wrapper is display:contents,
     in print its <thead> (the letterhead) repeats at the top of every page
   - page footer: @page margin boxes; the left text is injected per report by buildPdfFrame()
   ========================================================================== */
.pdf-letterhead, .pdf-cover, .print-only { display: none; }
.print-frame, .print-frame > tbody, .print-frame > tbody > tr, .print-frame > tbody > tr > td { display: contents; }
.print-head { display: none; }
@media print {
  @page { size: A4; margin: 15mm 17mm 17mm;
    @bottom-left { font: 7.5pt -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #6f6352; }
    @bottom-right { content: counter(page) " / " counter(pages); font: 700 8pt -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; color: #d81f1f; }
  }
  @page cover { margin: 0; @bottom-left { content: none; } @bottom-right { content: none; } }
  html, body { background: #fff !important; }
  body { display: block; min-height: 0; color: var(--ink); font-size: 12.5px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main, main.container { padding: 0 !important; max-width: none !important; margin: 0 !important; }
  .print-only { display: block; }

  /* hide the app chrome and anything interactive */
  .site-header, .demo-banner, .compare-bar, .site-footer, .crumbs, .report-actions, .report-head, .cost-hero,
  .btn, button, #r-alt-cmp, .cost-cta, .cr-photo, .cmp-remove, .cmp-top { display: none !important; }

  /* ---- cover (format B) ---- */
  .pdf-cover.on { display: block; page: cover; width: 210mm; height: 297mm; position: relative; overflow: hidden; background: var(--ink); color: #fff; break-after: page; }
  .pdf-cover-ph { height: 150mm; display: flex; position: relative; }
  .pdf-cover-ph div { flex: 1; background: center / cover no-repeat; }
  .pdf-cover-ph div + div { border-left: 2px solid var(--ink); }
  .pdf-cover-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,16,0) 55%, rgba(20,18,16,1) 100%); }
  .pdf-cover-top { position: absolute; top: 14mm; left: 18mm; right: 18mm; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
  .pdf-cover-logo { background: #fff; padding: 6px 8px; border-radius: 4px; }
  .pdf-cover-logo img { height: 36px; width: auto; }
  .pdf-cover-tag { font-size: 7.5pt; letter-spacing: .2em; text-transform: uppercase; background: rgba(20,18,16,.75); padding: 5px 9px; }
  .pdf-cover-body { padding: 4mm 18mm 0; }
  .pdf-cover-kicker { color: var(--red-dark); font-family: var(--font-head); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: 9pt; }
  .pdf-cover h1 { font-size: 46pt; line-height: .95; margin: 8px 0 8px; font-weight: 800; color: #fff; }
  .pdf-cover h1.many { font-size: 25pt; line-height: 1.12; }
  .pdf-cover-lead { color: #cfc7ba; font-size: 10.5pt; max-width: 145mm; margin: 0; line-height: 1.5; }
  .pdf-cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 8mm; margin-top: 9mm; border-top: 1px solid #3a352f; }
  .pdf-cover-grid div { padding: 8px 0; border-bottom: 1px solid #3a352f; }
  .pdf-cover-grid small { display: block; font-size: 6.6pt; letter-spacing: .14em; text-transform: uppercase; color: #9d9487; }
  .pdf-cover-grid b { font-size: 9.5pt; font-weight: 600; color: #fff; }
  .pdf-cover-foot { position: absolute; bottom: 12mm; left: 18mm; right: 18mm; display: flex; justify-content: space-between; align-items: center; font-size: 7.5pt; color: #9d9487; border-top: 3px solid var(--red-dark); padding-top: 8px; }
  .pdf-cover-foot .pdf-letterhead-brand { color: #fff; font-size: 11pt; }

  /* ---- running letterhead (format B) ---- */
  .print-frame { display: table; width: 100%; border-collapse: collapse; }
  .print-frame > tbody { display: table-row-group; }
  .print-frame > tbody > tr { display: table-row; }
  .print-frame > tbody > tr > td { display: table-cell; padding: 0; }
  .print-head { display: table-header-group; }
  .print-head td { padding: 0 0 7mm; }
  .pdf-letterhead { display: flex; align-items: center; gap: 9px; padding-bottom: 7px; border-bottom: 2px solid #e2dbcf; position: relative; }
  .pdf-letterhead::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 22mm; height: 2px; background: var(--red-dark); }
  .pdf-letterhead img { height: 26px; width: auto; }
  .pdf-letterhead > div { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .pdf-letterhead-brand { font-family: var(--font-head); font-weight: 800; font-size: 10pt; letter-spacing: 0.03em; color: var(--ink); }
  .pdf-letterhead-brand span { color: var(--red-dark); }
  .pdf-letterhead-sub { font-size: 6.8pt; color: var(--khaki); text-transform: uppercase; letter-spacing: 0.14em; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120mm; }

  /* ---- chapters: big red numbers (format B) ---- */
  #app { counter-reset: chap; }
  .view .section-title { counter-increment: chap; display: grid; grid-template-columns: 20mm 1fr; align-items: end; font-size: 15pt; color: var(--ink); margin: 9mm 0 3mm; padding: 0; border: 0; break-after: avoid; }
  .view .section-title::before { content: counter(chap, decimal-leading-zero); font-family: var(--font-head); font-weight: 800; font-size: 28pt; line-height: .85; color: var(--red-dark); }
  .view .section-title:first-child, .print-only.section-title { margin-top: 2mm; }
  .section-note { font-size: 8.5pt; color: var(--ink-soft); margin: 0 0 4mm; break-after: avoid; }

  /* ---- key figures: dark band (format C sidebar look) ---- */
  .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0 0 5mm; background: var(--ink); border: 0; border-radius: 0; break-inside: avoid; }
  .kpis:has(> .kpi:only-child) { grid-template-columns: 1fr; }
  .kpi { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 9px 12px 10px; border-bottom: 1px solid #3a352f; border-right: 1px solid #3a352f; }
  .kpi .k { font-size: 6.6pt; letter-spacing: .14em; color: #9d9487; }
  .kpi .v, .kpi .v.na { font-size: 17pt; color: #fff; margin-top: 2px; }
  .kpi .v small { color: #cfc7ba; }
  .kpi-total .v { color: #ff6b5e; }
  .cr-top-row { display: block; margin: 0; }
  .cr-kpis { min-width: 0; }

  /* ---- spec panels: label-over-value grid with ruled subheads (format C) ---- */
  .panels { display: block; }
  .panel { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0 0 4mm; break-inside: avoid; }
  .panel h3 { display: flex; align-items: center; gap: 8px; font-size: 7.2pt; letter-spacing: .16em; color: var(--khaki); margin: 0 0 1mm; }
  .panel h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .panels .panel { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 7mm; }
  .panels .panel h3 { grid-column: 1 / -1; }
  .spec-row { display: block; padding: 5px 0 6px; border-top: 0; border-bottom: 1px solid #ece6db; font-size: 9.5pt; }
  .spec-row .n { display: block; font-size: 6.6pt; color: var(--khaki); text-transform: uppercase; letter-spacing: .08em; }
  .spec-row .d { display: block; text-align: left; }
  .cost-cols { gap: 8mm; }
  .cr-detail-row { padding: 4px 0; border-bottom: 1px dotted #cfc6b8; font-size: 9pt; }
  .cr-hbars { gap: 6px; }
  .cr-hbar-row { grid-template-columns: minmax(110px, 200px) 1fr auto; }
  .cr-hbar-track { border-radius: 0; height: 9px; background: #ece6db; }
  .cr-hbar-fill { border-radius: 0; }
  .cr-split { break-inside: avoid; }

  /* ---- tables ---- */
  .cmp-wrap, .alt-table { border: 0; border-radius: 0; background: none; }
  .cmp-table { min-width: 0; font-size: 9pt; }
  .cmp-table th, .cmp-table td, .alt-table th, .alt-table td { padding: 6px 6px; border-top: 0; border-bottom: 1px solid #ece6db; }
  .cmp-table thead th, .alt-table thead th { background: none; border-bottom: 2px solid var(--ink); font-size: 7pt; letter-spacing: .12em; color: var(--khaki); }
  .cmp-table thead th { font-size: 9pt; letter-spacing: 0; }
  .cmp-table .group th { background: none; padding-top: 10px; color: var(--khaki); font-size: 7pt; border-bottom: 1px solid var(--line); }
  .alt-table { font-size: 9pt; }
  .alt-table a.name { font-size: 10pt; }
  .tag { border: 1px solid var(--line); background: none; }

  /* ---- map, photos, notes ---- */
  .range-map { border-radius: 0; border: 0; break-inside: avoid; }
  .range-map canvas { width: 100% !important; height: auto !important; }
  .photos { grid-template-columns: repeat(3, 1fr); gap: 4mm; break-inside: avoid; }
  .photo { border: 0; border-radius: 0; background: none; }
  .photo figcaption { font-size: 6.6pt; padding: 3px 0 0; color: #8a8278; }
  .photo .ph-box { font-size: 7.5pt; }
  .source-note { margin-top: 8mm; padding: 10px 12px; background: var(--sand, #f3efe7); border: 0; border-left: 3px solid var(--red-dark); border-radius: 0; font-size: 8pt; break-inside: avoid; }
  .source-note p { font-size: 7.5pt; color: var(--ink-soft); }
  .source-note ul, .source-note li { font-size: 7.5pt; color: var(--ink-soft); }
  .source-note a, .cr-meta a { color: var(--ink); text-decoration: none; }
  .cr-meta { margin-top: 8mm; padding-top: 4mm; border-top: 1.5px solid var(--ink); font-size: 8pt; color: var(--ink-soft); }
  .legend, .rm-legend { font-size: 8.5pt; }
  .alt-table, .cr-hbars, .cr-detail, .kpis, .range-map { break-inside: avoid; }
}

/* Smart Cost Control — Live: aircraft registration form */
.cl-engine-row { margin-bottom: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cl-engine-row:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.cl-engine-row h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--khaki); margin: 0 0 8px; }
.cl-engine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 720px) { .cl-engine-grid { grid-template-columns: 1fr; } }

/* Smart Cost Control — Live: saved-aircraft fleet list (single-line rows, "+ New record" below) */
.cl-fleet-list { display: flex; flex-direction: column; gap: 8px; }
.cl-fleet-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; transition: border-color .15s, box-shadow .15s; }
.cl-fleet-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cl-fleet-reg { font-family: var(--font-head); font-weight: 700; color: var(--ink); min-width: 90px; }
.cl-fleet-ac { flex: 1; color: var(--ink-soft); }
.cl-fleet-arrow { color: var(--red-dark); font-weight: 700; }

/* Smart Cost Control — Live: real-time cost tracking, invoice log + manual-entry form */
.cl-tracking-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.cl-row-actions, .cl-row-confirm { display: inline-flex; gap: 6px; margin-top: 6px; white-space: normal; }
.cl-row-confirm { align-items: center; font-size: 12.5px; color: var(--khaki); }
.cl-inv-items-h { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--khaki); margin: 18px 0 8px; }
.cl-invoice-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
@media (max-width: 720px) { .cl-invoice-choice { grid-template-columns: 1fr; } }
.cl-report-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
@media (max-width: 900px) { .cl-report-choice { grid-template-columns: 1fr; } }
.cl-invoice-opt.is-active { border-color: var(--red-dark); box-shadow: var(--shadow); }
.cl-invoice-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; font: inherit; }
.cl-invoice-opt:hover:not(.is-disabled) { border-color: var(--red-dark); box-shadow: var(--shadow); }
.cl-invoice-opt b { color: var(--ink); font-size: 14.5px; }
.cl-invoice-opt span { color: var(--khaki); font-size: 12.5px; }
.cl-invoice-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.cl-invoice-form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.cl-inv-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.cl-inv-item-row2 { display: flex; align-items: flex-end; gap: 10px; }
.cl-inv-item-row2 .field { flex: 1; margin-bottom: 0; }
.cl-inv-item-remove { white-space: nowrap; }
.cl-inv-total { display: flex; justify-content: space-between; font-weight: 700; padding: 8px 0; border-top: 1px solid var(--line); margin: 4px 0 6px; }

/* Invoice PDF upload + OCR pre-fill (2026-09-27) */
.cl-upload-drop { border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 32px 20px; text-align: center; background: var(--paper-alt); margin-bottom: 8px; }
.cl-upload-drop p { margin: 4px 0; }
.cl-upload-icon { font-size: 32px; line-height: 1; margin-bottom: 6px; }
.cl-upload-drop label.btn { display: inline-block; margin-top: 8px; cursor: pointer; }
.cl-upload-busy { border-style: solid; }
.cl-upload-spinner { width: 28px; height: 28px; margin: 0 auto 10px; border: 3px solid var(--line-strong); border-top-color: var(--red); border-radius: 50%; animation: cl-spin 0.8s linear infinite; }
@keyframes cl-spin { to { transform: rotate(360deg); } }
.cl-upload-error { border-color: var(--bad); }
.cl-upload-confirm { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px; }
.cl-up-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; padding: 1px 7px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.cl-up-tag-ok { background: rgba(31, 122, 77, 0.12); color: var(--good); }
.cl-up-tag-guess { background: rgba(111, 99, 82, 0.15); color: var(--khaki); }
.cl-up-tag-missing { background: rgba(179, 38, 30, 0.1); color: var(--bad); }
.cl-up-banner { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.cl-up-banner-ok { background: rgba(31, 122, 77, 0.1); color: var(--good); }
.cl-up-banner-missing { background: rgba(179, 38, 30, 0.08); color: var(--bad); }

/* ---------- billing: checkout / my orders / sales decision (2026-10-06) ---------- */
.bill-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .bill-grid { grid-template-columns: 1fr; } }
.bill-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.bill-kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 12px; font-size: 14px; }
.bill-kv dt { color: var(--khaki); }
.bill-kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.bill-amount { font-size: 22px; font-weight: 800; font-family: var(--font-head); }
.bill-promo { display: inline-block; margin: 0 0 10px; }
.bill-steps { margin: 0; padding-left: 20px; font-size: 13.5px; }
.bill-steps li { margin-bottom: 6px; }
.bill-note { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; color: var(--ink); margin: 0 0 16px; }
.bill-note.is-warn { background: #fff7e6; border-color: #f0c36d; }
.bill-note.is-ok { background: #e6f4ea; border-color: #9fd3ae; }
.bill-note-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bill-current { margin-bottom: 16px; }
.bill-current-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.bill-current-head h2, .bill-current-head h3 { margin: 0; }
.bill-current-sub { color: var(--ink-soft); font-size: 14px; }
.bill-upload { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.bill-proforma { margin-bottom: 16px; }
.proforma-frame { width: 100%; height: 1000px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 8px; }
.status-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper-deep); color: var(--ink); white-space: nowrap; }
.status-chip.st-awaiting_payment, .status-chip.st-payment_reported { background: #fff1d6; color: #8a5a00; }
.status-chip.st-active, .status-chip.st-invoiced { background: #e6f4ea; color: var(--good); }
.status-chip.st-rejected, .status-chip.st-expired { background: #fdecea; color: var(--bad); }
.table-scroll { overflow-x: auto; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bill-table th { text-align: left; font-size: 12px; color: var(--khaki); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.bill-table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bill-table .num { text-align: right; }
.dec-panel { max-width: 720px; }
.dec-q { font-size: 22px; margin-top: 18px; }
.btn-dark-red { background: var(--bad); color: #fff; }
.btn-dark-red:hover { background: #8f1d17; }
.form-err:empty { display: none; }
.pricing-current-lbl { display: block; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--khaki); margin-bottom: 6px; }
