/* ================================================================
   N7362W Logbook — stylesheet
   Aesthetic: refined technical document. Aviation chart influence.
   Paper-warm background, deep navy accent, restrained color, sharp
   typographic hierarchy. Reads like a serious record, not a webapp.
   ================================================================ */

:root {
  --bg: #faf8f3;
  --paper: #ffffff;
  --ink: #161616;
  --ink-soft: #444;
  --muted: #6a6a6a;
  --rule: #e3ddcd;
  --rule-strong: #c9c2b1;
  --accent: #0b3a6f;
  --accent-soft: #e8eef6;
  --danger: #a52323;
  --success: #1d6f3f;
  --warning: #b86d00;

  --book-airframe: #1d6f3f;
  --book-engine:   #a52323;
  --book-propeller:#0b3a6f;
  --book-avionics: #6a3088;

  --font-display: "Charter", "Iowan Old Style", "Cambria", "Georgia", "Times New Roman", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Arial", sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;

  --shadow-sm: 0 1px 0 rgba(20, 20, 20, 0.04);
  --shadow-md: 0 2px 14px -4px rgba(20, 20, 20, 0.08);
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  /* Subtle paper texture via two stacked gradients */
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(11, 58, 111, 0.04), transparent 60%),
    radial-gradient(800px 400px at 90% 110%, rgba(165, 35, 35, 0.03), transparent 60%);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top bar ------------------------------------------------- */

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  /* No gap: "Open" and "Logbooks" sit flush, matching the landing footer
     where the two spans render as plain inline elements. */
}

.brand-tail {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.brand-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

.topnav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.topnav a {
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.topnav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.topsearch input {
  width: 240px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--ink);
}

.topsearch input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}

/* --- Flash messages ----------------------------------------- */

.flashes {
  margin-top: 16px;
}

.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 14px;
  border-left: 3px solid;
}

.flash-success {
  background: #e9f5ee;
  border-color: var(--success);
  color: var(--success);
}

.flash-error {
  background: #fbeaea;
  border-color: var(--danger);
  color: var(--danger);
}

/* --- Main content ------------------------------------------- */

main.container {
  padding-top: 32px;
  padding-bottom: 80px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

p { margin: 0 0 12px; }
p.lede { font-size: 17px; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--rule);
}

/* --- Hero / page head ---------------------------------------- */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}

.hero-text h1 {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 8px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.page-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-search {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-search input {
  flex: 1;
  max-width: 480px;
  padding: 10px 14px;
  font: inherit;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
}

.page-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* --- Buttons ------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #082e57;
  border-color: #082e57;
  color: white;
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.link-button {
  background: none;
  border: 0;
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
}

.link-button:hover { text-decoration: underline; }

/* --- Logbook grid (home) ------------------------------------ */

.logbook-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

@media (max-width: 800px) {
  .logbook-grid { grid-template-columns: repeat(2, 1fr); }
}

.logbook-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.logbook-card:nth-child(1) { border-top: 3px solid var(--book-airframe); }
.logbook-card:nth-child(2) { border-top: 3px solid var(--book-engine); }
.logbook-card:nth-child(3) { border-top: 3px solid var(--book-propeller); }
.logbook-card:nth-child(4) { border-top: 3px solid var(--book-avionics); }

.logbook-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.logbook-card-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.logbook-card-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
}

.logbook-card-action {
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 12px;
}

/* --- Tables ------------------------------------------------- */

.entry-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 14px;
  overflow: hidden;
}

.entry-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.entry-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.entry-table tbody tr:last-child td { border-bottom: 0; }

.entry-table tbody tr:hover {
  background: var(--bg);
}

.entry-table a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.entry-table a:hover { color: var(--accent); }

