/* Hallmark v2.0.0
 * theme: custom (pinned Accord Partners DESIGN.md, by request)
 * shape: app screen; genre: modern-minimal; surface: absolute
 * idea: Follow a riyal through two entities into investor cash
 * vibe: sober financial evidence with direct controls
 * posture: committed; axes: light/grotesk/cool
 * hero: working economics summary with four licensing presets
 * nav: four workspace anchors; footer: source provenance strip
 * signature: live two-entity fee and cash reconciliation
 */
/* critique: Dense evidence is intentional; controls and direct labels replace ornamental dashboard cards. */
@import url("./tokens.css");
@import url("./base.css");
/* Hallmark · dismissed 74 · DESIGN.md locks the Accord Partners subtle surface token; the supplied brand palette is preserved. */
html, body { overflow-x: clip; }
body { font-family: var(--font-body); }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.15; letter-spacing: -.035em; }
h2 { font-size: var(--text-xl); line-height: 1.3; }
h3 { font-size: var(--text-lg); line-height: 1.35; }
p + p { margin-top: var(--space-sm); }
button, input, select { border: 1px solid var(--color-muted); border-radius: var(--radius-card); }
button, select, input[type="number"] { min-height: 44px; padding: var(--space-xs) var(--space-sm); background: var(--color-surface); color: var(--color-ink); }
button { cursor: pointer; font-size: var(--text-sm); font-weight: 550; }
button:hover { border-color: var(--color-action); background: var(--color-surface-subtle); }
button:active { transform: translateY(1px); }
button:disabled, input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
input[aria-invalid="true"] { border-color: var(--color-error); }
label { display: grid; gap: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-sm); }
select { max-width: 100%; width: 100%; }
input[type="number"] { width: 100%; min-width: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; min-width: 0; accent-color: var(--color-action); cursor: pointer; min-height: 28px; }
input[type="checkbox"] { accent-color: var(--color-action); width: 18px; height: 18px; flex-shrink: 0; }
.skip { position: absolute; transform: translateY(-200%); background: var(--color-surface); color: var(--color-ink); padding: var(--space-sm); z-index: var(--z-modal); }
.skip:focus { transform: translateY(0); }
.masthead { background: var(--color-navy); color: var(--color-surface); }
.mast-row { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: var(--space-lg); }
.mast-row > span { font-size: var(--text-sm); }
.wordmark { white-space: nowrap; text-decoration: none; font-weight: 650; font-size: 26px; letter-spacing: -.04em; }
.wordmark span { font-weight: 400; }
.tabs { display: flex; gap: var(--space-lg); overflow-x: auto; }
.tabs a { padding: var(--space-md) 0; text-decoration: none; white-space: nowrap; border-bottom: 3px solid var(--color-clear); font-size: var(--text-sm); }
.tabs a:hover, .tabs a[aria-current="page"] { border-color: var(--color-highlight); }
.workspace { padding-block: var(--space-xl); }
.section-head { display: flex; justify-content: space-between; gap: var(--space-lg); align-items: end; margin-bottom: var(--space-lg); }
.section-head p { margin-top: var(--space-sm); color: var(--color-ink-2); }
.snapshot { color: var(--color-ink-2); font-size: var(--text-xs); white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: var(--space-lg) 0; border-block: 1px solid var(--color-rule); margin-bottom: var(--space-lg); }
.metrics > div { padding-inline: var(--space-lg); border-left: 1px solid var(--color-rule); }
.metrics > div:first-child { border: 0; padding-left: 0; }
.metrics span, .metrics small { display: block; font-size: var(--text-sm); color: var(--color-ink-2); }
.metrics strong { display: block; font-size: clamp(1.7rem,2.6vw,2.5rem); font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-block: var(--space-2xs); }
.metrics > div:nth-child(2) strong { color: var(--color-accent); }
.presets { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--space-sm); }
.presets button { background: var(--color-clear); text-align: left; padding: var(--space-xs) var(--space-sm); width: 100%; white-space: nowrap; }
.presets span, .presets strong, .presets small { display: block; }
.presets span { font-size: var(--text-xs); color: var(--color-ink-2); }
.presets strong { margin-block: var(--space-xs); font-size: var(--text-md); line-height: 1.3; }
.presets small { font-weight: 400; color: var(--color-ink-2); }
.presets [aria-pressed="true"] { border-color: var(--color-accent); box-shadow: inset 0 3px var(--color-accent); }
.notice { padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-highlight); background: var(--color-warning-bg); font-size: var(--text-sm); margin-block: var(--space-md); color: var(--color-ink-2); max-width: none; }
.goal { margin-block: var(--space-lg); padding: var(--space-lg); background: var(--color-navy); color: var(--color-surface); }
.goal p { font-size: var(--text-sm); margin-top: var(--space-xs); }
.goal label { color: var(--color-surface); }
.goal form { display: grid; grid-template-columns: 2fr .65fr 2fr auto; align-items: end; gap: var(--space-md); margin-top: var(--space-md); }
.primary { background: var(--color-action); color: var(--color-surface); border-color: var(--color-action); }
.primary:hover { background: var(--color-accent); color: var(--color-surface); }
.quick-targets { display: flex; gap: var(--space-xs); margin-block: var(--space-sm); }
.quick-targets button { min-height: 32px; padding-block: var(--space-2xs); }
.work-grid { display: grid; grid-template-columns: minmax(280px, .36fr) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
aside { background: var(--color-surface); padding: var(--space-lg); border-top: 3px solid var(--color-accent); }
fieldset { margin: var(--space-lg) 0 0; padding: 0 0 var(--space-lg); border: 0; border-bottom: 1px solid var(--color-rule); min-width: 0; }
legend { font-weight: 600; font-size: var(--text-md); margin-bottom: var(--space-md); }
.control { margin-bottom: var(--space-md); }
.input-pair { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); }
.input-pair input[type="range"] { flex: 1; }
.input-pair input[type="range"] + input { width: 82px; }
.input-pair > span { font-size: var(--text-xs); white-space: nowrap; }
.benchmark { white-space: nowrap; min-height: 32px; padding: var(--space-2xs) var(--space-xs); font-size: var(--text-xs); color: var(--color-accent); margin-top: var(--space-xs); border-color: var(--color-rule); }
.benchmark span { margin-inline: var(--space-2xs); }
.check { display: flex; align-items: center; gap: var(--space-xs); margin-block: var(--space-md); }
.caption, .note { color: var(--color-ink-2); font-size: var(--text-xs); margin-block: var(--space-sm); }
.evidence > section { padding: var(--space-lg); background: var(--color-surface); margin-bottom: var(--space-lg); }
.evidence h2 { margin-bottom: var(--space-lg); }
figure { margin: 0; padding-block: var(--space-md); min-width: 0; }
figcaption { font-weight: 600; margin-bottom: var(--space-sm); }
figcaption span { font-weight: 400; font-size: var(--text-xs); margin-left: var(--space-sm); color: var(--color-ink-2); }
.chart-grid figure + figure { border-top: 1px solid var(--color-rule); }
svg { width: 100%; overflow: visible; }
svg text { fill: var(--color-ink-2); font-family: var(--font-body); font-size: 13px; }
svg .value { fill: var(--color-ink); font-family: var(--font-mono); }
.axis { stroke: var(--color-muted); stroke-width: 1; }
.accord { fill: var(--color-accent); }
.partner { fill: var(--color-partner); }
.muted-bar { fill: var(--color-muted); }
.gold { fill: var(--color-highlight); }
.tax-bar { fill: var(--color-warning); }
.axis-label { font-size: 11px; }
.table-scroll { overflow-x: auto; max-width: 100%; margin-block: var(--space-md); }
table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
caption { text-align: left; font-weight: 600; margin-bottom: var(--space-sm); }
caption span { display: block; font-weight: 400; font-size: var(--text-xs); }
th, td { padding: var(--space-sm); border-bottom: 1px solid var(--color-rule); vertical-align: top; text-align: left; min-width: 95px; }
th { font-weight: 550; }
thead { background: var(--color-surface-subtle); }
thead th { font-size: var(--text-xs); }
tbody th { min-width: 200px; }
td.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.total { background: var(--color-surface-subtle); font-weight: 650; }
.valuation-inputs, .valuation-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-md); }
dl { margin-block: var(--space-md); }
dt { font-size: var(--text-sm); color: var(--color-ink-2); font-weight: 550; }
dd { margin: var(--space-xs) 0 var(--space-md); }
.valuation-results dd { font-family: var(--font-mono); font-size: var(--text-lg); }
.assumptions p { font-size: var(--text-sm); }
.study, .firm, .performance { background: var(--color-surface); padding: var(--space-lg); border-top: 1px solid var(--color-rule); margin-block: var(--space-lg); }
.study-head { display: flex; justify-content: space-between; gap: var(--space-lg); align-items: start; }
.study-head h3 { max-width: 40ch; }
.study-head p { margin-top: var(--space-xs); font-size: var(--text-sm); }
.badge { display: inline-block; padding: var(--space-2xs) var(--space-xs); font-size: var(--text-xs); border-radius: var(--radius-card); }
.success { background: var(--color-success-bg); color: var(--color-ink); }
.warning { background: var(--color-warning-bg); color: var(--color-ink); }
.error { background: var(--color-error-bg); color: var(--color-ink); }
.formula { font-family: var(--font-mono); font-size: var(--text-sm); margin-block: var(--space-md); }
.thermometer { max-width: 760px; }
.range-line { stroke: var(--color-partner); stroke-width: 3; }
.iqr-band { fill: var(--color-success-bg); stroke: var(--color-success); }
.marker.success { fill: var(--color-success); }
.marker.warning { fill: var(--color-warning); }
.marker.error { fill: var(--color-error); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-block: var(--space-md); }
.filter { max-width: 360px; margin-top: var(--space-lg); }
.study td:last-child { min-width: 300px; }
details { border-block: 1px solid var(--color-rule); padding-block: var(--space-sm); margin-block: var(--space-sm); }
summary { cursor: pointer; font-weight: 550; min-height: 36px; }
details p { margin-block: var(--space-sm); font-size: var(--text-sm); }
.firm dl > div { display: grid; grid-template-columns: minmax(130px,.25fr) minmax(0,1fr); gap: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.firm > p { margin-top: var(--space-sm); }
.legal-inputs { background: var(--color-surface); padding: var(--space-lg); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-md); margin-block: var(--space-lg); }
.diagnostics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-md); margin-block: var(--space-lg); }
.diagnostic { padding: var(--space-lg); border: 1px solid var(--color-warning); }
.diagnostic.success { border-color: var(--color-success); }
.diagnostic.error { border-color: var(--color-error); }
.diagnostic h3 { font-size: var(--text-md); }
.diagnostic p { font-size: var(--text-sm); margin-top: var(--space-sm); }
.blueprint { background: var(--color-surface); padding: var(--space-lg); margin-block: var(--space-lg); }
footer { border-top: 1px solid var(--color-rule); padding-block: var(--space-lg); font-size: var(--text-xs); color: var(--color-ink-2); }
dialog { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100%; max-height: 100%; width: min(100%, 1050px); max-width: 100%; border: 0; padding: var(--space-lg); background: var(--color-surface); color: var(--color-ink); overflow-y: auto; }
dialog::backdrop { background: var(--color-overlay); }
.drawer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-md); margin-bottom: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
@media (max-width: 70rem) { .goal form { grid-template-columns: 1fr 1fr; } .snapshot { display: none; } .work-grid { grid-template-columns: minmax(260px,.45fr) minmax(0,1fr); } }
@media (max-width: 50rem) { .work-grid, .diagnostics { grid-template-columns: minmax(0,1fr); } .presets { grid-template-columns: repeat(2,minmax(0,1fr)); } .metrics { gap: var(--space-sm); } .metrics > div { padding-inline: var(--space-sm); } .metrics strong { font-size: var(--text-xl); } .mast-row > span { max-width: 150px; text-align: right; font-size: var(--text-xs); } .study-head { display: block; } .firm dl > div { grid-template-columns: minmax(0,1fr); gap: 0; } }
@media (max-width: 35rem) { .goal form, .legal-inputs, .valuation-results, .valuation-inputs { grid-template-columns: minmax(0,1fr); } .metrics { grid-template-columns: minmax(0,1fr); } .metrics > div { border: 0; padding: var(--space-sm) 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; } .metrics strong { text-align: right; } .metrics small { grid-column: 1 / -1; } .presets button { padding: var(--space-sm); } .evidence > section, aside, .study, .firm, .performance { padding: var(--space-md); } .chart-grid svg { min-width: 550px; } .chart-grid figure { overflow-x: auto; } .thermometer { overflow-x: auto; } .thermometer svg { min-width: 500px; } }
@media (prefers-reduced-motion: reduce) { button:active { transform: none; } }

strong { font-weight: 600; }
.study-head h2 { max-width: 40ch; }
@media (max-width: 35rem) { .presets { grid-template-columns: minmax(0,1fr); } .mast-row > span { display: none; } }

.waterfall-guide { stroke: var(--color-muted); stroke-dasharray: 3 3; }
@media (min-width: 90rem) {
 .chart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-lg); }
 .chart-grid > figure:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
 .chart-grid > figure:nth-child(3) { border-top: 0; }
 .chart-grid > figure:not(:nth-child(2)) svg text { font-size: 20px; }
}
