/* FlightDesk Aero articles. Loaded after home.css, which brings the tokens,
   the navigation bar and the footer; this adds the reading column and the
   pieces an article is made of: figures, worked examples, pseudocode,
   interactive widgets and self-checks. */

.art-head { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 40px 40px; }
.art-head .crumbs { font: 500 13px/1.4 var(--mono); color: var(--ink-soft); margin: 0 0 18px; }
.art-head .crumbs a { color: var(--ink-soft); text-decoration: none; }
.art-head .crumbs a:hover { color: var(--magenta); }
.art-head h1 { font-size: clamp(32px, 4.6vw, 54px); max-width: 18em; }
.art-head .lede { margin: 18px 0 22px; max-width: 38em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font: 500 12px/1 var(--mono); }
.art-meta li { padding: 7px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--rule); color: var(--ink-soft); }

/* Level of an article, 1 to 4: Curious, Student pilot, Pilot, Advanced. */
.art-meta .lvl-li { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
/* .lvl itself is defined in home.css. */

.prose { max-width: 720px; margin: 0 auto; padding-block: clamp(36px, 5vw, 56px) 24px; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose li { font-size: 18px; line-height: 1.7; }
.prose p { margin-bottom: 0; }
.prose h2 { font-size: clamp(25px, 2.8vw, 32px); margin-top: 2.1em; }
.prose h3 { margin-top: 1.6em; }
.prose a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--magenta); }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: 0.35em; }
.prose strong { font-weight: 600; }
.prose code, .prose kbd { font: 500 0.88em var(--mono); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.num { font-family: var(--mono); font-weight: 500; white-space: nowrap; }

/* Callouts: the radio call or ATIS line that starts a problem, and tips. */
.callout { border: 1px solid var(--rule); border-left: 4px solid var(--magenta); background: var(--card); border-radius: 10px; padding: 16px 20px; }
.callout.tip { border-left-color: var(--blue); }
.callout .label { display: block; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--magenta); margin-bottom: 8px; }
.callout.tip .label { color: var(--blue); }
.callout p { margin: 0; font-size: 17px; }
.radio { font: 500 17px/1.6 var(--mono); }

/* Figures */
.fig { margin: 1.8em 0 0; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 16px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-size: 15px; color: var(--ink-soft); padding: 12px 4px 0; line-height: 1.5; }
.dg-rwy { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; }
.dg-cl { stroke: var(--ink-soft); stroke-width: 2; stroke-dasharray: 10 9; }
.dg-num { font: 700 20px var(--display); fill: var(--ink); }
.dg-wind { stroke: var(--blue); stroke-width: 4; fill: none; stroke-linecap: round; }
.dg-head { stroke: var(--ink); stroke-width: 3.5; fill: none; stroke-linecap: round; }
.dg-cross { stroke: var(--magenta); stroke-width: 3.5; fill: none; stroke-linecap: round; }
.dg-ah-wind { fill: var(--blue); }
.dg-ah-head { fill: var(--ink); }
.dg-ah-cross { fill: var(--magenta); }
.dg-proj { stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 4 4; fill: none; }
.dg-arc { stroke: var(--ink-soft); stroke-width: 1.2; fill: none; }
.dg-t { font: 500 13px var(--mono); fill: var(--ink-soft); }
.dg-tw { font: 600 14px var(--mono); fill: var(--blue); }
.dg-th { font: 600 14px var(--mono); fill: var(--ink); }
.dg-tc { font: 600 14px var(--mono); fill: var(--magenta); }
.dg-plane { fill: var(--ink); }
.dg-clock-face { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.dg-clock-fill { fill: var(--magenta); opacity: 0.18; }
.dg-clock-hand { stroke: var(--magenta); stroke-width: 3; stroke-linecap: round; }
.dg-tick { stroke: var(--ink); stroke-width: 1.5; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin-top: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th { font: 600 12px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.prose td.n, .prose th.n { text-align: right; font-family: var(--mono); }
.prose tr.hl td { background: color-mix(in srgb, var(--magenta) 8%, transparent); }

/* Pseudocode */
.code { --night: #0f2a4a; --night-text: #f2efe6; margin: 1.4em 0 0; background: var(--night); color: var(--night-text); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.code .code-bar { display: flex; justify-content: space-between; padding: 9px 14px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; background: color-mix(in srgb, var(--night-text) 10%, var(--night)); color: color-mix(in srgb, var(--night-text) 70%, var(--night)); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 500 14.5px/1.65 var(--mono); }
.code .c { color: color-mix(in srgb, var(--night-text) 55%, var(--night)); }
.code .k { color: #f3a6d0; }

/* Interactive widget */
.widget { margin-top: 1.6em; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.widget .w-title { grid-column: 1 / -1; font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--magenta); margin: 0; }
.w-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--ink-soft); }
.w-fields input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); font: 600 17px var(--mono); }
.w-fields input:focus { outline: 2px solid var(--magenta); outline-offset: 1px; }
.w-out { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.w-out div { background: var(--paper-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.w-out dt { font-size: 13px; color: var(--ink-soft); }
.w-out dd { margin: 2px 0 0; font: 600 20px/1.2 var(--mono); }
.w-out dd small { display: block; font: 500 12px/1.3 var(--body); color: var(--ink-soft); margin-top: 3px; }
.w-out .h dd { color: var(--ink); }
.w-out .x dd { color: var(--magenta); }
.w-note { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--ink-soft); }
.w-note.warn { color: var(--magenta); font-weight: 600; }
.w-diagram svg { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; }

/* Self-check */
.quiz { margin-top: 1.4em; display: grid; gap: 10px; }
.quiz details { border: 1px solid var(--rule); border-radius: 10px; background: var(--card); padding: 14px 18px; }
.quiz summary { cursor: pointer; font-size: 17px; font-weight: 600; list-style-position: outside; }
.quiz summary .radio { font-size: 15px; font-weight: 500; }
.quiz details p { margin: 10px 0 0; font-size: 17px; }

/* The tool this article leads to */
.tool-cta { --night: #0f2a4a; --night-text: #f2efe6; margin-top: 2.2em; display: flex; gap: 18px; align-items: center; background: var(--night); color: var(--night-text); border: 1px solid var(--rule); border-radius: 16px; padding: 22px; }
.tool-cta .dd-icon { width: 54px; height: 54px; background: color-mix(in srgb, var(--night-text) 12%, var(--night)); color: var(--night-text); }
.tool-cta .dd-icon svg { width: 36px; height: 36px; }
.tool-cta h3 { font-size: 20px; margin: 0 0 4px; }
.tool-cta p { margin: 0; font-size: 16px; color: color-mix(in srgb, var(--night-text) 75%, var(--night)); }
.tool-cta .btn { margin-left: auto; flex: none; background: var(--night-text); color: var(--night); border-color: var(--night-text); }
.tool-cta .btn:hover { background: #e45aa9; border-color: #e45aa9; color: #fff; }

.disclaimer { max-width: 720px; margin: 0 auto; padding: 8px 0 56px; font-size: 15px; color: var(--ink-soft); }

[data-lang-block][hidden] { display: none !important; }

@media (max-width: 760px) {
  .widget { grid-template-columns: 1fr; }
  .w-out { grid-template-columns: 1fr; }
  .w-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .w-out dd { text-align: right; }
  .tool-cta { flex-direction: column; align-items: flex-start; }
  .tool-cta .btn { margin-left: 0; }
  .prose p, .prose li { font-size: 17px; }
}
