/* TSRIZ — Midnight Executive design system
   Tokens first; components consume tokens only. Dark is the default theme. */

:root {
  /* Brand palette (from brief) */
  --navy-900: #0B1426;
  --navy-700: #142D4E;
  --teal-500: #00BFA6;
  --white-50: #F8FAFC;
  --gray-500: #64748B;

  /* Type */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-0: clamp(0.9375rem, 0.92rem + 0.1vw, 1rem);
  --fs-1: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-2: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --fs-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);
  --fs-hero: clamp(3.25rem, 2rem + 7vw, 7rem);

  /* Spacing (4px base) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;

  --radius: 14px; --radius-sm: 8px; --radius-pill: 999px;
  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;
}

/* Dark (default) */
:root, [data-theme="dark"] {
  --bg: #0B1426;
  --bg-alt: #0E1A33;
  --surface: #11203D;
  --surface-hover: #142D4E;
  --text: #F8FAFC;
  --text-muted: #AAB8CC;
  --border: rgba(248, 250, 252, .14);
  --accent: #00BFA6;
  --accent-text: #19D3BA;
  --on-accent: #0B1426;
  --warn-bg: rgba(250, 204, 21, .14);
  --warn-text: #FDE68A;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --header-bg: rgba(11, 20, 38, .82);
  --grid-line: rgba(248, 250, 252, .045);
  --portrait-from: #142D4E;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-alt: #EEF2F7;
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  --text: #0B1426;
  --text-muted: #475569;
  --border: rgba(11, 20, 38, .14);
  --accent: #00BFA6;
  --accent-text: #00776A;
  --on-accent: #0B1426;
  --warn-bg: #FEF3C7;
  --warn-text: #78350F;
  --shadow: 0 18px 40px rgba(11, 20, 38, .10);
  --header-bg: rgba(248, 250, 252, .86);
  --grid-line: rgba(11, 20, 38, .05);
  --portrait-from: #FFFFFF;
  color-scheme: light;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--fs-1); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 var(--s-4); font-weight: 750; }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-2); letter-spacing: -.01em; }
p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0; padding: 0; list-style: none; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 2rem; height: 2rem; }
.icon.accent { color: var(--accent-text); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .75rem 1rem; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

.preview-banner { background: var(--warn-bg); color: var(--warn-text); text-align: center; font-size: .875rem; padding: .5rem 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: .08em; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 900; letter-spacing: 0; }
.primary-nav ul { display: flex; gap: var(--s-1); }
.primary-nav a { display: block; padding: .5rem .8rem; border-radius: var(--radius-pill); color: var(--text-muted); text-decoration: none; font-size: .9375rem; font-weight: 550; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); }
.primary-nav a:hover { color: var(--text); background: var(--surface); }
.primary-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.header-tools { display: flex; align-items: center; gap: var(--s-2); }
.tool-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; min-width: 2.75rem; justify-content: center; padding: 0 .75rem; background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-pill); font: inherit; font-size: .875rem; font-weight: 650; text-decoration: none; cursor: pointer; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tool-btn:hover { background: var(--surface); border-color: var(--accent); }
.nav-toggle { display: none; }
[data-theme="dark"] .only-light, :root:not([data-theme="light"]) .only-light { display: none; }
[data-theme="light"] .only-dark { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { position: absolute; inset: 100% 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--s-3) 1.25rem var(--s-5); display: none; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: .85rem .5rem; font-size: 1.0625rem; border-radius: var(--radius-sm); }
  .primary-nav a[aria-current="page"] { box-shadow: none; color: var(--accent-text); }
  html:not(.js) .primary-nav { display: block; position: static; box-shadow: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .7rem 1.4rem; border-radius: var(--radius-pill); font-weight: 700; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); background: #14d6bd; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface); }
.btn-lg { min-height: 3.5rem; padding-inline: 2rem; font-size: 1.0625rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; white-space: nowrap; }

/* Hero */
.hero { position: relative; padding-block: var(--s-8) var(--s-9); overflow: hidden; background:
  linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
  linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--s-8); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8125rem; font-weight: 700; color: var(--accent-text); margin-bottom: var(--s-4); }
