/* The logbook screens (logbook.js): Dashboard, Timeline, Logbook, Components,
   Findings. Desktop first (George, 2026-09-28); the phone layout comes later.
   Over the theme's variables, so light and dark and both themes just work;
   one colour per kind of entry, readable on either ground. */

:root {
  --c-annual: #087CF4; --c-hundred: #0E7490; --c-repair: #5B6673; --c-overhaul: #B4531E;
  --c-alteration: #5B3FA6; --c-component: #0891B2; --c-check: #6B8FC7; --c-wb: #8A6D3B; --c-other: #9AA5B1;
  --bad: #B42318; --bad-bg: #FEF3F2; --warn: #8A4B00; --warn-bg: #FFF4E5; --good: #1E7A46; --good-bg: #ECF8F1;
  --hatch: #E6EBF2;
}
:root[data-theme="dark"] {
  --c-repair: #B9C4D3; --c-check: #8FB6E8; --c-alteration: #A58BEA; --c-overhaul: #E0A868; --c-wb: #C8A86A;
  --c-component: #4DE4FF; --c-hundred: #34C3D9; --c-other: #7D8A9C;
  --bad: #FF9A8A; --bad-bg: #3A1814; --warn: #E0A868; --warn-bg: #2A2117; --good: #6FD39A; --good-bg: #11301F;
  --hatch: #16294A;
}

