:root {
  --ink: #0a0a0a;
  --charcoal: #1c1c1e;
  --slate: #3a3a3c;
  --steel: #5a5a5c;
  --muted: #88888a;
  --canvas: #ffffff;
  --surface: #f7f7f7;
  --surface-soft: #fafafa;
  --line: #e5e5e5;
  --line-soft: #ededed;
  --mint: #00d4a4;
  --mint-deep: #00b48a;
  --mint-soft: #7cebcb;
  --sky: #87a8c8;
  --cream: #f5e9d8;
  --orange: #f55a3c;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-soft: 0 20px 50px rgba(10, 10, 10, .08);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(16px); }
.nav { width: min(1180px, calc(100% - 40px)); margin: auto; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink); background: var(--mint); border-radius: 10px 10px 10px 3px; font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--steel); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.button { border: 0; min-height: 40px; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-full); font-size: 14px; font-weight: 600; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--ink); }
.button-primary:hover { background: var(--charcoal); box-shadow: 0 8px 20px rgba(10,10,10,.14); }
.button-accent { color: var(--ink); background: var(--mint); }
.button-accent:hover { background: var(--mint-deep); }
.button-secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button-ghost { color: var(--steel); background: transparent; padding-inline: 10px; }

.hero { position: relative; overflow: hidden; background: linear-gradient(118deg, var(--sky) 0%, #b9c9d2 43%, var(--cream) 100%); }
.hero::after { content: ""; position: absolute; inset: auto -8% -40% 35%; height: 70%; background: rgba(255,255,255,.28); border-radius: 50% 50% 0 0; transform: rotate(-7deg); }
.hero-inner { width: min(1180px, calc(100% - 40px)); margin: auto; min-height: 560px; padding: 110px 0 90px; position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 60px; }
.eyebrow { margin: 0 0 18px; color: var(--slate); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 650px; margin: 0; font-size: clamp(44px, 7vw, 72px); line-height: 1.04; letter-spacing: -.055em; font-weight: 650; }
.hero-copy { max-width: 560px; margin: 24px 0 30px; color: var(--slate); font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; color: var(--steel); font-size: 12px; }
.hero-panel { align-self: end; background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.8); border-radius: 24px; padding: 26px; box-shadow: var(--shadow-soft); backdrop-filter: blur(10px); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
.panel-label { color: var(--steel); font-family: var(--font-mono); font-size: 12px; }
.status-dot { width: 9px; height: 9px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--mint-deep); }
.job-preview { display: grid; gap: 14px; }
.job-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0; border-top: 1px solid rgba(10,10,10,.1); }
.job-row strong { display: block; font-size: 14px; }
.job-row span { color: var(--steel); font-size: 12px; }

.section { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 88px 0; }
.section-muted { width: 100%; background: var(--surface); }
.section-muted > .section { padding-block: 72px; }
.section-heading { max-width: 680px; margin-bottom: 36px; }
.section-heading h2 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--steel); font-size: 17px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--steel); }
.card-link { display: block; transition: transform .18s ease, box-shadow .18s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.icon-box { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 22px; color: var(--ink); background: var(--mint-soft); border-radius: 12px; font-weight: 800; }
.check-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 10px; color: var(--slate); }
.check-list li::before { content: "✓"; color: var(--mint-deep); font-weight: 800; }

.page-hero { background: linear-gradient(112deg, #f3f5f5, #fff 65%); border-bottom: 1px solid var(--line-soft); }
.page-hero-inner { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 72px 0 60px; }
.page-hero h1 { margin: 0 0 14px; font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -.05em; }
.page-hero p { max-width: 650px; margin: 0; color: var(--steel); font-size: 17px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 10px 13px; color: var(--ink); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-md); outline: none; }
.input:focus, .select:focus, .textarea:focus { border: 2px solid var(--mint-deep); }
.search { flex: 1 1 300px; }
.filter { flex: 0 1 200px; }
.job-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.job-card + .job-card { margin-top: 12px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--steel); font-size: 13px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; color: var(--steel); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 12px; }
.tag-mint { color: var(--ink); background: rgba(0,212,164,.18); border-color: transparent; }