.hero h1 { font-size: var(--fs-hero); letter-spacing: -.045em; line-height: .95; margin-bottom: var(--s-5); }
.hero h1 .dot { color: var(--accent); }
.hero-tagline { font-size: var(--fs-2); line-height: 1.3; font-weight: 600; max-width: 24ch; margin-bottom: var(--s-5); }
.hero-name { color: var(--text-muted); font-size: var(--fs-0); margin-bottom: var(--s-6); max-width: 46ch; }
.hero-name strong { color: var(--text); font-size: var(--fs-1); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pills li { padding: .3rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }

.portrait { margin: 0; justify-self: end; width: min(100%, 360px); }
.portrait-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 180px 180px var(--radius) var(--radius); background: linear-gradient(160deg, var(--portrait-from), var(--bg-alt)); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.portrait-frame::after { content: ""; position: absolute; inset: 14px; border: 1.5px solid var(--accent); border-radius: 166px 166px 8px 8px; opacity: .55; pointer-events: none; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: var(--s-3); text-align: center; padding: var(--s-5); }
.monogram { font-size: 5.5rem; font-weight: 800; letter-spacing: -.05em; color: var(--accent-text); line-height: 1; }
.ph-note { font-size: .8125rem; color: var(--text-muted); }

/* Sections */
.section { padding-block: var(--s-9); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); flex-wrap: wrap; }
.section-head h2 { margin-bottom: var(--s-2); }
.lead { color: var(--text-muted); font-size: var(--fs-1); max-width: 62ch; margin: 0; }
.summary { max-width: 70ch; margin-bottom: var(--s-6); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--s-7); font-size: var(--fs-2); }
.prose h2:first-child { margin-top: 0; }

.grid { display: grid; gap: var(--s-5); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* Cards */
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); color: var(--text); text-decoration: none; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.card h3 { margin-top: var(--s-4); }
.card p { color: var(--text-muted); font-size: var(--fs-0); margin-bottom: 0; }
.card .meta, .meta { font-size: .8125rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 650; color: var(--accent-text); margin-bottom: var(--s-2); }
.card-link:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-hover); }
.card-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--s-4); font-weight: 650; font-size: .9375rem; color: var(--accent-text); }
.stat { margin-top: var(--s-6); color: var(--text-muted); }
.stat-num { font-size: var(--fs-4); font-weight: 800; color: var(--text); letter-spacing: -.03em; }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }

/* Timeline */
.timeline { position: relative; max-width: 780px; margin-left: .5rem; padding-left: var(--s-6); border-left: 2px solid var(--border); }
.tl-item { position: relative; padding-bottom: var(--s-7); }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: calc(-1 * var(--s-6) - 8px); top: .55rem; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--accent); }
.tl-item.is-current .tl-dot { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-period { font-size: .875rem; font-weight: 650; color: var(--accent-text); margin-bottom: var(--s-1); }
.tl-body h3 { margin-bottom: var(--s-1); }
.tl-org { color: var(--text-muted); margin: 0; }
.tl-toggle { display: inline-flex; align-items: center; gap: .35rem; margin-top: var(--s-3); min-height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--border); border-radius: var(--radius-pill); background: transparent; color: var(--text); font: inherit; font-size: .875rem; font-weight: 650; cursor: pointer; }
.tl-toggle:hover { border-color: var(--accent); }
.tl-toggle .icon { transition: transform var(--dur) var(--ease); }
.tl-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.tl-panel { margin-top: var(--s-3); color: var(--text-muted); max-width: 60ch; }

/* Empty state */
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--s-2); padding: var(--s-7) var(--s-5); border: 1.5px dashed var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.empty-icon { color: var(--text-muted); }
.empty-title { font-weight: 700; margin: 0; }
.empty-text { color: var(--text-muted); max-width: 52ch; margin: 0; font-size: var(--fs-0); }

/* Skeleton */
.skeleton { position: relative; }
html.js .skeleton[data-skeleton]:not(.is-loaded)::before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--text) 8%, transparent) 50%, transparent 80%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; pointer-events: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* CTA */
.cta { background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); color: var(--white-50); text-align: center; }
.cta .lead { color: #C3CFE0; margin-inline: auto; margin-bottom: var(--s-6); }
.cta h2 { font-size: var(--fs-4); }
.cta .btn-primary { color: var(--navy-900); }

/* Inner pages */
.page-head { padding-block: var(--s-8) var(--s-7); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.page-head h1 { font-size: var(--fs-4); margin-bottom: var(--s-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--s-4); font-size: .875rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; opacity: .6; }
.breadcrumb [aria-current] { color: var(--text); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s-8); }
.side-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.side-list ul { border-left: 2px solid var(--border); }
.side-list a { display: block; padding: .45rem 0 .45rem var(--s-4); color: var(--text-muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.side-list a:hover, .side-list a[aria-current] { color: var(--text); border-left-color: var(--accent); }
.error-page { text-align: center; min-height: 60vh; display: grid; align-content: center; }
.error-page .lead { margin: 0 auto var(--s-6); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--s-7) var(--s-5); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-7); margin-bottom: var(--s-6); }
.footer-tag { color: var(--text-muted); margin: var(--s-3) 0 0; font-size: var(--fs-0); }
.footer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-2) var(--s-5); }
.footer-links a { color: var(--text-muted); text-decoration: none; display: inline-block; padding: .35rem 0; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); color: var(--text-muted); padding-top: var(--s-5); border-top: 1px solid var(--border); }