.lb { flex-grow: 1; min-height: 0; overflow: auto; padding: 32px 40px 56px; }
.lb-wrap { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.lb h1 { font-size: 34px; line-height: 1.1; }
.lb h2 { margin: 0; font-size: 20px; font-weight: 600; }
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lb-head .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.lb-card { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.lb-card > h2 { margin-bottom: 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lb-card > h2 a { font-family: var(--serif); font-size: 14px; font-weight: 600; text-decoration: none; }
.lb-note { font-size: 13px; color: var(--muted); }
.lb-advisory { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.lb-empty { color: var(--muted); padding: 40px 0; text-align: center; }
.lb a.ref { font-family: var(--mono); font-size: 12px; text-decoration: none; white-space: nowrap; }

/* tiles */
.lb-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.lb-tile { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
           display: flex; flex-direction: column; gap: 4px; }
.lb-tile .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lb-tile .v { font-family: var(--label); font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.lb-tile .v small { font-size: 16px; color: var(--muted); font-weight: 500; }
.lb-tile .s { font-size: 13px; color: var(--muted); }
.lb-tile.bad .v { color: var(--bad); }

.lb-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.lb-side { display: flex; flex-direction: column; gap: 24px; }

/* state pills */
.st { display: inline-block; min-width: 86px; text-align: center; padding: 3px 10px; border-radius: 999px; font-family: var(--mono);
      font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; white-space: nowrap; }
.st.overdue { background: var(--bad-bg); color: var(--bad); }
.st.soon { background: var(--warn-bg); color: var(--warn); }
.st.ok { background: var(--good-bg); color: var(--good); }
.st.conditional, .st.unknown { background: var(--desk); color: var(--muted); }

/* the due list */
.due { display: flex; flex-direction: column; }
.due-row { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; gap: 16px; align-items: start;
           padding: 14px 0; border-top: 1px solid var(--line); }
.due-row:first-child { border-top: 0; padding-top: 0; }
.due-row .what { font-weight: 600; }
.due-row .text { color: var(--soft); font-size: 15px; }
.due-row .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.due-row .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lb-btn { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent;
          color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lb-btn:hover { background: var(--desk); }
.lb-btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lb-btn.danger { color: var(--bad); }
.lb-confirm { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; border-radius: 8px; background: var(--desk); }
.lb-confirm input { height: 36px; padding: 0 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; font-size: 14px; }
.lb-confirm .row { gap: 8px; }

/* categories */
.cat { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
       text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.cat i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-other); flex-shrink: 0; }
.cat-annual i { background: var(--c-annual); } .cat-hundred i { background: var(--c-hundred); } .cat-repair i { background: var(--c-repair); }
.cat-overhaul i { background: var(--c-overhaul); } .cat-alteration i { background: var(--c-alteration); }
.cat-component i { background: var(--c-component); } .cat-check i { background: var(--c-check); } .cat-wb i { background: var(--c-wb); }

.recent { display: flex; flex-direction: column; }
.recent a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line);
            text-decoration: none; color: var(--ink); }
.recent a:first-child { border-top: 0; padding-top: 0; }
.recent a:hover .w { color: var(--link); }
.recent .d { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.recent .w { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.fsum { display: flex; flex-direction: column; gap: 10px; }
.fsum a { text-decoration: none; color: var(--ink); display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.fsum a:hover { color: var(--link); }
.fsum .n { font-family: var(--label); font-weight: 600; font-size: 20px; min-width: 26px; color: var(--accent); }

/* timeline */
.tl-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tl-zoom { display: flex; gap: 6px; }
.tl-zoom button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.tl-legend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 2px; cursor: pointer;
                    font-family: var(--mono); font-size: 12px; color: var(--soft); }
.tl-legend button i { width: 10px; height: 10px; border-radius: 50%; }
.tl-legend button[aria-pressed="false"] { opacity: 0.35; }
.tl-box { position: relative; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 20px 64px 16px 24px; }
.tl-svg { display: block; width: 100%; overflow: visible; }
.tl-svg .axis { stroke: var(--line); }
.tl-svg .grid { stroke: var(--line); stroke-dasharray: 2 4; }
.tl-svg text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.tl-svg .yr { text-anchor: middle; }
.tl-svg .stem { stroke-width: 2; stroke-opacity: 0.55; }
.tl-svg .dot { stroke: var(--field); stroke-width: 2; cursor: pointer; }
.tl-svg .dot:hover, .tl-svg .dot.on { stroke: var(--ink); }
.tl-svg .gap { fill: url(#tl-hatch); }
.tl-svg .gap-label { font-size: 10px; }
.tl-svg .meter { stroke: var(--muted); stroke-dasharray: 3 3; }
.tl-svg .today { stroke: var(--accent); stroke-width: 1.5; }
.tl-svg .lane-label { font-family: var(--serif); font-size: 12px; font-weight: 600; fill: var(--soft); }
.tl-svg .life { rx: 4; }
.tl-svg .life.engine { fill: rgba(8, 124, 244, 0.55); } .tl-svg .life.prop { fill: rgba(14, 116, 144, 0.55); }
.tl-svg .life.unknown { fill: url(#tl-fade); }
.tl-svg .life-label { font-size: 10.5px; fill: var(--ink); pointer-events: none; }
.tl-svg .c-annual { fill: var(--c-annual); stroke: var(--c-annual); } .tl-svg .c-hundred { fill: var(--c-hundred); stroke: var(--c-hundred); }
.tl-svg .c-repair { fill: var(--c-repair); stroke: var(--c-repair); } .tl-svg .c-overhaul { fill: var(--c-overhaul); stroke: var(--c-overhaul); }
.tl-svg .c-alteration { fill: var(--c-alteration); stroke: var(--c-alteration); } .tl-svg .c-component { fill: var(--c-component); stroke: var(--c-component); }
.tl-svg .c-check { fill: var(--c-check); stroke: var(--c-check); } .tl-svg .c-wb { fill: var(--c-wb); stroke: var(--c-wb); }
.tl-svg .c-other { fill: var(--c-other); stroke: var(--c-other); }
.tl-svg .dot { stroke: var(--field); }
.tl-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.tl-pick .when { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tl-pick .work { margin-top: 6px; color: var(--soft); }

/* logbook: the list, and the page with its entries */
.lbk { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.lbk-list { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 150px); }
.lbk-filters { display: flex; flex-direction: column; gap: 8px; }
.lbk-filters select, .lbk-filters input[type="search"] { height: 38px; padding: 0 10px; border: 1px solid var(--line); background: var(--field);
                                                        color: var(--ink); font: inherit; font-size: 14px; }
.lbk-filters label { font-size: 13px; color: var(--soft); display: flex; gap: 8px; align-items: center; }
.lbk-count { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.lbk-items { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.lbk-year { position: sticky; top: 0; background: var(--desk); padding: 4px 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lbk-item { display: block; padding: 10px 12px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lbk-item:hover { background: var(--desk); }
.lbk-item[aria-current="true"] { background: var(--s1-bg); box-shadow: inset 3px 0 0 var(--accent); }
.lbk-item .top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lbk-item .w { font-size: 13.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lbk-item .doubt { color: var(--warn); }

.pg { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pg-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-bar .t { font-weight: 600; }
.pg-bar .t span { color: var(--muted); font-weight: 400; }
.pg-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pg-scan { background: var(--desk); border: 1px solid var(--line); border-radius: 10px; padding: 12px; position: sticky; top: 0; }
.pg-scan button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pg-scan img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.pg-scan .cap { font-size: 12px; color: var(--muted); margin-top: 8px; }
.pg-entries { display: flex; flex-direction: column; gap: 12px; }
.ent { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.ent.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ent .hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ent .hd a { text-decoration: none; color: var(--ink); font-weight: 600; }
.ent dl { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 6px 12px; margin: 12px 0 0; font-size: 14px; }
.ent dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ent dd { margin: 0; }
.ent .work { margin-top: 12px; font-size: 15px; line-height: 1.5; }
.ent .unsure { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 2px; }
.ent .doubts { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.ent .src { margin-top: 12px; font-size: 12px; color: var(--muted); }
.pg details { border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.pg summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; }
.pg .transcript { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--soft); }

/* the scan, full size */
.lb-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(4, 17, 38, 0.92); overflow: auto; display: flex; justify-content: center;
           align-items: flex-start; padding: 40px; cursor: zoom-out; }
.lb-zoom img { max-width: none; width: min(1600px, 100%); height: auto; background: #fff; }

/* components and findings */
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
               color: var(--muted); padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); }
.lb-table td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lb-table td .n { font-weight: 600; } .lb-table td .m { color: var(--muted); font-size: 13px; }
.lb-table tr.removed td { color: var(--muted); }
.find-sec { display: flex; flex-direction: column; gap: 14px; }
.find-sec > h2 { font-size: 22px; }
.find-sec > p { color: var(--muted); margin-top: -8px; }
.finds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.find { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.find.disagree { border-left: 4px solid var(--bad); } .find.other_aircraft { border-left: 4px solid var(--warn); }
.find.agree { border-left: 4px solid var(--good); } .find.people { border-left: 4px solid var(--c-check); } .find.gap { border-left: 4px solid var(--c-other); }
.find h3 { margin: 0; font-size: 16px; }
.find p { color: var(--soft); font-size: 14.5px; }
.find .refs { display: flex; flex-wrap: wrap; gap: 6px; }
.find .refs a { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--desk); text-decoration: none; color: var(--link); }

/* links drawn as buttons */
a.lb-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* a logbook site has five more tabs: a tighter header, nothing wrapping */
.has-logbooks .tabs { gap: 16px; font-size: 13.5px; letter-spacing: 0.03em; }
.has-logbooks .tabs a, .has-logbooks .bar .btn-quiet, .has-logbooks .bar .usage { white-space: nowrap; }
.has-logbooks .bar { gap: 20px; padding: 0 28px; }

/* ---- contrast (George, 2026-09-28): the screens sit on a tinted ground and
   every widget is a white card with an edge and a soft shadow ---- */
:root { --lb-ground: #EDF1F6; --lb-edge: #D5DDE8; --lb-shadow: 0 1px 2px rgba(15, 27, 45, 0.06), 0 6px 18px rgba(15, 27, 45, 0.06); }
:root[data-theme="dark"] { --lb-ground: #041126; --lb-edge: #23385A; --lb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3); }
.lb { background: var(--lb-ground); }
.lb-card, .lb-tile, .tl-box, .find, .ent, .pg details, .lbk-items, .pg-scan {
  border-color: var(--lb-edge); box-shadow: var(--lb-shadow); }
.lb-card, .lb-tile, .tl-box, .find, .ent, .pg details, .lbk-items { background: var(--field); }
.pg-scan { background: var(--field); }
.lbk-filters select, .lbk-filters input[type="search"] { border-color: var(--lb-edge); background: var(--field); border-radius: 8px; }
.lbk-year { background: var(--lb-ground); }
.lb-btn { background: var(--field); border-color: var(--lb-edge); }
.lb-btn.solid { background: var(--accent); border-color: var(--accent); }
.tl-zoom button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.lb-tile .k, .lb-card > h2 { color: var(--ink); }
.lb-tile .k { color: var(--muted); }
.lb-card > h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* the timeline's caption box */
.tl-tip { position: absolute; z-index: 5; pointer-events: none; width: max-content; max-width: 340px; padding: 10px 12px;
          background: var(--ink); color: var(--ground); border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
          font-size: 13px; line-height: 1.4; transform: translate(-50%, calc(-100% - 12px)); }
.tl-tip::after { content: ""; position: absolute; left: var(--arrow, 50%); bottom: -6px; width: 12px; height: 12px; margin-left: -6px;
                 background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.tl-tip.below { transform: translate(-50%, 12px); }
.tl-tip.below::after { bottom: auto; top: -6px; }
.tl-tip .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; opacity: 0.75; }
.tl-tip .t { font-weight: 600; margin-top: 2px; }
.tl-tip .w { margin-top: 4px; opacity: 0.9; }
.tl-tip .h { margin-top: 6px; font-size: 11.5px; opacity: 0.7; }
.tl-svg .dot:focus { outline: none; stroke: var(--ink); stroke-width: 3; }

/* the picked entry, with its page right under it */
.tl-pick { grid-template-columns: minmax(0, 1fr); }
.tl-pick .hd { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.tl-scan { margin-top: 16px; }
.tl-scan button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 980px; width: 100%; }
.tl-scan img { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.tl-scan .cap { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* the page's text, typed out, rendered (not raw Markdown) */
.pg summary .sum-note { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.typed { padding: 4px 18px 18px; font-size: 14.5px; line-height: 1.55; color: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.typed h4 { margin: 8px 0 0; font-size: 15px; color: var(--ink); }
.typed h4:first-child { margin-top: 0; }
.typed blockquote { margin: 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--lb-ground); border-radius: 0 6px 6px 0;
                    font-family: var(--mono); font-size: 13px; white-space: pre-wrap; color: var(--ink); }
.typed ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.typed table { border-collapse: collapse; font-size: 13.5px; }
.typed td { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.typed code { font-family: var(--mono); font-size: 12.5px; }
.typed .unsure { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 2px; }

.lbk { grid-template-columns: 410px minmax(0, 1fr); }

/* ADs and SBs: a diamond on the day's stem, and in the legend and lists */
.tl-svg .adm { fill: #D92D20; stroke: var(--field); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; rotate: 45deg; pointer-events: none; }
.tl-legend .ad-key { width: 9px; height: 9px; border-radius: 1px; background: #D92D20; transform: rotate(45deg); }
.cat.ad-cat { color: #D92D20; margin-left: 12px; }
:root[data-theme="dark"] .tl-svg .adm, :root[data-theme="dark"] .tl-legend .ad-key { fill: #FF8A7A; background: #FF8A7A; }
:root[data-theme="dark"] .cat.ad-cat { color: #FF8A7A; }
.tl-day { font-size: 20px; margin: 0 0 4px; }
.tl-entry { padding: 14px 0; border-top: 1px solid var(--line); }
.tl-entry:first-of-type { border-top: 0; }
.tl-entry .work { margin-top: 8px; }

/* ---- a colour per kind that no other kind resembles (George, 2026-09-28):
   used by the timeline's markers and by every list and card ---- */
:root {
  --c-annual: #2563EB; --c-hundred: #16A34A; --c-ad: #DC2626; --c-check: #0891B2; --c-component: #CA8A04;
  --c-wb: #92400E; --c-other: #9CA3AF; --c-repair: #EA580C; --c-alteration: #9333EA; --c-overhaul: #DB2777;
}
:root[data-theme="dark"] {
  --c-annual: #60A5FA; --c-hundred: #4ADE80; --c-ad: #F87171; --c-check: #22D3EE; --c-component: #FACC15;
  --c-wb: #D6A36A; --c-other: #9CA3AF; --c-repair: #FB923C; --c-alteration: #C084FC; --c-overhaul: #F472B6;
}
.cat-check i { background: var(--c-check); } .cat-component i { background: var(--c-component); }

/* the timeline: thin neutral stems, one coloured marker per kind of work */
.tl-box { padding: 20px 64px 16px 24px; }
.tl-svg { width: auto; }
.tl-svg .stem { stroke: var(--muted); stroke-width: 1.25; stroke-opacity: 0.45; }
.tl-svg .mk { stroke: var(--field); stroke-width: 1.5; cursor: pointer; }
.tl-svg .mk:hover, .tl-svg .mk.on, .tl-svg .mk:focus { stroke: var(--ink); stroke-width: 2.5; outline: none; }
.tl-svg .mk.diamond { transform-box: fill-box; transform-origin: center; rotate: 45deg; }
.tl-svg .k-annual { fill: var(--c-annual); } .tl-svg .k-hundred { fill: var(--c-hundred); } .tl-svg .k-ad { fill: var(--c-ad); }
.tl-svg .k-check { fill: var(--c-check); } .tl-svg .k-component { fill: var(--c-component); } .tl-svg .k-wb { fill: var(--c-wb); }
.tl-svg .k-other { fill: var(--c-other); } .tl-svg .k-repair { fill: var(--c-repair); } .tl-svg .k-alteration { fill: var(--c-alteration); }
.tl-svg .k-overhaul { fill: var(--c-overhaul); }
.tl-legend .key { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tl-legend .key-square { border-radius: 2px; }
.tl-legend .key-diamond { border-radius: 1px; width: 9px; height: 9px; transform: rotate(45deg); }
.tl-legend .k-annual { background: var(--c-annual); } .tl-legend .k-hundred { background: var(--c-hundred); } .tl-legend .k-ad { background: var(--c-ad); }
.tl-legend .k-check { background: var(--c-check); } .tl-legend .k-component { background: var(--c-component); } .tl-legend .k-wb { background: var(--c-wb); }
.tl-legend .k-other { background: var(--c-other); } .tl-legend .k-repair { background: var(--c-repair); } .tl-legend .k-alteration { background: var(--c-alteration); }
.tl-legend .k-overhaul { background: var(--c-overhaul); }
.cat.ad-cat { color: var(--c-ad); }

/* annual and 100-hour inspections are one family: one colour, one square */
:root { --c-inspection: var(--c-annual); }
.tl-svg .k-inspection { fill: var(--c-annual); }
.tl-legend .k-inspection { background: var(--c-annual); }

.tl-legend .tl-all { height: 30px; padding: 0 12px; margin-right: 6px; font-family: var(--serif); font-size: 13px; }


/* ---- the aircraft tab row, under the header (layout A: two or more aircraft) ---- */
.ac-tabs { display: flex; align-items: stretch; gap: 4px; min-height: 58px; padding: 0 28px; flex-shrink: 0;
           background: var(--field); border-bottom: 1px solid var(--lb-edge); }
.ac-tab { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-width: 120px;
          border-bottom: 3px solid transparent; text-decoration: none; color: var(--soft); line-height: 1.2; }
.ac-tab:hover { background: var(--lb-ground); color: var(--ink); }
.ac-tab[aria-selected="true"] { border-bottom-color: var(--accent); background: var(--lb-ground); color: var(--ink); }
.ac-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ac-tab b { font-weight: 600; font-size: 15px; }
.ac-tab.ac-fleet { flex-direction: row; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.ac-tab.ac-fleet svg rect { fill: none; stroke: currentColor; stroke-width: 1.8; }
.ac-status { font-size: 12px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-status.bad { color: var(--bad); } .ac-status.warn { color: var(--warn); } .ac-status.good { color: var(--good); }
.ac-thumb { width: 34px; height: 26px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
/* each screen's own buttons, at the right of the row (2026-10-01) */
.ac-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.ac-actions:empty { display: none; }
.ac-actions .ac-act { display: inline-flex; align-items: center; gap: 8px; height: 38px; min-height: 0; padding: 0 16px;
                      font-size: 14px; font-weight: 600; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.ac-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--on-accent);
            font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.ac-actions .tl-zoom { flex-wrap: wrap; }
.sq-form[hidden] { display: none; }

/* squawks: the mechanic, ticks, and the send dialog (2026-10-01) */
.sq-mech { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-radius: 10px;
           background: var(--desk); font-size: 14px; color: var(--soft); }
.sq-mech .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sq-mech b { color: var(--ink); }
.sq-mech .lb-btn { margin-left: auto; }
.sq-pick { width: 18px; height: 18px; margin: 2px 4px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.sq-sent { margin: 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.sq-sentnote { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--desk); color: var(--good); font-weight: 600; }
.lb-modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 24, 0.38); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; overflow: auto; }
.lb-modal { width: min(560px, 100%); background: var(--field); border: 1px solid var(--lb-edge); border-radius: 14px; box-shadow: var(--lb-shadow);
            padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.sq-send, .sq-mform { display: flex; flex-direction: column; gap: 10px; }
.sq-send textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field); color: var(--ink); }
.sq-to { margin: 0; color: var(--soft); font-size: 14px; }
.sq-sendlist { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
/* the greeting in the middle of the row (2026-10-01) */
.ac-greet { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 24px; }
.ac-greet b { font-size: 14px; font-weight: 600; color: var(--ink); }
.ac-line { display: block; max-width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
           font: inherit; font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.ac-line:hover .q { color: var(--ink); }
.ac-line .by { color: var(--muted); }
.ac-otd .by { color: var(--accent); font-weight: 600; }
@media (max-width: 1100px) { .ac-greet { display: none; } }

/* Manage > People: the mechanic per aircraft */
.mc-card { display: flex; flex-direction: column; gap: 12px; }
.mc-list { display: flex; flex-direction: column; }
.mc-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.mc-reg { font-family: var(--mono); font-size: 14px; }
.mc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-name { font-weight: 600; }

.ib-where { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.ib-read { color: var(--good); font-weight: 600; text-decoration: none; }
.ib-read:hover { text-decoration: underline; }
.ib-failed { color: var(--bad); }

/* the New logs side panel, opened from the row */
.lb-panel-back { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 24, 0.38); display: flex; justify-content: flex-end; }
.lb-panel { width: min(640px, 100%); height: 100%; overflow: auto; background: var(--lb-ground); border-left: 1px solid var(--lb-edge);
            box-shadow: var(--lb-shadow); padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.lb-panel-x { align-self: flex-end; }

/* ---- the Fleet view: a card per aircraft ---- */
.fleet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fleet-card { display: flex; flex-direction: column; gap: 6px; padding: 0 22px 20px; overflow: hidden; background: var(--field); border: 1px solid var(--lb-edge);
              border-radius: 14px; box-shadow: var(--lb-shadow); text-decoration: none; color: var(--ink); }
.fleet-card:hover { border-color: var(--accent); color: var(--ink); }
.fleet-card .fphoto { height: 160px; margin: 0 -22px 12px; border-bottom: 1px solid var(--lb-edge); }
.fleet-card .reg { font-family: var(--label); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.fleet-card .mm { font-size: 13.5px; color: var(--muted); }
.fleet-card .fstat { margin-top: 6px; }
.fleet-card .fnext { font-size: 13.5px; color: var(--soft); }
.fleet-card .fmeta { font-size: 13px; color: var(--muted); }
.set-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }

/* ---- the owner's photo of the aircraft: big on its dashboard, small in its tab and Fleet card ---- */
.lb-ident { display: flex; align-items: center; gap: 24px; }
.ac-photo { position: relative; width: 240px; height: 150px; flex-shrink: 0; border-radius: 14px; overflow: hidden;
            border: 1px solid var(--lb-edge); background: var(--lb-ground); display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.ac-photo img, .ac-thumb img, .fphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ac-thumb.none, .fphoto.none { display: flex; align-items: center; justify-content: center; background: var(--lb-ground); }
.fphoto { display: block; }
svg.plane { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.ac-photo .ph-note { font-size: 13px; }
.ac-photo.none { padding-bottom: 34px; }
.ac-photo .ph-tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.ac-photo .ph-btn { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: rgba(7, 22, 43, 0.8); color: #FFFFFF;
                    font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ac-photo .ph-btn:hover { background: rgba(7, 22, 43, 0.95); }
.ac-photo .ph-btn:disabled { opacity: 0.7; cursor: default; }
/* over a photo: a grey corner tab, and the buttons only once it is clicked */
.ac-photo .ph-corner { position: absolute; top: 0; right: 0; width: 38px; height: 38px; padding: 0; border: 0; cursor: pointer;
                       background: rgba(7, 22, 43, 0.38); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.ac-photo .ph-corner::after { content: ""; position: absolute; top: 7px; right: 7px; width: 3px; height: 3px; border-radius: 50%;
                              background: #FFFFFF; box-shadow: -5px 0 0 #FFFFFF, -10px 0 0 #FFFFFF; }   /* "…" */
.ac-photo .ph-corner:hover, .ac-photo .ph-corner[aria-expanded="true"] { background: rgba(7, 22, 43, 0.72); }
.ac-photo .ph-corner:focus-visible { outline: none; background: rgba(7, 22, 43, 0.85); }
.ac-photo .ph-menu { top: 8px; bottom: auto; right: 44px; }
.ac-photo .ph-problem { position: absolute; left: 8px; right: 8px; top: 8px; margin: 0; padding: 6px 8px; border-radius: 7px;
                        background: var(--bad-bg); color: var(--bad); font-size: 12.5px; }

/* ---- Manage: the owner's aircraft, and adding one from the FAA registry ---- */
.mg-list { display: flex; flex-direction: column; gap: 4px; }
.mg-plane { display: grid; grid-template-columns: 96px minmax(0, 1fr) 280px; gap: 20px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.mg-thumb { width: 96px; height: 64px; border-radius: 8px; overflow: hidden; }
.mg-thumb.none { display: flex; align-items: center; justify-content: center; background: var(--lb-ground); }
.mg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-mid { display: flex; flex-direction: column; gap: 5px; }
.mg-mid .reg { font-family: var(--label); font-size: 22px; font-weight: 600; }
.mg-faa { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.mg-faa .st { min-width: 0; }
.warn-ink { color: var(--warn); }
.mg-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mg-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mg-add { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.mg-reg { display: flex; align-items: flex-end; gap: 12px; }
.mg-reg .field { flex: 0 1 280px; }
.mg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.mg-found { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--accent); background: var(--lb-ground); }
.mg-found .row { display: flex; gap: 10px; }
.mg-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 15px; }
.mg-dl dt { color: var(--muted); }
.mg-dl dd { margin: 0; font-weight: 600; }
.mg-problem { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 14.5px; }
.mg-add > .btn-solid { align-self: flex-start; }
.lb-faa { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.mg-take { align-self: flex-start; margin-top: 4px; }

/* ---- the dashboard (George, 2026-09-29, from the flight-deck mockups) ---- */
.db { gap: 20px; }
.db .lb-head { align-items: center; }
.db-ring-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px; flex-shrink: 0; border-radius: 12px;
                border: 1px solid var(--lb-edge); background: var(--panel, var(--field)); box-shadow: var(--lb-shadow); }
.db-ring { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.db-ring-hole { width: 76px; height: 76px; border-radius: 50%; background: var(--field); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.db-ring-hole b { font-family: var(--label); font-size: 26px; font-weight: 600; line-height: 1; }
.db-ring-hole b small { font-size: 15px; color: var(--muted); }
.db-ring-hole span { font-size: 11px; color: var(--muted); }
.db-ring-key { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.db-key { display: flex; align-items: center; gap: 8px; }
.db-key i { width: 9px; height: 9px; border-radius: 2px; background: var(--line); }
.db-key.bad i { background: var(--bad); } .db-key.warn i { background: var(--warn); } .db-key.good i { background: var(--good); }

.db-tile { gap: 8px; }
.db-tile-k { display: flex; align-items: center; gap: 10px; }
.db-mono { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
           font-family: var(--mono); font-size: 10px; border: 1.5px solid currentColor; }
.db-tile .db-mono { color: var(--link); }
.db-tile.cyan .db-mono { color: var(--cyan, var(--c-component)); } .db-tile.amber .db-mono { color: var(--warn); }
.db-tile.green .db-mono { color: var(--good); } .db-tile.red .db-mono { color: var(--bad); }
.db-tile.cyan { border-color: var(--cyan-glow, var(--lb-edge)); } .db-tile.amber { border-color: var(--warn-edge, var(--lb-edge)); }
.db-tile.green { border-color: var(--good-edge, var(--lb-edge)); } .db-tile.red { border-color: var(--bad-edge, var(--lb-edge)); }
.db-tile.blue { border-color: var(--blue-edge, var(--lb-edge)); }
.db-bar { height: 6px; border-radius: 99px; background: var(--track, var(--desk)); overflow: hidden; }
.db-bar i { display: block; height: 6px; border-radius: 99px; background: var(--link); }
.db-tile.cyan .db-bar i { background: var(--cyan, var(--c-component)); }
.db-tile.amber .db-bar i { background: linear-gradient(90deg, var(--good), var(--warn)); }
.db-tile.green .db-bar i { background: var(--good); } .db-tile.red .db-bar i { background: var(--bad); }

.db-cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.3fr) minmax(0, 0.85fr); gap: 16px; align-items: start; }
.db-mid { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.db .lb-card { padding: 18px 20px; }
.db .lb-card > h2 { margin-bottom: 10px; }

/* the due list, compact: each row washed in its state's colour */
.due.compact { gap: 8px; }
.due.compact .due-row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.due.compact .due-row:first-child { padding-top: 10px; }
.due.compact .due-row .text { font-size: 14px; }
.due.compact .due-row .meta { font-size: 12.5px; }
.due-row.st-bad { border-color: var(--bad-edge, var(--line)); background: linear-gradient(90deg, var(--bad-bg), transparent 60%); }
.due-row.st-warn { border-color: var(--warn-edge, var(--line)); background: linear-gradient(90deg, var(--warn-bg), transparent 60%); }
.due-row.st-good { border-color: var(--good-edge, var(--line)); background: linear-gradient(90deg, var(--good-bg), transparent 60%); }
.due.compact .st { min-width: 0; }

/* the whole history, small */
.db-mini { display: block; width: 100%; height: auto; cursor: pointer; }
.db-mini .gap { fill: var(--desk); opacity: 0.8; }
.db-mini .base { stroke: var(--lb-edge); stroke-width: 1.5; }
.db-mini .yr { font-family: var(--mono); font-size: 10px; fill: var(--muted); text-anchor: middle; }
.db-mini .stem { stroke-width: 1; opacity: 0.55; }
.db-mini .k-inspection, .db-mini .k-hundred { fill: var(--c-annual); stroke: var(--c-annual); }
.db-mini .k-ad, .db-mini .k-check { fill: var(--c-check); stroke: var(--c-check); }
.db-mini .k-component, .db-mini .k-wb, .db-mini .k-other { fill: var(--c-component); stroke: var(--c-component); }
.db-mini .k-repair { fill: var(--c-repair); stroke: var(--c-repair); }
.db-mini .k-alteration { fill: var(--c-alteration); stroke: var(--c-alteration); }
.db-mini .k-overhaul { fill: var(--c-overhaul); stroke: var(--c-overhaul); }

/* what the books show, by kind */
.db-find { display: flex; flex-direction: column; gap: 8px; }
.db-find-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.db-find-row:hover { border-color: var(--lb-edge); color: var(--ink); }
.db-find-row .db-mono { width: 36px; height: 36px; }
.db-find-row > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.db-find-row b { font-family: var(--label); font-size: 19px; font-weight: 600; }
.db-find-row span span { font-size: 13.5px; color: var(--soft); }
.db-find-row.warn { background: var(--warn-bg); } .db-find-row.warn .db-mono { color: var(--warn); }
.db-find-row.bad { background: var(--bad-bg); } .db-find-row.bad .db-mono { color: var(--bad); }
.db-find-row.good { background: var(--good-bg); } .db-find-row.good .db-mono { color: var(--good); }
.db-find-row.violet { background: var(--violet-bg, var(--desk)); } .db-find-row.violet .db-mono { color: var(--violet, var(--c-check)); }
.db-find-row.blue { background: var(--blue-bg, var(--desk)); } .db-find-row.blue .db-mono { color: var(--link); }
.db-find-row.none .db-mono { color: var(--muted); }
.due.compact .due-row { grid-template-columns: 92px minmax(0, 1fr); }
.due.compact .due-row .act { grid-column: 2; }
.due.compact .due-row .act:empty { display: none; }
.due.compact .lb-btn { height: 32px; padding: 0 10px; font-size: 13px; }

/* ---- the parts the owner follows (Components) ---- */
.cp-tracked { display: flex; flex-direction: column; gap: 12px; }
.cp-head { display: flex; justify-content: space-between; align-items: baseline; }
.cp-head a { font-weight: 600; font-size: 14px; text-decoration: none; }
.cp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cp-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--lb-edge);
           background: var(--panel, var(--field)); box-shadow: var(--lb-shadow); }
.cp-card.st-bad { border-color: var(--bad-edge, var(--lb-edge)); } .cp-card.st-warn { border-color: var(--warn-edge, var(--lb-edge)); }
.cp-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-top b { font-family: var(--label); font-size: 19px; font-weight: 600; }
.cp-state { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
            background: var(--desk); color: var(--muted); }
.cp-state.bad { background: var(--bad-bg); color: var(--bad); } .cp-state.warn { background: var(--warn-bg); color: var(--warn); }
.cp-state.good { background: var(--good-bg); color: var(--good); } .cp-state.blue { background: var(--blue-bg, var(--desk)); color: var(--link); }
.cp-what { font-size: 14px; color: var(--soft); }
.cp-what.cp-also { font-size: 13px; color: var(--muted); }
.cp-src { align-self: flex-start; margin-top: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
          padding: 2px 7px; border-radius: 999px; }
.cp-src.logs { background: var(--good-bg); color: var(--good); } .cp-src.mine { background: var(--blue-bg, var(--desk)); color: var(--link); }

/* ---- Manage: its sub-tabs, and choosing what to track ---- */
.mg-tabs { display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: var(--tray, var(--desk)); border: 1px solid var(--line); }
.mg-tab { height: 36px; padding: 0 14px; display: flex; align-items: center; gap: 6px; border-radius: 7px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--soft); }
.mg-tab[aria-selected="true"] { color: #FFFFFF; background: linear-gradient(180deg, var(--accent-hi, var(--accent)), var(--accent)); }
.mg-tab[aria-disabled="true"] { color: var(--muted); cursor: default; }
.mg-soon { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: var(--desk); }
.mg-plane-pick { align-self: flex-start; height: 40px; padding: 0 10px; border: 1px solid var(--lb-edge); background: var(--field); color: var(--ink); font: inherit; font-weight: 600; }
.mg-track { padding: 0; overflow: hidden; }
.mg-trow { display: grid; grid-template-columns: 44px 190px minmax(0, 1fr) 500px; gap: 16px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.mg-trow.on { background: var(--blue-bg, transparent); }
.mg-trow input[type="checkbox"] { width: 20px; height: 20px; }
.mg-thead { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: none; }
.mg-tname { display: flex; flex-direction: column; }
.mg-tname b { font-family: var(--label); font-size: 17px; font-weight: 600; }
.mg-tlogs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--soft); min-width: 0; }
.mg-tlogs .cp-state { flex-shrink: 0; }
.mg-tfigs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mg-tab { white-space: nowrap; }
.mg-tfigs input { width: 84px; height: 36px; padding: 0 8px; font-size: 13.5px; font-family: var(--serif); }
.mg-tfigs input:first-child { width: 128px; }
.mg-tfigs .btn-quiet { height: 36px; }
.mg-tsaid { flex-basis: 100%; }
.mg-tsaid:empty { display: none; }
.mg-tadd { display: flex; gap: 10px; align-items: center; padding: 14px 20px; }
.mg-tadd input { max-width: 320px; height: 40px; }
.mg-track > p { padding: 0 20px 16px; margin: 0; }

/* ---- findings: two panes, the pages side by side (George, 2026-09-29) ---- */
.fd { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 440px minmax(0, 1fr); gap: 24px; align-items: start; }
.fd-rail { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.fd-rail h1 { font-size: 30px; line-height: 1.1; }
.fd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fd-chip { height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--soft);
           font-family: var(--serif); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fd-chip .n { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); }
.fd-chip[aria-pressed="true"] { border-color: var(--lb-edge); background: var(--blue-bg, var(--desk)); color: var(--ink); }
.fd-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 290px); overflow: auto; padding-right: 4px; }
.fd-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 12px; border-radius: 10px;
           border: 1px solid var(--line); background: var(--field); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.fd-item:hover { border-color: var(--lb-edge); }
.fd-item .db-mono { width: 36px; height: 36px; }
.fd-item.warn .db-mono { color: var(--warn); } .fd-item.bad .db-mono { color: var(--bad); } .fd-item.good .db-mono { color: var(--good); }
.fd-item.violet .db-mono { color: var(--violet, var(--c-check)); } .fd-item.blue .db-mono { color: var(--link); }
.fd-item[aria-current="true"] { border-color: var(--warn-edge, var(--accent)); background: var(--warn-bg); }
.fd-item[aria-current="true"].good { border-color: var(--good-edge, var(--accent)); background: var(--good-bg); }
.fd-item[aria-current="true"].violet { border-color: var(--violet, var(--accent)); background: var(--violet-bg, var(--desk)); }
.fd-item[aria-current="true"].bad { border-color: var(--bad-edge, var(--accent)); background: var(--bad-bg); }
.fd-item[aria-current="true"].blue { border-color: var(--blue-edge, var(--accent)); background: var(--blue-bg, var(--desk)); }
.fd-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd-words b { font-size: 15px; }
.fd-words span { font-size: 13px; color: var(--soft); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fd-words .fd-looked { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--good); }
.fd-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fd-kind { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fd-kind.warn { color: var(--warn); } .fd-kind.bad { color: var(--bad); } .fd-kind.good { color: var(--good); }
.fd-kind.violet { color: var(--violet, var(--c-check)); } .fd-kind.blue { color: var(--link); }
.fd-pane h2 { font-size: 30px; line-height: 1.1; }
.fd-detail { margin: 0; font-size: 16px; line-height: 1.5; color: var(--soft); max-width: 900px; }
.fd-pages { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fd-pages.n1 { grid-template-columns: minmax(0, 560px); } .fd-pages.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fd-page { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fd-page figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14.5px; }
.fd-page figcaption a { font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.fd-page img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--lb-edge); box-shadow: var(--lb-shadow); background: #FFFFFF; }
.fd-mark { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--lb-edge); font-size: 14.5px; color: var(--soft); }
.fd-mark > span { flex: 1 1 280px; }
.fd-mark input { max-width: 340px; height: 40px; }

/* ---- Manage: people (George, 2026-09-30; app/people.py) ---- */
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.pp-list { overflow-x: auto; }
.pp-who b { display: block; font-size: 15.5px; }
.pp-who span, .pp-state span { display: block; }
.lb-table td > .small { display: block; }
.pp-role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
           background: var(--desk); color: var(--muted); }
.pp-account, .pp-owner { background: var(--s1-bg, var(--desk)); color: var(--accent); }
.pp-mechanic { background: rgba(0, 152, 199, 0.1); color: var(--c-component); }
.pp-ok { color: var(--good); } .pp-wait { color: var(--warn); }
.pp-ended td { opacity: 0.6; }
.pp-act { white-space: nowrap; text-align: right; }
.pp-act .lb-btn + .lb-btn { margin-left: 6px; }
.pp-remove { color: var(--bad); }
.pp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 14px; }
.pp-foot p { flex-basis: 100%; margin: 0; }
.pp-count { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--desk); color: var(--muted); }
.pp-form { display: flex; flex-direction: column; gap: 14px; }
.pp-form h2 { margin: 0; }
.pp-field { display: flex; flex-direction: column; gap: 6px; }
.pp-label, .pp-form legend { font-size: 13px; font-weight: 600; color: var(--muted); }
.pp-form input[type="email"], .pp-form input[type="date"] { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field, transparent); color: inherit; font: inherit; }
.pp-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 9px; background: var(--tray, var(--desk)); border: 1px solid var(--line); }
.pp-seg button { height: 32px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.pp-seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent, #FFFFFF); }
.pp-form fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-form fieldset.pp-areas { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.pp-form fieldset.pp-areas[hidden] { display: none; }
.pp-areas legend { float: left; grid-column: 1 / -1; margin-bottom: 4px; }
.pp-check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.pp-check input { width: 17px; height: 17px; }
.pp-form > .btn-solid { height: 42px; }
.pp-said { margin: 0; color: var(--good); }
.pp-said:empty { display: none; }
.lb-readonly { margin: 0 0 14px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--desk); font-size: 14px; }
@media (max-width: 1100px) { .pp-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- corrections (George, 2026-09-30; engine/logbook.py) ---- */
.fix-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
           text-transform: uppercase; vertical-align: middle; background: var(--good-bg); color: var(--good); }
.fix-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.fix-note .lb-btn { height: 26px; padding: 0 10px; font-size: 12.5px; }
.ent dl dd.fix-dd { grid-column: 2; margin: -4px 0 0; }
.lbk-item .top.fixed { color: var(--good); }
.fix { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.fix > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); list-style: none; }
.fix > summary::-webkit-details-marker { display: none; }
.fix > summary::before { content: "✎ "; }
.fix-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fix-l { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.fix-form select, .fix-form input, .fix-form textarea { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field, transparent);
           color: inherit; font: inherit; font-size: 14px; }
.fix-now { margin: 0; font-size: 13px; color: var(--muted); }
.fix-form .btn-solid { align-self: flex-start; height: 38px; margin-top: 6px; }
.fix-form .small { margin: 0; }

/* ---- the mechanic's profile (George, 2026-10-01; app/credentials.py) ---- */
.cred-form { max-width: 620px; margin: 24px auto; display: flex; flex-direction: column; gap: 14px; }
.cred-form h1 { margin: 0; }
.cred-form .sub { margin: 0; color: var(--muted); }
.cred-form input[type="text"], .cred-form input:not([type]) { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field, transparent); color: inherit; font: inherit; }
.cred-ratings { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.cred-tick { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cred-tick input { margin-top: 3px; }
.cred-tick span { display: flex; flex-direction: column; gap: 2px; }
.cred-actions { display: flex; gap: 10px; align-items: center; }
.cred-actions .btn-solid { height: 42px; padding: 0 20px; }
.fix-as { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.linkish { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* ---- one record on several pages (George, 2026-10-01): a Form 337's front
   and back side by side, each with a numbered yellow tab ---- */
.pg-scans { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.pg-scans .pg-scan { position: relative; top: auto; }
.pg-scans .cap { font-size: 12px; color: var(--muted); margin: 0; }
.pg-body.multi { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.pg-body.multi .pg-scans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.pg-body.multi .pg-scans .cap { grid-column: 1 / -1; }
.pg-tab { position: absolute; top: -8px; right: 16px; min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
          border-radius: 4px 4px 8px 8px; background: #FFD84D; color: #3A2E00; font-family: var(--mono); font-size: 15px; font-weight: 700;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); border: 1px solid #E0B400; }
.typed-h { margin: 14px 0 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1180px) { .pg-body.multi .pg-scans { grid-template-columns: minmax(0, 1fr); } }

/* ---- squawks and the pre-annual checklist (George, 2026-10-01) ---- */
.sq-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sq-list, .sq-pre { display: flex; flex-direction: column; gap: 10px; }
.sq-list h2, .sq-pre h2 { margin: 0; }
.sq-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--desk); }
.sq-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sq-form-row input[type="text"] { flex: 1 1 260px; }
.sq-form input, .sq-form select, .sq-form textarea, .sq-check input, .sq-check select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field, transparent); color: inherit; font: inherit; font-size: 14.5px; }
.sq-form .btn-solid, .sq-check .btn-solid { height: 38px; padding: 0 16px; }
.sq-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.sq-item.done { opacity: 0.85; }
.sq-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sq-top b { font-size: 16px; }
.sq-when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.sq-detail { margin: 0; font-size: 14.5px; }
.sq-by { margin: 0; font-size: 13px; color: var(--muted); }
.sq-ok { color: var(--good); }
.sq-acts { display: flex; gap: 8px; margin-top: 4px; }
.sq-check { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sq-done > summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.sq-pre-head { display: flex; justify-content: space-between; align-items: center; }
.sq-pre h3 { margin: 10px 0 2px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sq-pre .sub { margin: 0; color: var(--muted); font-size: 14px; }
.sq-due { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.sq-due div { display: flex; flex-direction: column; gap: 2px; }
.sq-state { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; text-align: center; background: var(--desk); }
.sq-due.overdue .sq-state { background: var(--bad-bg); color: var(--bad); }
.sq-due.soon .sq-state { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 1100px) { .sq-grid { grid-template-columns: minmax(0, 1fr); } }
@media print {
  body * { visibility: hidden; }
  .sq-pre, .sq-pre * { visibility: visible; }
  .sq-pre { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; }
  .sq-pre .lb-btn { display: none; }
}
.sq-line { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lb-admin { margin: 0 0 14px; padding: 9px 14px; border-radius: 10px; border: 1px solid #E0B400; background: #FFF6D1; color: #3A2E00; font-size: 14px; font-weight: 500; }

/* ---- new logs sent in, awaiting reading (George, 2026-10-01) ---- */
.lb-inbox { margin: 0 0 16px; }
.lb-inbox:empty { display: none; }
.ib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ib-head h2 { margin: 0; font-size: 18px; }
.ib-head .btn-solid { height: 38px; padding: 0 16px; }
.ib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ib-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border-radius: 10px;
           border: 1px solid var(--line); background: var(--card, transparent); }
.ib-card > .lb-btn, .ib-card > .ib-noteform { grid-column: 2; justify-self: start; }
.ib-pic { width: 84px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--desk); cursor: zoom-in;
          display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.ib-pic img { width: 100%; height: 100%; object-fit: cover; }
.ib-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-text b { font-size: 15px; }
.ib-note { font-size: 14px; font-style: italic; }
.ib-state { align-self: flex-start; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
            text-transform: uppercase; background: var(--warn-bg); color: var(--warn); }
.ib-noteform { display: flex; gap: 6px; align-items: flex-start; width: 100%; }
.ib-noteform textarea { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: var(--field, transparent); color: inherit; }
.ib-add { display: flex; flex-direction: column; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--card, transparent); }
.ib-addtop { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ib-tabs { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.ib-phone { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.ib-qr { width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; background: #FFFFFF; border-radius: 10px; padding: 6px; }
.ib-qr svg { width: 100%; height: 100%; }
.ib-side { display: flex; flex-direction: column; gap: 8px; max-width: 360px; align-items: flex-start; }
.ib-ok { color: var(--good); font-weight: 600; }
.ib-comp { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ib-comp textarea { width: min(560px, 100%); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--field, transparent); color: inherit; }
.ib-comp .btn-solid { height: 40px; padding: 0 18px; }
.db-newlog { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid #E0B400;
             background: #FFF6D1; color: #3A2E00; text-decoration: none; }
.db-newlog span { font-size: 14px; }

/* Manage: the owner's own aircraft details (2026-10-02) */
.mg-edit { display: flex; flex-direction: column; gap: 12px; }
.mg-edit .mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mg-faa-sug { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--desk); }

/* ACCOUNT (George, 2026-10-02): behind the gear */
.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.acct-history { grid-column: 1 / -1; }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-card { display: flex; flex-direction: column; gap: 12px; }
.acct-card > h2 { margin-bottom: 0; }
.acct-card .field input, .acct-card .field select { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper, var(--field)); color: var(--ink); font: inherit; font-size: 16px; width: 100%; }
.acct-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-three { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 520px) { .acct-two, .acct-three { grid-template-columns: 1fr; } }
.acct-value { font-size: 18px; font-weight: 600; }
.acct-email { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); align-items: flex-start; }
.acct-email-new { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.acct-email-new .btn-line { align-self: flex-start; }
.acct-said { min-height: 1em; color: var(--muted); }
.acct-pay { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.acct-upgrades { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.acct-upgrades h3 { font-size: 15px; margin: 0; }
.acct-up { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.acct-confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.acct-confirm p { flex-basis: 100%; margin: 0; }
.acct-radios { display: flex; flex-direction: column; gap: 10px; }
.acct-radio { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.acct-radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.acct-link { margin-right: 12px; }
.fd-lines { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.mg-confirm { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 10px; background: var(--bad-bg, var(--desk)); max-width: 360px; }
.mg-confirm .field input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.btn-solid.danger { background: var(--bad); }
.mg-remove { color: var(--bad); }
.pay-panel { max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.pay-panel h1 { font-size: 24px; }
.acct-alert { border-color: var(--bad); background: var(--bad-bg, var(--field)); font-weight: 600; margin-bottom: 18px; }

/* serial numbers for ADs (George, 2026-10-02) */
.sn-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.sn-card > h2 { margin-bottom: 0; }
.sn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.sn-num { font-size: 17px; margin: 2px 0; }
.sn-ok { color: var(--good); }
.sn-none { color: var(--muted); }
.sn-page { width: 220px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; display: block; }
.sn-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.sn-form { display: flex; gap: 8px; flex-wrap: wrap; }
.sn-form input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.sn-row .mg-problem { grid-column: 1 / -1; }
@media (max-width: 760px) { .sn-row { grid-template-columns: 1fr; } .sn-act { justify-content: flex-start; } }

/* getting set up (George, 2026-10-02) */
.setup-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; margin-bottom: 18px; border-color: var(--accent); }
.setup-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; display: block; }
.setup-bar i { display: block; height: 100%; background: var(--accent); }
.setup-list { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 0; padding: 8px 24px; max-width: 860px; }
.setup-step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.setup-step:first-child { border-top: 0; }
.setup-step > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.setup-step p { margin: 0; }
.setup-mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: #fff; }
.setup-step.done .setup-mark { background: var(--good); border-color: var(--good); }
.setup-step.done b { color: var(--muted); }
.setup-hours { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.setup-hours .field input { height: 40px; width: 9em; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }

/* ADs (George, 2026-10-02) */
.ad-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ad-row-top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ad-warn { color: var(--warn); font-weight: 600; margin: 0; }
.ad-group { display: flex; flex-direction: column; gap: 0; margin-bottom: 18px; }
.ad-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); }
.ad-item p { margin: 0; }
.ad-item.new { background: linear-gradient(90deg, var(--blue-bg, transparent), transparent 60%); }
.ad-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ad-line { padding-left: 12px; border-left: 3px solid var(--line); }
.ad-aside { font-style: italic; }
.ad-form { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.ad-form select, .ad-form textarea, .ad-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.ad-form textarea { min-height: 64px; }
.ad-ref { display: flex; gap: 8px; }

/* ---- tablets and phones (George, 2026-10-02: mechanics in the hangar) ----
   Only on a site that keeps logbooks (body.has-logbooks). Every button stays
   in sight (George: a menu button hides them from people who aren't at home
   with computers): below 1240px the bar's buttons get smaller, and wrap onto
   a second row rather than hide. Only a phone (below 900px) has the menu. */
@media (min-width: 901px) and (max-width: 1240px) {
  body.has-logbooks .bar { flex-wrap: wrap; height: auto; min-height: 60px; padding: 6px 14px; gap: 6px 10px; }
  body.has-logbooks .brand .mono { display: none; }
  body.has-logbooks .wordmark { height: 24px; }
  body.has-logbooks .bar .tabs { margin: 0; flex-wrap: wrap; gap: 1px; font-size: 12.5px; }
  body.has-logbooks .bar .tabs a { height: 32px; padding: 0 7px; }
  body.has-logbooks .bar .btn-quiet { height: 34px; padding: 0 10px; font-size: 13px; }
  body.has-logbooks .bar .who { gap: 8px; }
}
@media (max-width: 1240px) {
  html:has(body.has-logbooks) { height: auto; }
  body.has-logbooks { height: auto; min-height: 100%; display: block; }
  .lb { overflow: visible; }
  .fd { grid-template-columns: minmax(0, 1fr); }
  .fd-rail { position: static; }
  .fd-list { max-height: none; overflow: visible; }
  .db-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .db-cols > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .lb-ident { flex-direction: column; align-items: stretch; gap: 16px; }
  .ac-photo { width: 100%; height: 190px; }
  .db .lb-head, .lb-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .lb-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .db-cols { grid-template-columns: minmax(0, 1fr); }
  .db-ring-card { align-self: stretch; }
  .lb { padding: 20px 16px 40px; overflow: visible; }
  .lb h1 { font-size: 28px; }
  .lb-card { padding: 16px; }
}
@media (max-width: 420px) {
  .lb-tiles { grid-template-columns: minmax(0, 1fr); }
}
/* fingers, not a mouse: every control at least 44px (WCAG 2.5.5) */
@media (pointer: coarse) {
  .lb-btn, .btn-line, .btn-quiet, .ph-btn, .mg-tab, .fd-chip, .ac-tab, .ac-act, .fd-item, .sn-act button, .acct-card button { min-height: 44px; }
  .acct-radio input, .mg-check input, input[type="checkbox"] { min-width: 22px; min-height: 22px; }
}
.fd-item { flex-shrink: 0; }

/* the file names pick the book (George, 2026-10-02) */
.ib-plan { font-size: 14px; }
.ib-plan ul { margin: 6px 0 0; padding-left: 20px; }
.ib-names summary { cursor: pointer; color: var(--link); }
.ib-names p { margin: 6px 0 0; }
.read-banner { display: flex; flex-direction: column; gap: 4px; border-color: var(--accent); background: var(--blue-bg, var(--field)); margin-bottom: 18px; }
.sn-warn { color: var(--warn); font-weight: 600; }
.sn-hist summary { cursor: pointer; color: var(--link); margin-top: 4px; }
.sn-hist div { padding: 2px 0 2px 12px; }

/* AskJackson | AVIATION in the top bar, as on aviation.askjackson.ai (George,
   2026-10-02: "AskJackson" alone is a different site). Logbook sites only;
   kept at every width. */
.brand-rule, .brand-vertical { display: none; }
body.has-logbooks .brand { gap: 12px; }
body.has-logbooks .brand-rule { display: block; width: 2px; height: 28px; border-radius: 1px; background: var(--line); flex-shrink: 0; }
body.has-logbooks .brand-vertical { display: block; font-family: var(--label); font-weight: 700; font-size: 14px; letter-spacing: 0.18em;
                                    text-transform: uppercase; color: var(--ink); white-space: nowrap; }
@media (max-width: 420px) { body.has-logbooks .brand-vertical { font-size: 12px; letter-spacing: 0.12em; } body.has-logbooks .brand { gap: 8px; } }

/* the page buttons (George, 2026-10-02): fixed places; an end that can't go further says so */
.pg-nav .lb-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 140px; text-decoration: none; }
.pg-stop { opacity: .5; cursor: default; pointer-events: none; }
.pg-blank { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 48px 24px; color: var(--muted);
            border: 1px dashed var(--line); border-radius: 12px; }
.acct-dl { align-self: flex-start; display: inline-flex; align-items: center; text-decoration: none; }

/* help from any screen (George, 2026-10-02) */
.support-btn { background: transparent; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
               min-width: 40px; min-height: 40px; color: var(--soft, var(--ink)); }
.sp-dlg { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(640px, calc(100vw - 32px)); background: var(--field); color: var(--ink); }
.sp-dlg::backdrop { background: rgba(7, 22, 43, 0.45); }
.sp-form { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.sp-form h2 { margin: 0; font-size: 20px; }
.sp-shot { width: 100%; max-height: 260px; object-fit: contain; object-position: top; border: 1px solid var(--line); border-radius: 8px; background: var(--desk); }
.sp-kinds { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-kinds legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.sp-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sp-kind input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.sp-kind span { display: flex; flex-direction: column; gap: 2px; }
.sp-label { font-weight: 600; }
.sp-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; resize: vertical; }
.sp-said { min-height: 1em; margin: 0; color: var(--bad); }
.sp-row { display: flex; gap: 10px; }
.mg-tfigs input.mg-wide { width: 168px; }
.mg-tfigs input.mg-num { width: 128px; font-family: var(--mono, monospace); }
.mg-tfigs input.mg-date { width: 128px; }

/* owner's documents and "Email to" (George, 2026-10-02) */
.dc-card { display: flex; flex-direction: column; gap: 0; }
.dc-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dc-row:first-child { border-top: 0; }
.dc-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.dc-name { display: flex; flex-direction: column; gap: 2px; }
.dc-open { font-weight: 600; }
.dc-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dc-add h2 { flex-basis: 100%; }
.dc-add select, .dc-add input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.dc-sent { padding: 4px 0; }
.em-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; max-width: 520px; flex-basis: 100%; }
.em-box input, .em-box textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font: inherit; }
.pg-bar { flex-wrap: wrap; }
