/* Shared foundations. Page styles describe layout; this file owns the theme. */
:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --page: #fafbfe;
  --surface: #fff;
  --surface-soft: #f2f5fa;
  --ink: #222b3b;
  --muted: #667286;
  --line: #e6eaf1;
  --control-line: #8795aa;
  --blue: #326dde;
  --blue-hover: #255dc5;
  --blue-soft: #edf3ff;
  --success: #24704e;
  --success-soft: #edf8f2;
  --warning: #865a18;
  --warning-soft: #fff7e8;
  --error: #ad3b3b;
  --error-soft: #fff1f1;
  --radius-control: 10px;
  --radius-card: 16px;
  --shadow-card: 0 5px 24px #243b6106;
  --shadow-control: 0 2px 4px #243b6108, inset 0 1px 0 #ffffff20;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:is(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.035em; font-weight: 600; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 25px; }
h3 { font-size: 19px; }
p { color: var(--muted); }
form { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 30; background: var(--surface); padding: 12px 20px; border: 2px solid var(--blue); border-radius: var(--radius-control); }
.skip-link:focus { top: 12px; }
.ui-icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.button, .hp-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 1px solid var(--blue); border-radius: var(--radius-control); background: var(--blue); color: #fff; font-size: 14px; font-weight: 550; line-height: 1.5; text-align: center; text-decoration: none; box-shadow: var(--shadow-control); transition: background .16s, border-color .16s; }
.button:hover, .hp-button:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.button.secondary, .hp-button-secondary { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
.button.secondary:hover, .hp-button-secondary:hover { background: var(--surface-soft); border-color: #8e9fb9; color: var(--ink); }
.button.danger { background: var(--error); border-color: var(--error); }
.button.compact { min-height: 44px; padding: 10px 15px; font-size: 13px; }
.button.full { width: 100%; }
.button .ui-icon, .hp-button .ui-icon { width: 17px; height: 17px; }
.text-button, .back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; border: 0; padding: 8px 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--muted); }
.icon-button:hover { background: var(--blue-soft); color: var(--blue); }
label { display: block; margin-bottom: 20px; font-size: 14px; font-weight: 500; color: var(--ink); }
input:not([type=radio], [type=checkbox], [type=hidden]), textarea, select { display: block; width: 100%; min-width: 0; min-height: 48px; margin-top: 8px; padding: 11px 13px; border: 1px solid var(--control-line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[readonly] { background: var(--surface-soft); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--blue); margin: 0 8px 0 0; flex-shrink: 0; }
label:has(>input[type=checkbox]) { font-size: 13px; font-weight: 400; line-height: 1.8; min-height: 44px; padding-block: 8px; }
textarea { resize: vertical; }
[aria-invalid=true] { border-color: var(--error) !important; }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 5px; }
.profile-form { margin-top: 24px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.notice { border: 1px solid #d7e3f8; border-radius: var(--radius-control); background: var(--blue-soft); color: #405d8a; padding: 14px 16px; font-size: 13px; line-height: 1.7; margin-bottom: 24px; overflow-wrap: anywhere; }
.notice.subtle { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
.notice.error { background: var(--error-soft); color: var(--error); border-color: #edc2c2; }
.notice.success { background: var(--success-soft); color: var(--success); border-color: #cee7d8; }
.field-error { color: var(--error); font-size: 13px; }
.field-error:empty { display: none; }
.badge { display: inline-block; width: fit-content; padding: 4px 9px; border-radius: 6px; background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: .02em; }
.badge.succeeded { background: var(--success-soft); color: var(--success); }
.badge.failed { background: var(--error-soft); color: var(--error); }
.badge.pending { background: var(--warning-soft); color: var(--warning); }
.badge.cancelled, .badge.expired { background: var(--surface-soft); color: var(--muted); }
.panel { min-width: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.panel-heading h2 { margin-bottom: 0; }
.panel-heading+.muted { margin-top: 10px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; background: var(--blue-soft); color: #5371a4; font-size: 19px; font-weight: 600; }
.avatar.large { width: 80px; height: 80px; font-size: 27px; margin: 0 auto 20px; border: 5px solid #f6f8fd; }
.micro, .muted { color: var(--muted); font-size: 13px; line-height: 1.75; }
.micro { margin-top: 14px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .14em; margin-bottom: 18px; }
.centered { text-align: center; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 26px; font-weight: 730; letter-spacing: -1.3px; white-space: nowrap; text-decoration: none; line-height: 1; }
.site-brand:hover { color: var(--ink); }
.site-brand-suffix { color: var(--muted); font-weight: 400; }
.site-brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #fff; background: var(--blue); box-shadow: var(--shadow-control); }
.site-brand-mark .ui-icon { width: 25px; height: 25px; }
.site-header, .site-footer { width: min(1160px, calc(100% - 80px)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header { min-height: 94px; }
.site-header nav, .site-footer nav, .focused-footer nav, .workspace-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.site-header nav>a:not(.button), .site-footer nav>a { color: var(--muted); text-decoration: none; font-size: 13px; padding-block: 12px; }
.site-header nav>a:hover, .site-footer nav>a:hover { color: var(--blue); }
.site-footer { border-top: 1px solid var(--line); padding-block: 30px 38px; }
.site-footer .site-brand { font-size: 22px; }
.site-footer .site-brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.site-footer .site-brand-mark .ui-icon { width: 21px; height: 21px; }
.site-footer p { font-size: 12px; margin: 12px 0 0; }
.site-footer nav { justify-content: flex-end; font-size: 12px; color: var(--muted); }
.mode-note { background: var(--surface-soft); border-block: 1px solid var(--line); text-align: center; padding: 8px 20px; color: var(--muted); font-size: 11px; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-shell>main { flex: 1; min-width: 0; }
.focused-header { width: min(960px, calc(100% - 64px)); margin: 0 auto; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.focused-header .site-brand { font-size: 24px; }
.focused-help { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); text-decoration: none; }
.focused-help .ui-icon { width: 18px; height: 18px; }
.focused-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 24px 30px; font-size: 12px; color: var(--muted); text-align: center; }
.focused-footer nav { justify-content: center; gap: 20px; }
.focused-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
@media (max-width: 760px) {
  .site-header, .site-footer { width: calc(100% - 40px); }
  .site-header { min-height: 80px; gap: 16px; }
  .site-header nav { gap: 14px; }
  .site-nav-section { display: none; }
  .site-brand { font-size: 23px; gap: 8px; }
  .site-brand-mark { width: 31px; height: 31px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 18px; }
  .site-footer nav { justify-content: flex-start; gap: 8px 20px; }
  .focused-header { width: calc(100% - 40px); min-height: 80px; }
}
@media (max-width: 480px) {
  .site-header .site-login { display: none; }
  .site-header .button { font-size: 12px; padding-inline: 12px; }
  .site-header .button .ui-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
