/* =====================================================================
   AnaghaHR Components — v2.0
   Depends on tokens.css. Page files (landing.css, auth.css, legal.css)
   may add layout, never redefine these components.
   ===================================================================== */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body);
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
a { color: var(--orange-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text-strong); }
::selection { background: var(--orange-500); color: var(--white); }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* Focus — always visible for keyboard users */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-xs); }
.on-dark :focus-visible, .on-dark:focus-visible { box-shadow: var(--focus-ring-on-dark); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: var(--s-4); top: -100px; z-index: var(--z-toast); background: var(--orange-600); color: var(--white); padding: 12px 18px; border-radius: var(--r-pill); font-weight: var(--fw-bold); text-decoration: none; }
.skip-link:focus { top: var(--s-3); color: var(--white); }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section-sm { padding-block: var(--section-y-sm); position: relative; }
.surface-white { background: var(--white); }
.surface-cream { background: var(--cream); }
.surface-navy { background: var(--navy-900); color: var(--text-on-dark-muted); }
.surface-deep { background: var(--navy-950); color: var(--text-on-dark-muted); }
.surface-navy h1, .surface-navy h2, .surface-navy h3, .surface-navy h4,
.surface-deep h1, .surface-deep h2, .surface-deep h3, .surface-deep h4 { color: var(--text-on-dark); }

/* ---------- Typography ---------- */
.t-display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); font-weight: var(--fw-black); color: var(--text-strong); text-wrap: balance; }
.t-h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: var(--tracking-display); font-weight: var(--fw-black); color: var(--text-strong); text-wrap: balance; }
.t-h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: var(--tracking-heading); font-weight: var(--fw-black); color: var(--text-strong); text-wrap: balance; }
.t-h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); letter-spacing: var(--tracking-title); font-weight: var(--fw-bold); color: var(--text-strong); }
.t-h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); letter-spacing: var(--tracking-title); font-weight: var(--fw-bold); color: var(--text-strong); }
.t-h5 { font-size: var(--fs-h5); line-height: var(--lh-snug); font-weight: var(--fw-bold); color: var(--text-strong); }
.t-lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); max-width: 60ch; text-wrap: pretty; }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-small { font-size: var(--fs-small); line-height: 1.55; }
.t-caption { font-size: var(--fs-caption); line-height: 1.5; color: var(--text-subtle); }
.t-muted { color: var(--text-muted); }
.t-accent { color: var(--orange-500); }            /* only on navy or at display sizes */
.t-accent-ink { color: var(--orange-700); }        /* orange text on light at any size */
.on-dark .t-display, .on-dark .t-h1, .on-dark .t-h2, .on-dark .t-h3, .on-dark .t-h4, .on-dark .t-h5 { color: var(--text-on-dark); }
.on-dark .t-lead, .on-dark .t-muted { color: var(--text-on-dark-muted); }
.on-dark .t-caption { color: var(--text-on-dark-subtle); }

/* Eyebrow / kicker: mono uppercase label with a live dot */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--orange-700); }
.on-dark .eyebrow { color: var(--orange-500); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-500); position: relative; flex: none; }
.eyebrow .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--orange-500); opacity: .5; }
.label-mono { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.on-dark .label-mono { color: var(--text-on-dark-subtle); }
.rule-accent { display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--orange-500); }

