.ar-main {
  --ar-line: #dce5dd;
  --ar-muted: #53635a;
  --ar-deep: #204436;
  --ar-paid: #244d3c;
  --ar-promised: #6d9b83;
  --ar-estimated: #d1e1cb;
  max-width: 1320px;
  margin: 0 auto;
  padding: 15px clamp(18px, 5vw, 72px) 55px;
  color: #22352c;
}
.ar-main .workspace-title { margin-bottom: 22px; }
.ar-main .workspace-title h1 { font-size: clamp(28px, 5vw, 48px); line-height: 1.16; }
.ar-main .workspace-title p { max-width: 66ch; }
.ar-meta, .ar-section-head, .ar-holds {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 18px;
}
.ar-meta { margin-bottom: 10px; color: var(--ar-muted); font-size: .81rem; }
.ar-quiet { background: transparent; color: var(--ar-deep); border: 1px solid var(--ar-line); border-radius: 7px; padding: 8px 12px; }
.ar-quiet:hover { background: #e8efe8; }
.ar-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ar-kpi, .ar-panel { border: 1px solid var(--ar-line); border-radius: 15px; background: #fff; }
.ar-kpi { padding: clamp(12px, 2.3vw, 23px); display: grid; gap: 9px; align-content: start; }
.ar-kpi:last-child { background: var(--ar-deep); color: #fff; border-color: var(--ar-deep); }
.ar-kpi span { font-size: .82rem; }
.ar-kpi strong { font-size: clamp(21px, 3vw, 37px); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.ar-panel { padding: clamp(14px, 2.2vw, 25px); margin-bottom: 16px; }
.ar-panel h2 { font-size: clamp(19px, 2.25vw, 26px); margin: 0; letter-spacing: -.025em; }
.ar-panel h3 { font-size: 1rem; margin: 0 0 7px; }
.ar-muted { color: var(--ar-muted); font-size: .82rem; }
p.ar-muted { margin: 6px 0; line-height: 1.5; }
.ar-switch { display: inline-flex; border: 1px solid var(--ar-line); padding: 3px; border-radius: 8px; background: #f4f7f3; }
.ar-switch button { border-radius: 5px; padding: 6px 12px; background: transparent; font-size: .85rem; }
.ar-switch button[aria-pressed=true] { color: white; background: var(--ar-deep); }
.ar-scenario { font-size: .84rem; color: var(--ar-muted); }
.ar-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 10px; font-size: .78rem; color: var(--ar-muted); }
.ar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ar-legend i { width: 10px; height: 10px; border-radius: 2px; }
.ar-received { background: var(--ar-paid); }
.ar-promised { background: var(--ar-promised); }
.ar-estimated { background: var(--ar-estimated); }
.ar-weeks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ar-week { min-width: 0; display: grid; gap: 6px; text-align: left; padding: 13px; border-radius: 10px; border: 1px solid var(--ar-line); background: #f8faf7; }
.ar-week:hover, .ar-week[aria-expanded=true] { background: #eaf1e8; border-color: #8da797; }
.ar-week small { font-size: .72rem; color: var(--ar-muted); display: inline-block; }
.ar-week strong { font-variant-numeric: tabular-nums; }
.ar-bar { display: flex; height: 9px; border-radius: 6px; overflow: hidden; background: #e8ede7; margin: 4px 0; }
.ar-week-items { list-style: none; margin: 12px 0 0; padding: 0; }
.ar-week-items li { display: flex; justify-content: space-between; align-items: center; gap: 9px; flex-wrap: wrap; border-bottom: 1px solid var(--ar-line); padding: 8px 0; font-size: .85rem; }
.ar-holds { justify-content: start; border-top: 1px solid var(--ar-line); margin-top: 16px; padding-top: 13px; font-size: .84rem; color: var(--ar-muted); }
.ar-holds strong { margin-left: 5px; color: #22352c; }
.ar-queue-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-top: 10px; font-size: .87rem; }
.ar-dispute-owner { border-top: 1px solid var(--ar-line); padding-top: 10px; }
.ar-link { color: #255a43; background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; font-weight: 700; }
.ar-tag { border-radius: 5px; color: #704121; background: #fff0db; padding: 5px 8px; }
.ar-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 17px 0; gap: 12px; }
.ar-amounts div { border: 1px solid var(--ar-line); padding: 10px; border-radius: 8px; }
.ar-amounts dt { font-size: .78rem; color: var(--ar-muted); }
.ar-amounts dd { margin: 4px 0 0; font-weight: 650; font-size: 1.07rem; }
.ar-invoice-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.ar-action-panel, .ar-evidence { padding: 16px; border: 1px solid var(--ar-line); border-radius: 10px; background: #f7f9f5; min-width: 0; }
.ar-action-panel p, .ar-evidence li { font-size: .88rem; line-height: 1.55; color: var(--ar-muted); }
.ar-progress { padding-left: 22px; margin: 0 0 15px; font-size: .82rem; line-height: 1.8; color: var(--ar-muted); }
.ar-progress .ar-done { color: #2f674d; }
.ar-progress [aria-current=step] { color: #1d4733; font-weight: 700; }
.ar-field { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .88rem; margin: 0 0 12px; }
.ar-field select { font: inherit; max-width: 100%; background: white; border: 1px solid #a2b4a6; border-radius: 6px; padding: 6px; }
.ar-evidence ul { margin: 0; padding-left: 18px; }
.ar-evidence li + li { margin-top: 6px; }
.ar-main :is(h2,h3)[tabindex] { scroll-margin-top: 18px; }
@media (max-width: 760px) {
  .ar-kpis, .ar-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-invoice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .ar-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-week { padding: 9px; }
}
