/* Component library for guides and Journey steps. Plain CSS, no libraries.
   Colors reference the tokens in style.css; every pair is in data/contrast-pairs.json. */

/* At a glance */
.aj-glance { border: 2px solid var(--gold); border-radius: 14px; padding: 18px 22px; margin: 18px 0 22px; background: #fbfaf6; }
.aj-glance h2 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 10px; }
.aj-glance ul { margin: 0; padding-left: 20px; }
.aj-glance li { margin: 6px 0; font-size: 1.02rem; line-height: 1.5; color: #0b2a3f; }

/* Callouts */
.aj-callout { border-radius: 12px; padding: 16px 18px 16px 52px; margin: 22px 0; position: relative; line-height: 1.6; }
.aj-callout::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 18px; top: 16px; font-size: 1.2rem; }
.aj-callout strong { display: block; margin-bottom: 4px; }
.aj-callout.rule { background: #eef4f8; border-left: 5px solid var(--navy); color: #0b2a3f; }
.aj-callout.rule::before { content: "\f0eb"; color: var(--navy); }
.aj-callout.watch { background: #fff4ec; border-left: 5px solid #c2410c; color: #7a2e0e; }
.aj-callout.watch::before { content: "\f071"; color: #c2410c; }

/* Interactive frame shared by calculator, timeline and document */
.aj-widget { border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; padding: 20px 22px; margin: 22px 0; }
.aj-widget h3 { margin: 0 0 6px; font-size: 1.1rem; color: #0b2a3f; }
.aj-widget .aj-lede { color: #374151; font-size: 0.95rem; margin: 0 0 14px; }
.aj-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; margin: 0 0 14px; }
.aj-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.aj-field input, .aj-field select { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 9px 10px; border: 1px solid #9ca3af; border-radius: 8px; color: #0b2a3f; background: #fff; }
.aj-field input:focus, .aj-field select:focus, .aj-toggle input:focus + span, .aj-hotspot:focus { outline: 3px solid var(--navy); outline-offset: 2px; }
.aj-field .aj-hint { font-size: 0.78rem; color: #4b5563; margin-top: 3px; }
.aj-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 6px 0 14px; }
.aj-result { background: #0b2a3f; color: #fff; border-radius: 10px; padding: 12px 14px; }
.aj-result .aj-k { font-size: 0.78rem; color: rgba(255,255,255,0.85); }
.aj-result .aj-v { font-size: 1.35rem; font-weight: 700; color: #fff; }
.aj-result.empty { background: #f3f4f6; color: #374151; }
.aj-result.empty .aj-k { color: #374151; }
.aj-result.empty .aj-v { color: #4b5563; font-size: 1rem; font-weight: 600; }
.aj-chart { margin: 8px 0; }
.aj-chart svg { width: 100%; height: auto; display: block; }
.aj-assumptions { font-size: 0.85rem; color: #4b5563; border-top: 1px solid #e5e7eb; padding-top: 10px; margin: 8px 0 0; }
.aj-anchor { font-size: 0.9rem; color: #374151; background: #f7f5ef; border-left: 4px solid var(--gold); padding: 10px 14px; margin: 0 0 14px; }

/* Toggles */
.aj-toggles { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 14px; }
.aj-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; color: #0b2a3f; cursor: pointer; }
.aj-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.aj-toggle span.aj-pill { border: 2px solid var(--navy); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.aj-toggle input:checked + span.aj-pill { background: var(--navy); color: #fff; }

/* Annotated document */
.aj-doc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 18px; }
.aj-doc-paper { border: 1px solid #9ca3af; border-radius: 8px; background: #fcfcfa; padding: 14px 16px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; color: #111827; position: relative; }
.aj-doc-stamp { display: inline-block; border: 2px solid #c2410c; color: #c2410c; font-weight: 700; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; font-family: 'Montserrat', sans-serif; font-size: 0.72rem; }
.aj-doc-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted #d1d5db; }
.aj-doc-head { font-weight: 700; margin: 10px 0 4px; text-transform: uppercase; font-size: 0.74rem; color: #0b2a3f; display: flex; align-items: center; gap: 8px; }
.aj-hotspot { font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 800; background: var(--navy); color: #fff; border: 0; border-radius: 999px; width: 24px; height: 24px; cursor: pointer; }
.aj-hotspot[aria-expanded="true"] { background: var(--gold-text); }
.aj-doc-notes { border-left: 1px solid #e5e7eb; padding-left: 18px; }
.aj-doc-note { display: none; }
.aj-doc-note.open { display: block; }
.aj-doc-note h4 { margin: 0 0 6px; font-size: 1rem; color: #0b2a3f; }
.aj-doc-note p { margin: 0 0 8px; font-size: 0.95rem; color: #1f2937; }
.aj-doc-note .aj-tax { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef4f8; color: var(--navy); margin-top: 4px; }
.aj-doc-note .aj-tax.free { background: #ecfdf3; color: #166534; }
.no-js .aj-doc-note { display: block; border-bottom: 1px solid #e5e7eb; padding-bottom: 10px; margin-bottom: 10px; }
.no-js .aj-doc-notes { border-left: 0; padding-left: 0; }

/* Timeline */
.aj-timeline svg text { font-family: 'Montserrat', sans-serif; }
.aj-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 0.85rem; color: #374151; margin: 6px 0 0; }
.aj-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--sw); }

@media (max-width: 700px) {
  .aj-doc { grid-template-columns: 1fr; }
  .aj-doc-notes { border-left: 0; padding-left: 0; }
  .aj-widget { padding: 16px 14px; }
}