/* Section header pattern */
.section-head { max-width: 760px; display: grid; gap: var(--s-5); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-strong); min-height: 44px; }
.brand img { width: 24px; height: auto; }
.brand-word { font-size: 21px; font-weight: var(--fw-black); letter-spacing: -.03em; line-height: 1; }
.brand-word b { color: var(--orange-500); font-weight: var(--fw-black); }
.on-dark .brand, .brand.on-dark { color: var(--white); }
.on-dark .brand img, .brand.on-dark img { filter: invert(1); }
.brand:not(.on-dark) .brand-word b { color: var(--orange-500); }
.on-dark .brand .brand-word b { color: var(--orange-500); }

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--btn-h); padding: 0 24px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 15px; font-weight: var(--fw-bold); line-height: 1; letter-spacing: -.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; position: relative;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .i-arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-h: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { --btn-h: 56px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--orange-600); color: var(--white); box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--orange-hover); color: var(--white); }
.btn-secondary { background: var(--navy-900); color: var(--white); }
.btn-secondary:hover { background: var(--navy-700); color: var(--white); }
.btn-outline { background: var(--white); color: var(--text-strong); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--text-strong); color: var(--text-strong); }
.btn-ghost { background: transparent; color: var(--text-strong); }
.btn-ghost:hover { background: var(--navy-50); color: var(--text-strong); }
.on-dark .btn-outline, .btn-outline.on-dark { background: transparent; color: var(--white); border-color: var(--line-on-dark-strong); }
.on-dark .btn-outline:hover, .btn-outline.on-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: var(--white); }
.on-dark .btn-ghost { color: var(--white); }
.on-dark .btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--white); }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading svg { opacity: 0; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.35); border-top-color: var(--white); animation: spin .7s linear infinite; }
.btn-outline.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--line-strong); border-top-color: var(--text-strong); }
.on-dark .btn-outline.is-loading::after, .on-dark .btn-ghost.is-loading::after, .btn-outline.on-dark.is-loading::after { border-color: var(--line-on-dark-strong); border-top-color: var(--white); }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--fw-semibold); color: var(--orange-700); text-decoration: none; min-height: 44px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover { color: var(--text-strong); }
.link-arrow:hover svg { transform: translateX(3px); }
.on-dark .link-arrow { color: var(--orange-500); }
.on-dark .link-arrow:hover { color: var(--white); }

/* Icon button */
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); color: var(--text-strong); cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.icon-btn:hover { border-color: var(--line-strong); background: var(--navy-50); }
.icon-btn svg { width: 20px; height: 20px; }
.on-dark .icon-btn { background: transparent; color: var(--white); border-color: var(--line-on-dark); }
.on-dark .icon-btn:hover { background: rgba(255,255,255,.08); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: var(--s-5); }
.label { font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--text-strong); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.label .optional { font-weight: var(--fw-regular); color: var(--text-subtle); font-size: var(--fs-caption); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--white); color: var(--text-strong);
  font-size: 16px; line-height: 1.4; /* 16px prevents iOS zoom */
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-hover); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--orange-600); box-shadow: 0 0 0 4px var(--focus-tint); }
.textarea { min-height: 112px; resize: vertical; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235A6180' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--navy-50); color: var(--text-muted); cursor: not-allowed; }
.input[readonly] { background: var(--navy-50); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea, .input[aria-invalid="true"] { border-color: var(--danger-700); }
.field.is-invalid .input:focus, .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--danger-tint); }
.hint { font-size: var(--fs-caption); color: var(--text-muted); }
.error-text { display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--danger-700); }
.error-text svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-group .input-action { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--text-muted); border-radius: var(--r-sm); cursor: pointer; }
.input-group .input-action:hover { color: var(--text-strong); background: var(--navy-50); }
.input-group .input-action svg { width: 20px; height: 20px; }

.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-top: 10px; cursor: pointer; font-size: var(--fs-small); color: var(--text); }
.check input { appearance: none; width: 20px; height: 20px; flex: none; margin: 1px 0 0; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--white); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--orange-600); border-color: var(--orange-600); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check.is-disabled, .check:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.check input:disabled { cursor: not-allowed; }

/* Fields placed side by side in a grid don't need the stacking margin */
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-5); }
.field-row > .field + .field { margin-top: 0; }

/* OTP */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 400px; }
.otp input { width: 100%; min-width: 0; height: 60px; text-align: center; font-size: 24px; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--white); color: var(--text-strong); padding: 0; }
.otp input:focus { outline: none; border-color: var(--orange-600); box-shadow: 0 0 0 4px var(--focus-tint); }
.otp.is-invalid input { border-color: var(--danger-700); }
@media (max-width: 400px) { .otp { gap: 6px; } .otp input { height: 54px; font-size: 21px; } }

/* ---------- Small helpers (promoted from auth.css) ---------- */
.btn-wrap { white-space: normal; text-align: center; line-height: 1.3; padding-block: var(--s-2); }
.btn-text { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s-1); border: 0; background: none; cursor: pointer; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--orange-700); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color var(--dur-fast), text-decoration-color var(--dur-fast); }
.btn-text:hover { color: var(--text-strong); text-decoration-color: currentColor; }
.btn-text svg { width: 16px; height: 16px; }
.divider { display: flex; align-items: center; gap: var(--s-4); font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--navy-100); border-top-color: var(--orange-600); animation: spin .8s linear infinite; flex: none; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; right: var(--s-6); bottom: var(--s-6); z-index: var(--z-toast); display: grid; gap: var(--s-3); width: min(400px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--navy-900); color: var(--text-on-dark-muted); box-shadow: var(--shadow-lg); font-size: var(--fs-small); line-height: 1.5; animation: modal-in var(--dur-slow) var(--ease-out); }
.toast > svg { width: 20px; height: 20px; color: var(--orange-500); margin-top: 1px; }
.toast b { color: var(--white); display: block; }
.toast.is-success > svg { color: var(--white); background: var(--success-700); border-radius: 50%; padding: 3px; }
.toast .icon-btn { width: 32px; height: 32px; margin: -4px -4px 0 0; background: transparent; color: var(--text-on-dark-muted); border-color: transparent; }
@media (max-width: 560px) { .toast-region { right: 16px; left: 16px; bottom: 16px; width: auto; } }