.form-layout { display: grid; grid-template-columns: 1fr .65fr; gap: 48px; align-items: start; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { color: var(--slate); font-size: 13px; font-weight: 600; }
.textarea { min-height: 128px; resize: vertical; }
.field-note { color: var(--muted); font-size: 12px; }
.notice { padding: 16px; color: var(--slate); background: var(--surface); border-left: 3px solid var(--mint-deep); border-radius: var(--radius-sm); font-size: 13px; }

.dashboard-shell { width: min(1320px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 44px 0 80px; }
.sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-title { margin: 0 0 16px; font-family: var(--font-mono); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a { padding: 9px 12px; color: var(--steel); border-radius: var(--radius-sm); font-size: 14px; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--ink); background: var(--surface); font-weight: 600; }
.dashboard-top { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.dashboard-top h1 { margin: 0 0 5px; font-size: 36px; letter-spacing: -.04em; }
.dashboard-top p { margin: 0; color: var(--steel); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.metric { padding: 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.metric-label { color: var(--steel); font-size: 12px; }
.metric strong { display: block; margin-top: 7px; font-size: 28px; letter-spacing: -.04em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 15px 17px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.table th { color: var(--steel); background: var(--surface-soft); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }

.footer { border-top: 1px solid var(--line); padding: 42px 0; }
.footer-inner { width: min(1180px, calc(100% - 40px)); margin: auto; display: flex; justify-content: space-between; gap: 20px; color: var(--steel); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

.portal-bar { background: var(--ink); color: white; }
.portal-bar .nav { min-height: 54px; }
.portal-bar .brand-mark { color: var(--ink); background: var(--mint); }
.portal-bar .nav-links a { color: #b3b3b3; }
.portal-bar .nav-links a:hover, .portal-bar .nav-links a.active { color: white; }
.portal-bar .button-secondary { color: white; border-color: rgba(255,255,255,.24); }
.portal-shell { width: min(1320px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 230px minmax(0, 1fr) 200px; gap: 42px; padding: 54px 0 90px; }
.portal-sidebar { position: sticky; top: 98px; align-self: start; }
.portal-sidebar .sidebar-title { margin-top: 25px; }
.portal-sidebar .sidebar-title:first-child { margin-top: 0; }
.portal-main { min-width: 0; }
.portal-main > .eyebrow { margin-bottom: 10px; }
.portal-main h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.05em; }
.portal-lede { max-width: 690px; margin: 14px 0 32px; color: var(--steel); font-size: 17px; }
.portal-toc { position: sticky; top: 98px; align-self: start; padding-left: 22px; border-left: 1px solid var(--line); }
.portal-toc a { display: block; margin: 0 0 10px; color: var(--steel); font-size: 12px; }
.portal-toc a:hover { color: var(--ink); }
.portal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.portal-toolbar h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.portal-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-card-grid .card { min-height: 150px; }
.portal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-kicker { margin: 0 0 6px; color: var(--muted); font: 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.portal-status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: var(--radius-full); background: rgba(0,212,164,.16); color: #007d62; font-size: 12px; font-weight: 600; }
.portal-status.neutral { color: var(--steel); background: var(--surface); }
.portal-status.warn { color: #8b5b00; background: #fff2d4; }
.portal-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.portal-stat { padding: 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.portal-stat strong { display: block; margin-top: 6px; font-size: 28px; letter-spacing: -.04em; }
.portal-copy { color: var(--slate); }
.portal-copy h2 { margin: 38px 0 12px; font-size: 28px; letter-spacing: -.035em; }
.portal-copy h3 { margin: 28px 0 8px; font-size: 18px; }
.portal-copy p { max-width: 720px; }
.portal-copy ul { max-width: 720px; padding-left: 20px; color: var(--slate); }
.portal-alert { padding: 14px 16px; margin: 20px 0; background: var(--surface); border-left: 3px solid var(--mint); border-radius: var(--radius-sm); color: var(--slate); font-size: 13px; }
.portal-form { display: grid; gap: 16px; max-width: 740px; }
.portal-form .form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.portal-empty { padding: 36px 24px; border: 1px dashed var(--line); border-radius: var(--radius-lg); text-align: center; color: var(--steel); }
.portal-code { padding: 16px; overflow-x: auto; background: var(--surface-code); color: #e5e5e5; border-radius: var(--radius-md); font: 13px/1.55 var(--font-mono); }
.portal-section { margin-top: 30px; }
.portal-section:first-child { margin-top: 0; }
.portal-section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.portal-section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.portal-detail { display: grid; grid-template-columns: 1fr .8fr; gap: 16px; }
.portal-detail .card { align-self: start; }
.service-docs { width: min(1180px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 56px; padding: 58px 0 96px; }
.service-nav { position: sticky; top: 95px; align-self: start; padding-right: 20px; border-right: 1px solid var(--line); }
.service-nav-label { margin: 0 0 12px; color: var(--muted); font: 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.service-nav a { display: block; padding: 9px 12px; color: var(--steel); border-radius: var(--radius-sm); font-size: 13px; }
.service-nav a:hover, .service-nav a.active { color: var(--ink); background: var(--surface); font-weight: 600; }
.service-nav a.active { box-shadow: inset 2px 0 0 var(--mint-deep); }
.service-docs-content { min-width: 0; }
.service-docs-content h2 { max-width: 720px; margin: 0 0 14px; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.05em; }
.service-docs-content > p { max-width: 680px; color: var(--steel); font-size: 17px; }
.service-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.service-index a { display: flex; align-items: baseline; gap: 12px; padding: 16px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.service-index a:hover { border-color: var(--mint-deep); box-shadow: var(--shadow-soft); }
.service-index small { color: var(--muted); font: 12px var(--font-mono); }
@media (max-width: 720px) {
  .service-docs { width: min(100% - 28px, 1180px); grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .service-nav { position: static; overflow-x: auto; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-nav-label { display: none; }
  .service-nav-list { display: flex; gap: 4px; width: max-content; }
  .service-nav a { white-space: nowrap; }
  .service-nav a.active { box-shadow: inset 0 -2px 0 var(--mint-deep); }
  .service-index { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .portal-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .portal-toc { display: none; }
}
@media (max-width: 720px) {
  .portal-shell { width: min(100% - 28px, 1320px); grid-template-columns: 1fr; gap: 28px; padding-top: 30px; }
  .portal-sidebar { position: static; overflow-x: auto; }
  .portal-sidebar .sidebar-title { display: none; }
  .portal-sidebar .sidebar-nav { display: flex; gap: 4px; }
  .portal-sidebar .sidebar-nav a { white-space: nowrap; }
  .portal-card-grid, .portal-detail { grid-template-columns: 1fr; }
  .portal-stat-row { grid-template-columns: 1fr; }
}

.reveal { animation: rise .65s ease both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .nav { min-height: 62px; }
  .nav-links { display: none; }
  .hero-inner, .form-layout { grid-template-columns: 1fr; }
  .hero-inner { min-height: auto; padding: 78px 0 64px; gap: 44px; }
  .hero-panel { max-width: 560px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar-nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .sidebar-nav a { white-space: nowrap; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .nav, .section, .page-hero-inner, .footer-inner, .dashboard-shell { width: min(100% - 28px, 1180px); }
  .brand-name { display: none; }
  .nav-actions .button-secondary { display: none; }
  .hero h1 { font-size: 46px; }
  .section { padding: 62px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .job-card { display: grid; }
  .metric-grid { gap: 8px; }
  .metric { padding: 14px; }
  .metric strong { font-size: 24px; }
  .footer-inner { display: grid; }
}
