/* Shared styles for the Auxiliary Advisory sample pages. Brand tokens mirror the website's css/styles.css. */
:root {
  --crimson: #9E1B1E; --crimson-dark: #7A1417; --text-on-dark: #CFC6BC;
  --ink: #15110F; --ink-line: #3A312D; --bone: #F3EDE4; --bone-line: #D9CFC2;
  --card: #FFFFFF; --text: #15110F; --muted: #4E443D; --track: #E9E1D5;
  --good: #2F6B3F; --good-bg: #E3EFE5; --warn: #7A5200; --warn-bg: #F7EBCB;
  --bad: #9E1B1E; --bad-bg: #F6DEDC; --neutral-bg: #ECE5DA;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bone); color: var(--text); font-family: var(--font-body);
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--crimson); } a:hover { color: var(--crimson-dark); }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 2px; }

.aa-header { background: var(--ink); color: #fff; }
.aa-header .inner { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex;
  justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.aa-wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: .14em; font-size: 15px; color: #fff; text-decoration: none; }
.aa-wordmark img { height: 28px; width: auto; }
.aa-header nav a { color: var(--text-on-dark); /* same as the main website menu */ font-size: 14px; font-weight: 700; text-decoration: none; margin-left: 18px; }
.aa-header nav a:hover { color: #fff; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 56px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); margin: 0 0 6px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 40px); line-height: 1.1; margin: 0 0 10px; }
h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.lede { color: var(--muted); max-width: 70ch; margin: 0 0 18px; }
.ribbon { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; background: var(--card);
  border: 1px solid var(--bone-line); border-left: 4px solid var(--crimson); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 18px; font-size: 14px; }
.ribbon strong { font-weight: 800; }
.ribbon label { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-left: auto; }
/* 16px stops iPhone Safari zooming the page when a box is tapped */
select, input[type=number], input[type=text] { font: inherit; font-size: 16px; padding: 6px 8px; border: 1px solid var(--bone-line);
  border-radius: 6px; background: #fff; color: var(--text); }
input[type=number] { width: 110px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--bone-line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 800; line-height: 1.15; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; color: var(--muted); }
.kpi.alert { border-left: 4px solid var(--crimson); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 14px; margin-bottom: 14px; }
.grid2 > * { min-width: 0; } /* lets cards shrink on very small phones instead of pushing the page wider */
.card { background: var(--card); border: 1px solid var(--bone-line); border-radius: var(--radius); padding: 16px 18px; }
.card .hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 150px 1fr 96px; gap: 10px; align-items: center; font-size: 14px; }
.bar .track { background: var(--track); border-radius: 4px; height: 22px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--ink); border-radius: 4px; min-width: 2px; }
.bar .fill.crimson { background: var(--crimson); } .bar .fill.good { background: var(--good); } .bar .fill.warn { background: #B9801A; }
.bar .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  border-bottom: 2px solid var(--bone-line); padding: 6px 8px; }
table.simple td { padding: 8px; border-bottom: 1px solid var(--bone-line); vertical-align: top; }
table.simple td.num, table.simple th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--neutral-bg); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.btn { font: inherit; font-weight: 800; font-size: 14px; border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; background: var(--crimson); color: #fff; }
.btn:hover { background: var(--crimson-dark); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--bone-line); }
.btn.secondary:hover { background: var(--neutral-bg); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { font: inherit; font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--bone-line); background: #fff; cursor: pointer; color: var(--ink); }
.tabs button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }

.chase { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chase li { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; border: 1px solid var(--bone-line); border-radius: 6px; padding: 8px 12px; }
.chase li.done { opacity: .5; } .chase li.done .what { text-decoration: line-through; }
.chase .what { font-size: 14px; } .chase .what small { display: block; color: var(--muted); font-size: 13px; }
.wrap small { font-size: 13px; }

.note { font-size: 13px; color: var(--muted); border-top: 1px solid var(--bone-line); margin-top: 22px; padding-top: 12px; }
.sample-flag { display: inline-block; background: var(--warn-bg); color: var(--warn); font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.cta { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 20px 22px; margin-top: 22px; display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.cta p { margin: 0; max-width: 60ch; color: #CFC6BC; } .cta strong { color: #fff; }
.cta a.btn { text-decoration: none; display: inline-block; }

.stepper { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; }
.stepper > * { min-width: 0; } /* wide tables scroll inside their box instead of widening the page */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-content: start; }
.steps button { width: 100%; text-align: left; font: inherit; font-size: 14px; font-weight: 700; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--bone-line); background: #fff; cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--ink); }
.steps button .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--neutral-bg); display: grid; place-items: center; font-size: 12px; }
.steps button[aria-current=step] { border-color: var(--crimson); box-shadow: inset 4px 0 0 var(--crimson); }
.steps button[aria-current=step] .n { background: var(--crimson); color: #fff; }
.screen { background: #fff; border: 1px solid var(--bone-line); border-radius: var(--radius); padding: 18px 20px; min-height: 360px; }
.screen h2 { margin-bottom: 2px; } .screen .what { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.paper { border: 1px solid var(--bone-line); border-radius: 6px; padding: 14px 16px; background: #FBF9F5; font-size: 14px; }
.paper .meta { font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--bone-line); padding-bottom: 8px; margin-bottom: 10px; }
.paper p { margin: 0 0 10px; white-space: pre-line; }
.hl { background: #F7E3A1; padding: 0 3px; border-radius: 3px; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; margin: 12px 0 0; }
.fields dt { color: var(--muted); font-weight: 700; } .fields dd { margin: 0; font-weight: 700; }
.approve { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--good); }
.controls { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

.email-view .wrap { max-width: 640px; }
.email-view .kpis { grid-template-columns: 1fr 1fr; }

@media (max-width: 720px) {
  .bar { grid-template-columns: 110px 1fr 76px; font-size: 13px; }
  .stepper { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .ribbon label { margin-left: 0; }
}
/* Phones and touch screens: controls at least 44px tall, so they are easy to tap */
@media (pointer: coarse), (max-width: 720px) {
  .btn, .btn.small, .tabs button, .steps button { min-height: 44px; }
  .btn { display: inline-flex; align-items: center; justify-content: center; }
  select, input[type=number], input[type=text] { min-height: 44px; }
  .aa-header nav a { display: inline-block; padding: 12px 0; }
  .linklike { display: inline-flex; align-items: center; min-height: 44px; text-align: left; }
  .aa-wordmark { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

.linklike { font: inherit; font-weight: 700; color: var(--crimson); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.linklike:hover { color: var(--crimson-dark); }
dialog.dlg { border: 1px solid var(--bone-line); border-radius: var(--radius); padding: 20px 22px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; color: var(--text); background: #fff; }
dialog.dlg::backdrop { background: rgba(21, 17, 15, .55); }
.dlg-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.dlg-head h2 { margin: 0; font-size: 20px; flex: 1 1 200px; }
dialog.dlg h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 700; } .kv dd { margin: 0; }
.timeline { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.next { background: var(--neutral-bg); border-radius: 6px; padding: 8px 12px; font-size: 14px; margin: 14px 0 6px; }

.msg { max-width: 92%; border-radius: 12px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.msg .who { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.msg.them { background: #fff; border: 1px solid var(--bone-line); }
.msg.us { background: var(--ink); color: #fff; margin-left: auto; } .msg.us .who { color: var(--crimson); }

.split { display: flex; height: 30px; border-radius: 6px; overflow: hidden; font-size: 13px; font-weight: 800; }
.split .cost { background: var(--track); color: var(--ink); display: grid; place-items: center; white-space: nowrap; }
.split .prof { background: var(--good); color: #fff; display: grid; place-items: center; white-space: nowrap; }
svg text { font-family: var(--font-body); }
svg g[role=button]:focus-visible { outline: 3px solid var(--crimson); outline-offset: 2px; }
