* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; color: var(--color-text); background: var(--color-background); font: 1rem/1.6 var(--font-body); }
a { color: inherit; text-underline-offset: .22em; } button,input,select,textarea { font: inherit; }
button { cursor: pointer; } img,svg { max-width: 100%; } h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: clamp(2rem,3.4vw,3rem); } h3 { font-size: var(--text-xl); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
.container { width: min(var(--container), calc(100% - 96px)); margin-inline: auto; }
.eyebrow { font-size: var(--text-xs); letter-spacing: .17em; text-transform: uppercase; font-weight: 700; color: var(--color-primary); }
/* Controls: compact geometry, restrained depth, clear interaction states. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 1rem;
  min-height: 48px; padding: .75rem 1.2rem; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 700;
  text-decoration: none; line-height: 1.35;
  transition: background var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}
.btn-primary {
  color: white; background: linear-gradient(180deg, #d31b1d, var(--color-primary));
  border-color: #a91012; box-shadow: inset 0 1px 0 #ffffff26, var(--shadow-button);
}
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: inset 0 1px 0 #ffffff20, 0 5px 16px #86181124; transform: translateY(-1px); }
.btn-secondary { background: var(--color-surface); border-color: var(--border-subtle); box-shadow: 0 1px 3px #20241f06; }
.btn-secondary:hover { background: var(--neutral-50); border-color: var(--neutral-200); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: inset 0 1px 3px #20241f15; }
.btn:disabled { background: var(--neutral-100); border-color: transparent; color: var(--neutral-600); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-text { padding-inline: .25rem; justify-content: flex-start; color: var(--color-primary); background: transparent; box-shadow: none; }
.btn-text:hover { background: var(--brand-50); }
.btn-sm { min-height: 40px; padding: .6rem .9rem; font-size: var(--text-xs); border-radius: .625rem; }
.btn-icon { min-width: 44px; min-height: 44px; padding: .6rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid #c8151710; border-radius: var(--radius-pill); background: var(--brand-50); color: var(--brand-700); font-size: var(--text-xs); font-weight: 700; }
.badge-success { color: var(--color-success); background: #eff6ef; border-color: #27613a14; }
.card { padding: var(--space-8); background: var(--color-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.card-interactive { transition: box-shadow var(--duration-base), border-color var(--duration-base); }
.card-interactive:hover,.card-interactive:focus-within { border-color: #c8151733; box-shadow: var(--shadow-card-hover); }
.panel { background: var(--color-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.panel-header h3 { font-size: var(--text-base); letter-spacing: -.02em; margin: 0; }
.panel-body { padding: var(--space-6); }
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); } .field label { font-size: var(--text-sm); font-weight: 700; }
.field input,.field select,.field textarea { min-height: 48px; width: 100%; padding: .75rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--neutral-50); color: var(--color-text); transition: border-color var(--duration-fast), background var(--duration-fast); }
.field input:hover,.field select:hover,.field textarea:hover { border-color: var(--neutral-500); }
.field input:focus,.field select:focus,.field textarea:focus { background: white; }
.field [aria-invalid=true] { border-color: var(--color-danger); } .field small { color: var(--color-text-muted); }
.alert { padding: 1rem 1.25rem; border-left: 3px solid var(--color-success); background: #eff6ef; color: var(--color-success); border-radius: var(--radius-sm); }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; background: white; padding: 1rem; } .skip-link:focus { top: 10px; }
[hidden] { display: none !important; }
@media(max-width: 760px) { .container { width: calc(100% - 40px); } .card { padding: var(--space-6); } }
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition: none !important; animation: none !important; } }

/* Secondary palette: structural petrol, warm sand, brand red for priority. */
.card-petrol { background: var(--petrol-900); color: white; border-color: transparent; }
.card-petrol .demo-help { color: #c5d8da; }
.card-mist { background: var(--petrol-50); color: var(--petrol-900); border-color: #173f4510; }
.card-sand { background: var(--sand-100); color: var(--color-text); border-color: #73604410; }
.btn-petrol { color: white; background: var(--petrol-900); border-color: var(--petrol-900); }
.btn-petrol:hover { background: #24545b; }
.badge-info { color: var(--petrol-900); background: var(--petrol-100); border-color: #173f4510; }

/* Direction 1.3: light coral and rose, inspired by the landing-page gradient. */
.btn-primary { color: var(--color-action-text); background: linear-gradient(180deg, #efb4ab, var(--color-action)); border-color: #d68c82; box-shadow: inset 0 1px 0 #ffffff55, 0 3px 8px #573b3a10; }
.btn-primary:hover { background: var(--color-action-hover); box-shadow: 0 5px 14px #573b3a18; }
.btn-primary:disabled { background: var(--neutral-100); color: var(--neutral-600); border-color: transparent; box-shadow: none; }
.btn-text { color: var(--coral-ink); }
.card-coral { background: var(--gradient-coral); color: var(--color-action-text); border-color: #d68c8233; }
.card-rose { background: var(--coral-100); color: var(--coral-ink); border-color: #d68c821a; }
.card-cream { background: var(--sand-50); color: var(--coral-ink); border-color: #d68c8220; }

/* Persistent identity: standard header for every application screen. */
:root { --brand-bar-height: 56px; }
html { scroll-padding-top: calc(var(--brand-bar-height) + 24px); }
.brand-bar { position: sticky; top: 0; z-index: 30; min-height: var(--brand-bar-height); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: #fffdfb; border-bottom: 1px solid #d68c8230; box-shadow: 0 2px 10px #573b3a04; }
.brand-bar-identity { display: flex; align-items: center; gap: 20px; min-width: 0; text-decoration: none; }
.brand-bar img { display: block; width: 160px; height: auto; flex-shrink: 0; }
.brand-bar-description { border-left: 1px solid #573b3a24; padding-left: 20px; font-size: 11px; color: var(--coral-ink); white-space: nowrap; }
.brand-bar-workspace { color: var(--coral-ink); font-size: 10px; letter-spacing: .02em; white-space: nowrap; }
.skip-link { z-index: 40; }
@media(max-width: 760px) { .brand-bar { padding-inline: 20px; } .brand-bar-description { display: none; } .brand-bar img { width: 145px; } .brand-bar-workspace { font-size: 9px; } }
