/* Rocket Flight Log - inherits the theme's fonts and text color; works on light and dark themes. */
.rfl-flight, .rfl-admin, .rfl-public, .rfl-table-wrap, .rfl-rockets, .rfl-winds {
  --rfl-c1: #2f6db3;
  --rfl-c2: #d9822b;
  --rfl-c3: #6b7a8c;
  --rfl-c4: #8a4fc4;
  --rfl-bad: #c0392b;
  --rfl-muted-line: rgba(127, 135, 145, .75);
  --rfl-panel: rgba(127, 135, 145, .08);
  --rfl-border: rgba(127, 135, 145, .28);
  --rfl-grid: rgba(127, 135, 145, .18);
  --rfl-axis: rgba(127, 135, 145, .55);
  --rfl-band: rgba(230, 170, 40, .18);
  --rfl-warn-bg: rgba(230, 170, 40, .12);
  --rfl-tip-bg: #fff;
  --rfl-tip-fg: #1d232b;
}
@media (prefers-color-scheme: dark) {
  .rfl-flight, .rfl-admin, .rfl-public, .rfl-table-wrap, .rfl-rockets, .rfl-winds {
    --rfl-c1: #6aa5ea;
    --rfl-c2: #f0a25a;
    --rfl-c4: #b98ce8;
    --rfl-tip-bg: #1f252c;
    --rfl-tip-fg: #e8ecf1;
  }
}

.rfl-root { display: flex; flex-direction: column; gap: 2rem; margin-block: 1.5rem; }
.rfl-section { display: flex; flex-direction: column; gap: .75rem; }
.rfl-section h2 { margin: 0; font-size: 1.35em; line-height: 1.25; text-wrap: balance; }
.rfl-text { margin: 0; max-width: 46rem; line-height: 1.55; }
.rfl-muted, .rfl-note { opacity: .72; }
.rfl-note { margin: 0; font-size: .85em; line-height: 1.45; }

.rfl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .75rem; }
.rfl-tile { background: var(--rfl-panel); border: 1px solid var(--rfl-border); border-radius: 8px; padding: .75rem 1rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.rfl-tile-label { font-size: .8em; opacity: .75; }
.rfl-tile-value { font-size: 1.6em; line-height: 1.15; font-variant-numeric: tabular-nums; font-weight: 500; overflow-wrap: anywhere; }
.rfl-unit { font-size: .55em; opacity: .7; margin-left: .3em; font-weight: 400; }
.rfl-tile-note { font-size: .78em; opacity: .7; line-height: 1.35; }

.rfl-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: .75rem; }
.rfl-card { background: var(--rfl-panel); border: 1px solid var(--rfl-border); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.rfl-card h3 { margin: 0; font-size: 1em; font-weight: 600; }
.rfl-chart { position: relative; width: 100%; }
.rfl-chart svg { display: block; overflow: visible; max-width: 100%; }
.rfl-tick { font-size: 12px; fill: currentColor; opacity: .7; font-variant-numeric: tabular-nums; }
.rfl-grid { stroke: var(--rfl-grid); stroke-width: 1; }
.rfl-axis { stroke: var(--rfl-axis); stroke-width: 1; }
.rfl-ref { stroke: var(--rfl-axis); stroke-dasharray: 4 4; stroke-width: 1; }
.rfl-band { fill: var(--rfl-band); }
.rfl-range { opacity: .16; stroke: none; }
.rfl-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }

.rfl-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .82em; opacity: .85; }
.rfl-legend span { display: inline-flex; align-items: center; gap: .4em; }
.rfl-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.rfl-legend i.dash { background-image: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px) !important; background-color: transparent !important; color: var(--rfl-muted-line); }
.rfl-legend i.range { height: 10px; width: 14px; opacity: .25; }
.rfl-legend i.band { height: 10px; width: 12px; background: var(--rfl-band); }

.rfl-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--rfl-tip-bg); color: var(--rfl-tip-fg); border: 1px solid var(--rfl-border); border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.15); padding: .35rem .55rem; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rfl-tip-h { opacity: .7; margin-bottom: 2px; }
.rfl-tip-r { display: flex; align-items: center; gap: .4em; }
.rfl-tip-r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.rfl-warnings { border: 1px solid var(--rfl-border); background: var(--rfl-warn-bg); border-radius: 8px; padding: .75rem 1rem; }
.rfl-warnings h3 { margin: 0 0 .4rem; font-size: 1em; }
.rfl-warnings ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: .3rem; line-height: 1.45; }
.rfl-warnings li.note { opacity: .8; }