.col-date { width: 110px; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.col-book { width: 130px; }
.col-tach { width: 80px; font-family: var(--font-mono); color: var(--ink-soft); }
.col-photos { width: 70px; text-align: center; font-family: var(--font-mono); color: var(--muted); }
.col-ad { width: 200px; }

/* --- Logbook pills ------------------------------------------ */

.logbook-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid;
  background: white;
}

.logbook-airframe  { color: var(--book-airframe); border-color: var(--book-airframe); }
.logbook-engine    { color: var(--book-engine); border-color: var(--book-engine); }
.logbook-propeller { color: var(--book-propeller); border-color: var(--book-propeller); }
.logbook-avionics  { color: var(--book-avionics); border-color: var(--book-avionics); }

/* --- Entry detail page -------------------------------------- */

.entry-detail {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.entry-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.entry-meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.entry-meta-grid > div > span:nth-child(2) {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
}

.ad-list {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ad-list .meta-label { margin-right: 6px; }

.ad-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 2px;
}

.entry-body {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 15px;
  padding: 4px 0;
}

/* --- Photos ------------------------------------------------- */

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.photo {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.photo a { display: block; }

.photo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.photo-pdf {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 14px;
  gap: 8px;
}

.photo-pdf span { font-size: 32px; }

.photo figcaption {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  background: var(--paper);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upload-block {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
}

.upload-block summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
}

.upload-form {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.filebox {
  flex: 1;
  position: relative;
  display: block;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.filebox input { display: none; }

.raw-text {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

.raw-text summary { cursor: pointer; }
.raw-text pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 8px;
}

/* --- Forms -------------------------------------------------- */

.entry-form {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 900px;
}

.form-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.two-up { grid-template-columns: 1fr 1fr; }
.form-row.four-up { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 600px) {
  .form-row.two-up,
  .form-row.four-up { grid-template-columns: 1fr; }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

/* Force consistent height on single-line controls so that <input>, <select>,
   and <input type="date"> (which has native calendar chrome) all match. */
.form-field input,
.form-field select {
  height: 42px;
}

.form-field textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  height: auto;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.readonly-json {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  max-height: 360px;
  overflow-y: auto;
}

/* --- Photo library ----------------------------------------- */

.library-section {
  margin-bottom: 32px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.library-tile {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.library-tile img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.library-tile-meta {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  word-break: break-all;
}

/* ---------- Type badges (Phase 3A) ---------- */

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}
.type-maintenance { background: #e9eaee; color: #555; }
.type-inspection  { background: #e0ecfc; color: #19447b; }
.type-alteration  { background: #efe5fa; color: #5a2b97; }
.type-ad          { background: #fde9d4; color: #8a4710; }
.type-other       { background: #ffffff; color: #888; border: 1px solid #ccc; }

/* ---------- Type-specific fieldsets in the entry-edit form ---------- */

.entry-form fieldset {
  border: 1px solid #d8d8e0;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #fafbfd;
}
.entry-form fieldset legend {
  padding: 0 8px;
  font-weight: 600;
  font-size: 13px;
  color: #444;
}
.entry-form fieldset[hidden] { display: none; }

.cert-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.cert-row label { font-size: 11px; color: #777; display: block; margin-bottom: 2px; }
.cert-row input, .cert-row select { width: 100%; }

.warning-panel {
  margin-top: 16px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f0d27a;
  border-radius: 6px;
  font-size: 13px;
}
.warning-panel:empty { display: none; }
.warning-panel ul { margin: 0; padding-left: 18px; }
.warning-panel li { color: #6b5300; }
.warning-panel a { color: #6b5300; text-decoration: underline; }

.cert-statement-preview {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f4f7fc;
  border-left: 3px solid #19447b;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #19447b;
  font-size: 13px;
}

/* ---------- Dashboard (Phase 3B) ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.dash-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 18px;
}
.dash-card.wide { grid-column: 1 / -1; }
.dash-card h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
  color: var(--ink-soft);
}
.dash-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 0 0 10px;
}
.dash-dl dt { font-weight: 600; color: var(--muted); font-size: 13px; }
.dash-dl dd { margin: 0; font-size: 14px; }
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th, .dash-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.dash-table th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.dash-table tr.overdue td { color: var(--danger); }
.badge-unairworthy {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--danger);
  color: var(--paper);
  border-radius: 3px;
  margin-left: 6px;
}
.dash-dl dd.overdue-text { color: var(--danger); }
.badge-overdue {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--danger);
  color: var(--paper);
  border-radius: 3px;
  margin-left: 4px;
}
.btn.btn-sm { font-size: 12px; padding: 3px 8px; }

/* --- Auth / login page ------------------------------------- */

.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 32px 0;
}

.auth-providers .btn {
  text-align: center;
  padding: 12px 20px;
  font-size: 15px;
}

.auth-providers hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4px 0;
}

.topnav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.topnav-user a:not(.btn) {
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.topnav-user a:not(.btn):hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- Active aircraft indicator + switcher --------------------- */

.topnav-aircraft {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-left: 8px;
  white-space: nowrap;
}

.topnav-aircraft-switcher {
  position: relative;
  margin-left: 8px;
}

.topnav-aircraft-switcher summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.topnav-aircraft-switcher summary::-webkit-details-marker {
  display: none;
}

.topnav-aircraft-switcher ul {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 140px;
  z-index: 100;
}

.topnav-aircraft-switcher ul li {
  margin: 0;
}

.topnav-aircraft-switcher ul li form button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}

.topnav-aircraft-switcher ul li form button:hover {
  background: var(--accent-soft);
}

/* ---- Email verification banner ---- */
.banner {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.banner.banner-warning {
  background: #fff8e6;
  border-bottom: 1px solid #f0d27a;
  color: #6b5300;
}
.banner.banner-warning .btn {
  background: #f0d27a;
  color: #4a3800;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.banner.banner-warning .btn:hover {
  background: #e0c05a;
}

/* ================================================================
   Landing page (public marketing — skeleton from ticket 0010)
   Slightly elevated typography hierarchy on landing-only sections.
   Reuses the existing palette tokens — no new colors, no new fonts.
   ================================================================ */

.topnav-public {
  /* Public-nav links sit further apart than the dense app-nav. */
  gap: 8px;
}

.topnav-public-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing {
  max-width: 960px;
  margin: 0 auto;
}

.landing-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule);
}

.landing-section:last-child {
  border-bottom: none;
}

.landing-hero {
  padding-top: 88px;
  padding-bottom: 88px;
  text-align: center;
}

.landing-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.landing-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--ink);
}

.landing-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto 32px;
  max-width: 600px;
}

.landing-hero-cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-hero-trust {
  margin-top: 24px;
  font-size: 13px;
}

.landing-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  border-bottom: none;
  padding-bottom: 0;
}

.landing-section-lede {
  font-size: 16px;
  margin: 0 0 32px;
  max-width: 640px;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.landing-feature {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.landing-feature h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--ink);
}

.landing-feature p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}

.landing-screenshot-placeholder {
  background: var(--paper);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  padding: 80px 24px;
  text-align: center;
}

.landing-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.landing-faq-list details {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.landing-faq-list details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.landing-faq-list details[open] summary {
  margin-bottom: 8px;
}

.landing-faq-list details p {
  color: var(--ink-soft);
  margin: 0;
}

.landing-cta {
  text-align: center;
  padding: 80px 0;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 16px;
}

/* ================================================================
   Landing page — ticket 0016 content refinements
   Additive: every selector is .landing-* prefixed.
   Mobile-first; breakpoints at 640px / 960px / 1180px.
   ================================================================ */

/* Accessibility helper used by the cadence toggle's hidden label. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Centered section heading variant (used on pricing). */
.landing-section-head {
  margin: 0 0 36px;
}

.landing-section-head-center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.landing-section-head-center .landing-section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Hero ---------- */

.landing-hero {
  /* Two-column layout: copy left, photo right, on wider screens. Stacks
     on mobile. Photo is decorative — the lede already explains the product. */
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 80px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

.landing-hero-inner {
  max-width: 640px;
  margin: 0;
}

.landing-hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 16px;
}

.landing-h1 {
  font-size: 48px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.landing-h1-soft {
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 500;
}

.landing-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 16px;
  max-width: 560px;
}

.landing-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 28px;
  font-weight: 600;
}

.landing-hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.landing-hero-trust {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.landing-hero-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.landing-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.landing-hero-figure figcaption {
  padding: 8px 14px;
  font-size: 12px;
  font-style: italic;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}

/* ---------- Features ---------- */

.landing-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.landing-feature {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.landing-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--rule-strong);
}

.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.landing-feature h3 {
  font-size: 17px;
  margin: 0;
  line-height: 1.3;
}

.landing-feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Sample output: screenshots ---------- */

.landing-screenshots {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.landing-screenshot {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.landing-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.landing-screenshot figcaption {
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.landing-screenshot figcaption strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ---------- Pricing partial ---------- */

.landing-section-pricing {
  background:
    radial-gradient(800px 300px at 50% 0%, var(--accent-soft) 0%, transparent 60%);
}

.landing-pricing {
  max-width: 880px;
  margin: 0 auto;
}

/* Two-column grid; collapses to single column at small viewports via the
   mobile media query further down this file. */
.landing-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.landing-pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px 22px;
}

.landing-pricing-card-pro {
  border: 2px solid var(--accent);
  padding: 27px 21px;  /* compensate so the heavier border doesn't shift content */
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.12);
}

.landing-pricing-card-fleet {
  background: linear-gradient(180deg, var(--paper) 0%, var(--ink-faint, #f4f4f5) 100%);
}

/* Pill above the card. Pro = filled accent; Fleet = soft outlined. */
.landing-pricing-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.18);
}

.landing-pricing-ribbon-soft {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong, var(--rule));
  box-shadow: none;
}

.landing-pricing-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.landing-pricing-tagline {
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.4;
  min-height: 38px;  /* keeps three taglines roughly aligned across cards */
}

/* Segmented control: two real <button>s in a pill-shaped track. */
.landing-pricing-segmented {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  background: var(--ink-faint, #f4f4f5);
  border: 1px solid var(--rule);
  border-radius: 999px;
  margin: 0 0 4px;
  align-self: flex-start;
}

.landing-pricing-seg {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.1;
  transition: background 0.15s ease, color 0.15s ease;
}

.landing-pricing-seg:hover {
  color: var(--ink);
}

.landing-pricing-seg[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.landing-pricing-seg-hint {
  font-size: 11.5px;
  font-style: italic;
  margin: 0 0 14px;
  color: var(--success, #2f7d3d);
}

.landing-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 18px;
  min-height: 44px;  /* keeps prices aligned across cards */
}

.landing-price-amount {
  font-family: var(--font-display, var(--font-sans));
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.landing-price-period {
  font-size: 13px;
  font-weight: 500;
}

/* Non-numeric price (e.g. "Contact us") — smaller, fits in narrow column. */
.landing-price-amount-text {
  font-family: var(--font-display, var(--font-sans));
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}

.landing-price-fleet {
  align-items: center;
}

/* Section heading above the features list. Lives outside the <ul> so it
   doesn't compete with check icons or wrap awkwardly inside an <li>. */
.landing-pricing-features-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.landing-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

/* Hanging-indent layout: check icon absolutely positioned at the start of
   the first line; wrapped text aligns under itself (not under the icon).
   Replaces the previous flex-row layout that left orphan icons on long
   multi-line items. */
.landing-pricing-features li {
  position: relative;
  padding: 8px 0 8px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.landing-pricing-features li:last-child {
  border-bottom: none;
}

.landing-pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 14px;
  background-color: var(--success, #2f7d3d);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

.landing-pricing-features li.landing-pricing-future {
  color: var(--muted);
  font-style: italic;
}

.landing-pricing-features li.landing-pricing-future::before {
  background-color: var(--muted);
  opacity: 0.55;
}

.landing-pricing-cta {
  width: 100%;
  text-align: center;
}

.landing-pricing-footnote {
  text-align: center;
  font-size: 13px;
  margin: 28px auto 0;
  max-width: 560px;
  line-height: 1.55;
}

/* ---------- FAQ ---------- */

.landing-faq-list {
  margin: 0 auto;
}

.landing-faq-list details {
  padding: 18px 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.landing-faq-list details:hover {
  border-color: var(--rule-strong);
}

.landing-faq-list details[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.landing-faq-list summary {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  padding-right: 28px;
  position: relative;
}

.landing-faq-list summary::-webkit-details-marker {
  display: none;
}

.landing-faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.15s;
}

.landing-faq-list details[open] summary::after {
  content: "−";
}

.landing-faq-list details p,
.landing-faq-list details ul {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.landing-faq-list details ul {
  padding-left: 20px;
}

.landing-faq-list details ul li {
  margin-bottom: 4px;
}

.landing-faq-list details em {
  color: var(--ink);
}

.landing-faq-list details a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Final CTA ---------- */

.landing-cta {
  text-align: center;
  padding: 96px 24px;
  background:
    radial-gradient(900px 400px at 50% 50%, var(--accent-soft) 0%, transparent 70%);
}

.landing-cta-wedge {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  font-weight: 600;
}

.landing-cta-h2 {
  font-size: 36px;
  margin: 0 auto 12px;
  max-width: 640px;
}

.landing-cta-sub {
  font-size: 15px;
  margin: 0 auto 28px;
  max-width: 480px;
}

/* ---------- Landing footer wedge ---------- */

.landing-footer {
  padding: 40px 24px 80px;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.landing-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.landing-footer-brand {
  margin: 0;
  font-size: 14px;
}

.landing-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.landing-footer-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.landing-footer-copy {
  margin: 0;
  font-size: 12px;
}

/* ---------- Responsive ---------- */

/* Tablet ≥ 640px */
@media (min-width: 640px) {
  .landing-h1 { font-size: 56px; }
  .landing-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-hero-cta { gap: 16px; }
  /* Pricing stays single-column on tablet — a 2-col layout with three
     cards drops the third onto its own row, which looks lopsided. */
}

/* Desktop ≥ 960px */
@media (min-width: 960px) {
  .landing-hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 56px;
    padding-top: 88px;
    padding-bottom: 96px;
  }
  .landing-h1 { font-size: 60px; }
  .landing-feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .landing-pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .landing-pricing { max-width: 1100px; }
}

/* Wide ≥ 1180px */
@media (min-width: 1180px) {
  .landing { max-width: 1080px; }
  .landing-h1 { font-size: 64px; }
}

/* Mobile-only: drop the section padding a touch and stack everything. */
@media (max-width: 640px) {
  .landing-section { padding: 48px 0; }
  .landing-hero { padding-top: 40px; padding-bottom: 56px; }
  .landing-h1 { font-size: 36px; }
  .landing-h2 { font-size: 26px; }
  .landing-cta-h2 { font-size: 26px; }
  .landing-lede { font-size: 16px; }
  .landing-tagline { font-size: 17px; }
  .landing-pricing-card { padding: 24px 20px; }
  .landing-pricing-segmented { align-self: stretch; justify-content: center; }
  .landing-feature { padding: 20px; }
  .landing-screenshots { gap: 28px; }
  .landing-cta { padding: 64px 16px; }
}

/* ---------- App shell: top-bar action group + site footer ---------- */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.site-footer .container {
  padding-top: 22px;
  padding-bottom: 22px;
}

.site-footer p { margin: 0; }