/* ---------- Alerts / inline notices ---------- */
.alert { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); font-size: var(--fs-small); line-height: 1.5; border: 1px solid transparent; }
.alert svg { width: 20px; height: 20px; }
.alert b { color: inherit; font-weight: var(--fw-bold); }
.alert-info { background: var(--info-50); color: var(--info-900); border-color: rgba(29,78,216,.18); }
.alert-success { background: var(--success-50); color: var(--success-900); border-color: rgba(19,122,75,.2); }
.alert-warning { background: var(--warning-50); color: var(--warning-900); border-color: rgba(138,83,0,.2); }
.alert-danger { background: var(--danger-50); color: var(--danger-900); border-color: rgba(180,35,24,.2); }
.alert-neutral { background: var(--cream); color: var(--text); border-color: var(--cream-200); }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: var(--fw-bold); line-height: 1; white-space: nowrap; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--navy-100); color: var(--navy-900); }
.badge-orange { background: var(--orange-50); color: var(--orange-700); }
.badge-success { background: var(--success-50); color: var(--success-700); }
.badge-warning { background: var(--warning-50); color: var(--warning-700); }
.badge-danger { background: var(--danger-50); color: var(--danger-700); }
.badge-info { background: var(--info-50); color: var(--info-700); }
.badge-outline-dark { background: rgba(255,255,255,.06); color: var(--text-on-dark-muted); border: 1px solid var(--line-on-dark); }

.pill-status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: var(--fs-small); color: var(--text); }
.pill-status b { color: var(--text-strong); font-weight: var(--fw-semibold); }
.on-dark .pill-status { border-color: var(--line-on-dark); background: rgba(255,255,255,.04); color: var(--text-on-dark-muted); }
.on-dark .pill-status b { color: var(--white); }

/* ---------- Cards ---------- */
.card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
.card-hover { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-cream { background: var(--cream); border-color: var(--cream-200); }
.card-navy { background: var(--navy-800); border-color: var(--line-on-dark); color: var(--text-on-dark-muted); }
.card-navy h3, .card-navy h4 { color: var(--white); }
.icon-tile { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--orange-50); color: var(--orange-700); flex: none; }
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.navy { background: var(--navy-900); color: var(--white); }
.on-dark .icon-tile { background: rgba(241,90,41,.12); color: var(--orange-500); }

/* ---------- Header (light, sticky) ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--white); border-bottom: 1px solid transparent; transition: border-color var(--dur-base), background-color var(--dur-base), box-shadow var(--dur-base); }
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); min-height: var(--header-h); }
.nav-primary { display: flex; align-items: center; gap: 2px; }
.nav-primary a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: var(--fw-medium); color: var(--text-muted); text-decoration: none; border-radius: var(--r-pill); transition: color var(--dur-fast), background-color var(--dur-fast); }
.nav-primary a:hover { color: var(--text-strong); background: var(--surface-subtle); }
.nav-primary a[aria-current="true"] { color: var(--text-strong); }
.nav-actions { display: flex; align-items: center; gap: var(--s-2); }
.nav-actions .signin { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; color: var(--text-strong); font-size: 15px; font-weight: var(--fw-semibold); text-decoration: none; border-radius: var(--r-pill); }
.nav-actions .signin:hover { background: var(--surface-subtle); color: var(--text-strong); }
.nav-toggle { display: none; }
.mobile-nav { display: none; }
@media (max-width: 1023px) {
  .nav-primary, .nav-actions .signin, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-grid; }
  .mobile-nav { display: block; position: fixed; inset: var(--header-h) 0 0; background: var(--white); border-top: 1px solid var(--line); padding: var(--s-4) var(--gutter) var(--s-8); overflow-y: auto; z-index: var(--z-header); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a.m-link { display: flex; align-items: center; justify-content: space-between; min-height: 60px; color: var(--text-strong); font-size: 22px; font-weight: var(--fw-bold); letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid var(--line); }
  .mobile-nav a.m-link span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--text-subtle); }
  .mobile-nav .m-actions { display: grid; gap: var(--s-3); margin-top: var(--s-8); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Footer (deep navy, as anaghatechnosoft.com) ---------- */