.rfl-table-wrap { overflow-x: auto; max-width: 100%; }
.rfl-table-wrap.narrow { max-width: 32rem; }
.rfl-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .92em; }
.rfl-table th, .rfl-table td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--rfl-border); white-space: nowrap; }
.rfl-table th { font-weight: 600; }
.rfl-table td.num { text-align: right; }
.rfl-table.compact th, .rfl-table.compact td { padding: .3rem .5rem; }
.rfl-table.auto { width: auto; min-width: min(100%, 24rem); }
.rfl-table tr.clipped td { opacity: .6; }
.rfl-table.wrap1 td:first-child, .rfl-table.wrap1 th:first-child { white-space: normal; min-width: 7.5rem; }
.rfl-table.wrap1 th { white-space: normal; }
.rfl-details summary { cursor: pointer; font-weight: 600; }
.rfl-details[open] summary { margin-bottom: .5rem; }
.rfl-foot { font-size: .8em; opacity: .65; margin: 0; }
.rfl-rockets { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.rfl-rockets span { opacity: .65; font-size: .9em; margin-left: .4em; }

.rfl-sources { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: .35rem; line-height: 1.5; font-size: .92em; max-width: 52rem; }
.rfl-sources a { overflow-wrap: anywhere; }
.rfl-sources-label { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; font-size: .95em; margin-top: .75rem; }
.rfl-sources-label textarea { width: 100%; box-sizing: border-box; font: inherit; padding: .4rem .5rem; border: 1px solid var(--rfl-border); border-radius: 6px; background: transparent; color: inherit; }

/* Uncertainty shares */
.rfl-sens { display: flex; flex-direction: column; gap: .35rem; font-size: .9em; }
.rfl-sens-row { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr 3rem; align-items: center; gap: .6rem; }
.rfl-sens-track { height: 8px; border-radius: 4px; background: var(--rfl-grid); overflow: hidden; }
.rfl-sens-bar { display: block; height: 100%; background: var(--rfl-c1); border-radius: 4px; }
.rfl-sens-val { text-align: right; font-variant-numeric: tabular-nums; opacity: .8; }

/* Section list */
.rfl-toc { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .75rem; padding: .6rem .9rem; border: 1px solid var(--rfl-border); border-radius: 8px; background: var(--rfl-panel); scroll-margin-top: 5rem; }
.rfl-toc-label { font-size: .8em; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.rfl-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.rfl-toc li { margin: 0; }
.rfl-toc a { display: inline-block; padding: .2rem .6rem; border: 1px solid var(--rfl-border); border-radius: 999px; font-size: .88em; line-height: 1.4; text-decoration: none; color: inherit; white-space: nowrap; }
.rfl-toc a:hover, .rfl-toc a:focus-visible { border-color: var(--rfl-c1); color: var(--rfl-c1); }
.rfl-section, .rfl-details { scroll-margin-top: 5rem; }
.rfl-section h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.rfl-top { font-size: .6em; font-weight: 400; opacity: .6; text-decoration: none; color: inherit; white-space: nowrap; }
.rfl-top:hover { opacity: 1; color: var(--rfl-c1); }

/* Upload form (admin screen and [rfl_analyzer]) */
.rfl-admin .rfl-lede { max-width: 50rem; font-size: 14px; }
.rfl-public { display: flex; flex-direction: column; gap: 1rem; }
.rfl-public .rfl-lede { margin: 0; max-width: 46rem; opacity: .8; }
.rfl-form { display: flex; flex-direction: column; gap: 1rem; max-width: 60rem; }
.rfl-fieldset { border: 1px solid var(--rfl-border); border-radius: 8px; padding: .75rem 1rem 1rem; background: var(--rfl-panel); margin: 0; min-width: 0; }
.rfl-fieldset legend { font-weight: 600; padding: 0 .3rem; }
.rfl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .75rem 1rem; }
.rfl-grid label { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; font-size: .95em; }
.rfl-grid label[hidden], .rfl-save-only[hidden] { display: none !important; }
.rfl-grid input, .rfl-grid select, .rfl-fieldset textarea { width: 100%; max-width: none; box-sizing: border-box; font: inherit; padding: .4rem .5rem; border: 1px solid var(--rfl-border); border-radius: 6px; background: transparent; color: inherit; }
.rfl-grid select option { color: #1d2327; }
.rfl-drop { border: 2px dashed var(--rfl-axis); border-radius: 8px; padding: 1rem; text-align: center; }
.rfl-drop p { margin: 0; }
.rfl-drop.over { border-color: var(--rfl-c1); background: var(--rfl-panel); }
.rfl-logs.rfl-drag-over { outline: 2px dashed var(--rfl-c1); outline-offset: 4px; }
.rfl-browse { color: var(--rfl-c1); text-decoration: underline; cursor: pointer; position: relative; }
.rfl-browse input { position: absolute; width: 1px; height: 1px; opacity: 0; left: 0; top: 0; }
.rfl-filelist { list-style: none; margin: .5rem auto 0; padding: 0; display: inline-flex; flex-direction: column; gap: .25rem; text-align: left; font-size: .92em; }
.rfl-filelist li span { margin-left: .5rem; opacity: .65; overflow-wrap: anywhere; }
.rfl-filelist li.ok span { opacity: 1; color: #1a7f37; font-weight: 600; }
.rfl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0; }
.rfl-actions [hidden] { display: none !important; }
.rfl-status { font-weight: 500; }
.rfl-status.error { color: #d63638; }
.rfl-status.ok { color: #1a7f37; }
.rfl-admin .rfl-fieldset { background: #fff; border-color: #c3c4c7; }
.rfl-admin .rfl-flight { max-width: 72rem; color: #1d2327; }
@media (prefers-color-scheme: dark) { .rfl-admin { --rfl-c1: #2f6db3; --rfl-c2: #d9822b; --rfl-c4: #8a4fc4; --rfl-tip-bg: #fff; --rfl-tip-fg: #1d232b; } }

@media print {
  .rfl-form, .rfl-public .rfl-lede, #wpadminbar { display: none !important; }
  .rfl-card, .rfl-tile, .rfl-section { break-inside: avoid; }
  .rfl-tip { display: none !important; }
  .rfl-toc, .rfl-top { display: none !important; }
}

/* Saved log files box and Re-analyze page */
.rfl-logs .rfl-logs-lede { margin: .25rem 0 .75rem; max-width: 60rem; }
.rfl-logs .rfl-logs-inputs { margin-bottom: .75rem; max-width: 60rem; }
.rfl-logs .rfl-drop { margin: .5rem 0; text-align: left; }
.rfl-logs .rfl-drop > p { text-align: center; margin-bottom: .5rem; }
.rfl-logs-table th, .rfl-logs-table td { font-size: 13px; overflow-wrap: anywhere; }
.rfl-logs .rfl-actions { margin-top: .75rem; }
#rfl-ra-progress { width: 100%; max-width: 40rem; height: 10px; margin: .25rem 0 1rem; }
.rfl-ra-table td { vertical-align: top; }

/* The rocket */
.rfl-rocket-card { padding: .75rem 1rem; }
.rfl-rocket-draw svg { display: block; max-width: 100%; overflow: visible; }
.rfl-body { fill: var(--rfl-panel); stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.rfl-fin { fill: var(--rfl-band); stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.rfl-motor { fill: none; stroke: var(--rfl-c2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.rfl-mark { stroke: var(--rfl-tip-bg); stroke-width: 2; }
.rfl-mark.cg { fill: var(--rfl-c1); }
.rfl-mark.cp { fill: var(--rfl-bad); }
.rfl-mark-line { stroke-width: 1; stroke-dasharray: 2 3; }
.rfl-mark-line.cg { stroke: var(--rfl-c1); }
.rfl-mark-line.cp { stroke: var(--rfl-bad); }
.rfl-mark-label { font-size: 12px; font-weight: 600; }
.rfl-mark-label.cg { fill: var(--rfl-c1); }
.rfl-mark-label.cp { fill: var(--rfl-bad); }
.rfl-dim { stroke: var(--rfl-axis); stroke-width: 1; }
.rfl-specs { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; max-width: 52rem; font-size: .95em; line-height: 1.45; }
.rfl-specs dt { font-weight: 600; opacity: .8; }
.rfl-specs dd { margin: 0; }
@media (max-width: 520px) { .rfl-specs { grid-template-columns: 1fr; gap: .1rem; } .rfl-specs dd { margin-bottom: .45rem; } }

/* Flight path */
.rfl-pt { stroke: var(--rfl-tip-bg); stroke-width: 1.5; }
.rfl-pt-label { font-size: 12px; fill: currentColor; paint-order: stroke; stroke: var(--rfl-tip-bg); stroke-width: 3px; stroke-linejoin: round; }
.rfl-pad { fill: #1a7f37; stroke: var(--rfl-tip-bg); stroke-width: 1.5; }
.rfl-north path { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .7; }
.rfl-dashline { stroke-dasharray: 6 5; stroke-width: 2; }
.rfl-topview svg { display: block; max-width: 100%; }
.rfl-mapbtn { align-self: flex-start; margin-top: .25rem; }
.rfl-satmap { width: 100%; border-radius: 6px; overflow: hidden; }
.rfl-satmap:empty { display: none; }
@media print { .rfl-mapbtn, .rfl-satmap { display: none !important; } }

/* Guide and change log pages */
.rfl-toc-guide { flex-basis: 100%; margin: .25rem 0 0; font-size: .88em; opacity: .85; }
.rfl-docs-h { margin: .75rem 0 .25rem; font-size: 1em; }
.rfl-guide { max-width: 52rem; line-height: 1.6; }
.rfl-guide-ver { font-size: .88em; opacity: .7; }
.rfl-guide h2 { margin-top: 2rem; font-size: 1.35em; scroll-margin-top: 5rem; }
.rfl-guide h3 { margin-top: 1.25rem; font-size: 1.1em; }
.rfl-guide table { border-collapse: collapse; width: 100%; margin: .75rem 0 1rem; font-size: .92em; }
.rfl-guide th, .rfl-guide td { text-align: left; vertical-align: top; padding: .4rem .55rem; border-bottom: 1px solid rgba(127,135,145,.3); }
.rfl-guide thead th { background: rgba(127,135,145,.1); }
.rfl-guide-toc { border: 1px solid rgba(127,135,145,.28); border-radius: 8px; padding: .5rem 1.25rem .75rem; margin: 1rem 0 1.5rem; background: rgba(127,135,145,.06); }
.rfl-guide-toc h2 { margin: .5rem 0; font-size: 1.05em; }
.rfl-guide-toc ol { margin: 0; padding-left: 1.4em; columns: 2 16rem; column-gap: 2rem; }
.rfl-guide-toc li { margin: .15rem 0; break-inside: avoid; }

/* Launch date and site line */
.rfl-launchline { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: 0; font-size: .95em; }
.rfl-launchline strong { font-weight: 600; opacity: .75; margin-right: .3em; }
.rfl-launchline .rfl-dot { opacity: .45; }
.rfl-table .rfl-time { opacity: .65; font-size: .9em; }
/* Analyzer page: editing banner and the list of all flights */
.rfl-editing { border-left: 4px solid var(--rfl-c1); background: var(--rfl-panel); padding: .6rem .9rem; margin: 0 0 1rem; border-radius: 4px; }
.rfl-editing p { margin: 0; }
.rfl-allflights { margin-top: 2.5rem; }
.rfl-allflights h2 { font-size: 1.25em; margin: 0 0 .6rem; }
.rfl-table tr.rfl-row-editing td { background: var(--rfl-panel); font-weight: 600; }
.rfl-badge { display: inline-block; font-size: .78em; padding: 0 .4em; border: 1px solid var(--rfl-border); border-radius: 3px; color: var(--rfl-muted, inherit); }
.rfl-edit-link { margin-left: .4em; font-size: .9em; }
.rfl-login-note { margin: -.4rem 0 1rem; font-size: .95em; }
/* Sortable flight tables */
.rfl-sortable th { padding: 0; }
.rfl-sort { all: unset; box-sizing: border-box; display: block; width: 100%; padding: .45rem .6rem; cursor: pointer; font-weight: 600; white-space: nowrap; }
.rfl-sort:hover { text-decoration: underline; }
.rfl-sort:focus-visible { outline: 2px solid var(--rfl-c1); outline-offset: -2px; }
.rfl-sort-arrow { display: inline-block; width: 1em; margin-left: .2em; opacity: .35; }
.rfl-sort-arrow::after { content: '↕'; }
th[aria-sort] .rfl-sort-arrow { opacity: 1; }
th[aria-sort="ascending"] .rfl-sort-arrow::after { content: '▲'; font-size: .75em; }
th[aria-sort="descending"] .rfl-sort-arrow::after { content: '▼'; font-size: .75em; }
.rfl-small { font-size: .88em; margin-top: .5rem; }
/* Winds aloft tool [rfl_winds] */
.rfl-winds-form { border: 1px solid var(--rfl-border, rgba(127,135,145,.3)); border-radius: 8px; padding: 1rem 1.1rem .4rem; background: var(--rfl-panel, rgba(127,135,145,.05)); }
.rfl-wf-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; margin-bottom: .85rem; }
.rfl-wf-row label { display: flex; flex-direction: column; gap: .25rem; font-size: .92em; font-weight: 600; flex: 1 1 10rem; min-width: 0; }
.rfl-wf-row label.rfl-wf-wide { flex-basis: 100%; }
.rfl-wf-row label .rfl-small { font-weight: 400; margin: 0; opacity: .8; }
.rfl-wf-row input, .rfl-wf-row select { font: inherit; font-weight: 400; padding: .4rem .5rem; width: 100%; box-sizing: border-box; max-width: 100%; }
.rfl-winds .rfl-btn-quiet { background: transparent; color: inherit; border: 1px solid currentColor; }
.rfl-winds-status { margin-left: .5rem; font-size: .95em; }
.rfl-winds-status.rfl-err { color: #b3261e; }
.rfl-winds-out { margin-top: 1.25rem; }
.rfl-winds-src { margin: 0 0 .75rem; }
.rfl-winds-grid { display: grid; grid-template-columns: auto minmax(14rem, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 720px) { .rfl-winds-grid { grid-template-columns: minmax(0, 1fr); } }
.rfl-winds-table td, .rfl-winds-table th { padding: .3rem .55rem; }
.rfl-winds-table th { white-space: normal; vertical-align: bottom; }
.rfl-winds-table td.num, .rfl-winds-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rfl-winds-table .rfl-arrow { display: inline-block; line-height: 1; opacity: .8; }
.rfl-winds-table tr.rfl-ground td { font-weight: 600; }
.rfl-winds-csvbox p { display: flex; flex-wrap: wrap; gap: .5rem; }
.rfl-winds-csvbox textarea { white-space: pre; overflow-x: auto; width: 100%; box-sizing: border-box; font: .85em/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; margin-top: .35rem; resize: vertical; }
.rfl-winds-how { margin: 1.25rem 0 .5rem; }
.rfl-winds-how summary { cursor: pointer; font-weight: 600; }
.rfl-winds-how ol { padding-left: 1.4em; }
.rfl-winds-how li { margin: .3rem 0; }
/* Deployment section */
.rfl-findings { margin: .25rem 0 1rem; padding-left: 1.2em; }
.rfl-findings li { margin: .35rem 0; }
.rfl-findings li.rfl-f-warn { list-style: none; margin-left: -1.2em; padding: .5rem .75rem; background: var(--rfl-warn-bg); border-left: 3px solid #d9a12b; border-radius: 4px; }
.rfl-table.wrap2 td:nth-child(2), .rfl-table.wrap4 td:nth-child(4) { white-space: normal; min-width: 14rem; }
.rfl-settings { margin: 1rem 0 0; }
.rfl-settings summary { cursor: pointer; font-weight: 600; }
.rfl-setblock { border-top: 1px solid var(--rfl-border); padding: .5rem 0; }
.rfl-setblock h4 { margin: .4rem 0 .2rem; font-size: 1em; }
.rfl-setblock ul { margin: .2rem 0 .4rem; padding-left: 1.3em; }
.rfl-setblock p { margin: .2rem 0; }
.rfl-todo { border: 1px solid var(--rfl-border); border-left: 4px solid var(--rfl-c1); border-radius: 6px; padding: .5rem 1rem .6rem; margin: .5rem 0 1.25rem; background: var(--rfl-panel); }
.rfl-todo h3 { margin: .3rem 0 .4rem; font-size: 1.05em; }
.rfl-todo ol { margin: 0; padding-left: 1.3em; }
.rfl-todo li { margin: .3rem 0; }
@media print { .rfl-todo { break-inside: avoid; } }