/* Scroll reveal (progressive enhancement) */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { padding-block: var(--s-7) var(--s-8); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .portrait { justify-self: start; width: min(100%, 280px); order: -1; }
  .section { padding-block: var(--s-8); }
  .detail-grid, .footer-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .btn, .tool-btn, .card { border: 1px solid CanvasText; }
}

/* ---------- Phase 3+: content listings, details, forms ---------- */
.narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }
.muted { color: var(--text-muted); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Cards with media and whole-card links */
.card-media { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-media > .meta, .card-media > h3, .card-media > p { padding-inline: var(--s-5); }
.card-media > .meta { margin-top: var(--s-4); }
.card-media > p:last-child { padding-bottom: var(--s-5); }
.card-media h3 { margin-top: 0; }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.card:has(.stretch):hover { border-color: var(--accent); background: var(--surface-hover); }
.card:has(.stretch:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.card .actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-4); position: relative; z-index: 1; }
.card .badge-ok { margin-top: var(--s-3); }
.badge-ok { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }

/* Detail pages */
.cover { margin: 0 0 var(--s-6); }
.cover img { width: 100%; max-height: 26rem; object-fit: cover; border-radius: var(--radius); display: block; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-8); align-items: start; }
.side-list { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); background: var(--surface); }
.side-title { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--s-3); font-weight: 700; }
.portrait-sm { width: 100%; height: auto; border-radius: var(--radius-sm); margin-bottom: var(--s-4); }
.rich > :first-child { margin-top: 0; }
.rich img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.rich blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: var(--s-4); color: var(--text-muted); }
.rich a, .prose a, .item-list a, .link-arrow { color: var(--accent-text); }
.rich pre, .rich code { background: var(--surface); border-radius: 6px; padding: .1em .35em; overflow-x: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.gallery figcaption { font-size: .875rem; color: var(--text-muted); margin-top: var(--s-2); }
.embed { position: relative; aspect-ratio: 16 / 9; margin-bottom: var(--s-5); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 var(--s-4); }
.facts dt { font-size: .8125rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-top: var(--s-3); }
.facts dd { margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.share { margin: var(--s-6) 0; }
.author { margin-top: var(--s-6); }
.author p { color: var(--text); }

/* Lists, chips, filters, pager */
.item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.item-list li { border-left: 2px solid var(--border); padding-left: var(--s-4); }
.item-list p { margin: var(--s-1) 0 0; color: var(--text-muted); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); }
.two-col.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips { list-style: none; padding: 0; margin: var(--s-3) 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li, .chip { display: inline-block; padding: .2rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: .875rem; color: var(--text); background: var(--surface); }
.chips li a, .chip-btn { color: inherit; text-decoration: none; }
.chips li:has(a:hover), .chips li:has(.chip-btn:hover) { border-color: var(--accent); }
.chip-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.filter-chips a[aria-current="true"] { font-weight: 700; color: var(--accent-text); }
.filter-chips li:has(a[aria-current="true"]) { border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: end; margin-bottom: var(--s-6); }
.filters .field { margin: 0; }
.filters .grow { flex: 1 1 260px; }
.pager { display: flex; gap: var(--s-4); align-items: center; justify-content: center; margin-top: var(--s-7); }
.pager-info { color: var(--text-muted); }

/* Forms */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 650; }
.field input[type="text"], .field input[type="email"], .field input[type="search"], .field input:not([type]), .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .65rem .9rem; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--text-muted) 70%, transparent); border-radius: var(--radius-sm); }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.check label { display: flex; gap: var(--s-3); align-items: flex-start; font-weight: 500; }
.field.check input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.field [aria-invalid="true"] { border-color: #F87171; }
.field-error { color: #FCA5A5; margin: 0; font-size: .9375rem; }
[data-theme="light"] .field-error { color: #B42318; }
[data-theme="light"] .field [aria-invalid="true"] { border-color: #B42318; }
.alert { padding: var(--s-4) var(--s-5); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: var(--s-5); }
.alert-success { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); }
.alert-error { background: rgba(248, 113, 113, .14); border-color: #F87171; }
[data-theme="light"] .alert-error { background: #FDE4E1; border-color: #B42318; color: #7A1A12; }

@media (max-width: 900px) {
  .two-col, .two-col.three, .detail-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* Achievement images (career, education, certifications, affiliations) */
.ach-img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: var(--radius, 12px); border: 1px solid var(--border); margin: 0 0 var(--s-3); }
.item-list .ach-img { max-width: 300px; }