.site-footer { background: var(--navy-950); color: var(--text-on-dark-subtle); padding: var(--s-20) 0 var(--s-8); font-size: var(--fs-small); }
.site-footer .f-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) 1.3fr; gap: var(--s-10); }
.site-footer h2 { font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--orange-500); margin-bottom: var(--s-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.site-footer a { color: var(--text-on-dark-muted); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a:hover { color: var(--white); }
.site-footer .f-about { max-width: 34ch; margin-top: var(--s-4); line-height: 1.6; }
.site-footer .f-office b { color: var(--white); font-weight: var(--fw-semibold); }
.site-footer .f-office + .f-office { margin-top: var(--s-3); }
.site-footer .brand { color: var(--white); }
.site-footer .brand img { filter: invert(1); }
.site-footer .brand .brand-word b { color: var(--orange-500); }
.site-footer .f-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-16); padding-top: var(--s-6); border-top: 1px solid var(--line-on-dark); font-size: var(--fs-caption); }
.site-footer .f-bottom nav { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.site-footer :focus-visible { box-shadow: var(--focus-ring-on-dark); }
@media (max-width: 1023px) { .site-footer .f-grid { grid-template-columns: 1fr 1fr; } .site-footer .f-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-footer .f-grid { grid-template-columns: 1fr; gap: var(--s-8); } }

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding: var(--s-4) 0; cursor: pointer; font-size: var(--fs-h5); font-weight: var(--fw-semibold); color: var(--text-strong); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .acc-icon { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform var(--dur-base) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast); }
.accordion summary .acc-icon svg { width: 16px; height: 16px; }
.accordion summary:hover .acc-icon { border-color: var(--line-strong); background: var(--navy-50); }
.accordion details[open] summary .acc-icon { transform: rotate(45deg); background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }
.accordion .acc-body { padding: 0 var(--s-12) var(--s-6) 0; color: var(--text-muted); max-width: var(--measure); }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--navy-50); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-muted); font-size: 14px; font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; transition: background-color var(--dur-base) var(--ease-out), color var(--dur-fast); }
.tab:hover { color: var(--text-strong); }
.tab[aria-selected="true"] { background: var(--white); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.tab svg { width: 16px; height: 16px; }
.on-dark .tabs { background: rgba(255,255,255,.05); border-color: var(--line-on-dark); }
.on-dark .tab { color: var(--text-on-dark-subtle); }
.on-dark .tab:hover { color: var(--white); }
.on-dark .tab[aria-selected="true"] { background: var(--white); color: var(--navy-900); }
.tab-panel[hidden] { display: none; }

/* ---------- Modal (dialog) ---------- */
dialog.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--white); color: var(--text); box-shadow: var(--shadow-lg); overflow: auto; }
dialog.modal::backdrop { background: rgba(5,10,28,.62); backdrop-filter: blur(4px); }
dialog.modal[open] { animation: modal-in var(--dur-slow) var(--ease-out); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); padding: var(--s-8) var(--s-8) 0; }
.modal-body { padding: var(--s-6) var(--s-8) var(--s-8); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .modal-head { padding: var(--s-6) var(--s-5) 0; } .modal-body { padding: var(--s-5); } }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.table th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); background: var(--navy-50); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Product-UI frame (mockups) ---------- */
.frame { position: relative; border-radius: var(--r-lg); background: var(--white); overflow: hidden; box-shadow: var(--shadow-product); }
.frame-bar { display: flex; align-items: center; gap: var(--s-3); height: 40px; padding: 0 14px; background: var(--frame-chrome); border-bottom: 1px solid var(--line); }
.frame-bar .dots { display: flex; gap: 6px; }
.frame-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--frame-dot); }
.frame-bar .dots i:first-child { background: var(--orange-500); }
.frame-bar .url { flex: 1; max-width: 360px; margin-inline: auto; height: 26px; border-radius: 7px; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.frame-caption { margin-top: var(--s-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-subtle); text-align: center; }
.on-dark .frame-caption { color: var(--text-on-dark-subtle); }

/* ---------- Motion: reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
}
