/* Airworthiness directives article: timeline, scenarios, AD anatomy and the
 * "who does what" diagram. Shares tokens with home.css / article.css. */
.widget.adw { grid-template-columns: 1fr; }

/* Timeline */
.ad-tl { list-style: none; margin: 0; padding: 6px 0 0; display: flex; justify-content: space-between; position: relative; gap: 4px; }
.ad-tl::before { content: ""; position: absolute; left: 10px; right: 10px; top: 16px; height: 2px; background: var(--rule); }
.ad-tl li { flex: 1 1 0; display: flex; justify-content: center; position: relative; }
.ad-dot { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-soft); font: 500 11px/1.2 var(--mono); }
.ad-dot::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-soft); }
.ad-dot.past::before { background: var(--ink-soft); }
.ad-dot.on { color: var(--magenta); }
.ad-dot.on::before { background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 0 4px color-mix(in srgb, var(--magenta) 22%, transparent); }
.ad-date { max-width: 76px; text-align: center; }
.ad-card { border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); padding: 14px 16px; }
.ad-card h3 { margin: 2px 0 8px; font-size: 20px; }
.ad-card p { margin: 0 0 10px; font-size: 16px; line-height: 1.55; }
.ad-when { font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); margin: 0 !important; }
.ad-you { border-left: 4px solid var(--blue); padding-left: 12px; margin-bottom: 0 !important; }
.ad-nav { display: flex; align-items: center; gap: 12px; }
.ad-pos { font: 600 13px var(--mono); color: var(--ink-soft); }
.ad-prev, .ad-next, .ad-btn { font: 600 15px var(--body); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.ad-next, .ad-btn.dark { background: var(--ink); color: var(--paper); }
.ad-prev[disabled], .ad-next[disabled] { opacity: .35; cursor: default; }
.ad-btn { justify-self: start; }

/* Scenarios */
.ad-sit { font-size: 18px; line-height: 1.5; margin: 0; }
.ad-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-opt { font: 600 15px var(--body); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.ad-opt:not([disabled]):hover { border-color: var(--ink); }
.ad-opt.ok { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.ad-opt.bad { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.ad-opt[disabled] { cursor: default; }
.ad-score { font: 600 20px var(--display, var(--body)); margin: 0; }
.w-note.ad-why { color: var(--ink); font-weight: 400; font-size: 16px; line-height: 1.5; border-left: 4px solid var(--magenta); padding-left: 12px; }
.w-note.ad-why.ok { border-left-color: #1f7a4d; }
.w-note.ad-why strong { color: var(--magenta); }
.w-note.ad-why.ok strong { color: #1f7a4d; }
@media (prefers-color-scheme: dark) { .w-note.ad-why.ok strong { color: #5fc493; } }
.ad-dot:focus-visible, .ad-prev:focus-visible, .ad-next:focus-visible, .ad-btn:focus-visible, .ad-opt:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* AD anatomy */
.ad-doc { margin: 1.6em 0 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); overflow: hidden; }
.ad-doc-head { background: #0f2a4a; color: #f2efe6; padding: 12px 16px; font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.ad-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 12px 16px; border-top: 1px dashed var(--rule); }
.ad-row:first-of-type { border-top: 0; }
.ad-field { font: 500 14px/1.5 var(--mono); }
.ad-field b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.ad-note { font-size: 15px; line-height: 1.5; position: relative; padding-left: 30px; }
.ad-note i { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--magenta); color: #fff; font: 600 12px/22px var(--mono); text-align: center; font-style: normal; }
.ad-doc figcaption { font-size: 14px; color: var(--ink-soft); padding: 10px 16px 14px; border-top: 1px solid var(--rule); }

/* Who-does-what diagram */
.wd { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; max-width: 560px; margin-inline: auto; }
.wd-step { position: relative; border: 1.4px solid var(--ink); border-radius: 10px; background: var(--paper); padding: 10px 14px; display: grid; gap: 2px; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.wd-step strong { color: var(--ink); font-size: 16px; }
.wd-step .wd-doc { font: 600 11px var(--mono); letter-spacing: .08em; color: var(--magenta); }
.wd-step.k { border-color: var(--magenta); background: color-mix(in srgb, var(--magenta) 10%, var(--paper)); }
.wd-step.p { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--paper)); }
.wd-step:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: -20px; width: 0; height: 0; border: 7px solid transparent; border-top: 10px solid var(--ink-soft); transform: translateX(-50%); }
.wd-step:not(:last-child)::before { content: ""; position: absolute; left: 50%; bottom: -12px; width: 2px; height: 12px; background: var(--ink-soft); transform: translateX(-50%); }

@media (max-width: 600px) {
  .ad-opt { flex: 1 1 100%; text-align: left; }
  .ad-row { grid-template-columns: 1fr; gap: 6px; }
  .ad-date { font-size: 10px; max-width: 48px; }
}
