:root {
  --white: #fff;
  --canvas: #f6f8fb;
  --surface: #eef3f8;
  --ink: #101828;
  --muted: #475467;
  --line: #d9e2ec;
  --blue: #1769e0;
  --blue-deep: #0b3b8f;
  --blue-soft: #dcebff;
  --green: #087a55;
  --shadow: 0 22px 60px rgba(16, 24, 40, .08);
  --shell: 1180px;
  --text: 720px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--canvas); line-height: 1.55; }
body[data-portal="org"] { --blue: #16745c; --blue-deep: #0e4b3b; --blue-soft: #d8f2e9; }
body[data-portal="net"] { --blue: #3751c7; --blue-deep: #202d7f; --blue-soft: #e2e7ff; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-deep); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--blue-soft); color: var(--blue-deep); }

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; }
.visually-hidden { position: absolute; overflow: hidden; clip: rect(0 0 0 0); width: 1px; height: 1px; margin: -1px; white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: .7rem .9rem; color: var(--white); background: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { margin: 0 0 1rem; color: var(--blue-deep); font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.noscript { margin: 0; padding: .7rem 24px; color: var(--ink); background: #fff2cc; font-size: .85rem; text-align: center; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .98); }
.header-inner { display: flex; min-height: 78px; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { display: grid; width: 32px; height: 32px; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--ink); }
.brand-mark i { display: block; aspect-ratio: 1; background: var(--ink); }
.brand-mark i:nth-child(2) { background: var(--blue); }
.brand-mark i:nth-child(3) { background: var(--blue-deep); }
.brand strong { display: block; font-size: .95rem; letter-spacing: .12em; line-height: 1; }
.brand small { display: block; max-width: 140px; margin-top: 2px; color: var(--muted); font-size: .61rem; font-weight: 650; line-height: 1.25; letter-spacing: .02em; }
.primary-nav { display: flex; align-items: center; flex: 1; justify-content: center; gap: 18px; }
.primary-nav a { color: var(--muted); font-size: .74rem; font-weight: 720; letter-spacing: .035em; text-decoration: none; text-transform: uppercase; }
.primary-nav a:hover { color: var(--blue-deep); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.portal-switcher { position: relative; }
.portal-switcher summary { display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: .74rem; list-style: none; }
.portal-switcher summary::-webkit-details-marker { display: none; }
.portal-menu { position: absolute; z-index: 25; top: calc(100% + 16px); right: 0; display: grid; min-width: 220px; padding: 8px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.portal-menu a { padding: .65rem .7rem; color: var(--muted); font-size: .8rem; text-decoration: none; }
.portal-menu a[aria-current="page"], .portal-menu a:hover { color: var(--blue-deep); background: var(--blue-soft); }
.language-link { display: inline-grid; min-width: 34px; min-height: 34px; place-items: center; border: 1px solid var(--line); color: var(--blue-deep); font-size: .72rem; font-weight: 750; text-decoration: none; }
.mobile-nav { display: none; }

.hero { overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--white) 0 62%, var(--surface) 62% 100%); }
.hero-grid { display: grid; min-height: 564px; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); align-items: center; gap: clamp(40px, 7vw, 112px); }
.hero-copy { max-width: 760px; padding-block: 100px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 1.45rem; font-size: clamp(2.65rem, 5.65vw, 5.35rem); letter-spacing: -.062em; line-height: 1; }
.hero-copy > p:not(.eyebrow) { max-width: 660px; margin-bottom: 2.1rem; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: .72rem 1rem; border: 1px solid transparent; font-size: .77rem; font-weight: 760; letter-spacing: .025em; text-decoration: none; text-transform: uppercase; transition: background-color .18s ease, border-color .18s ease; }
.button-primary { color: var(--white); background: var(--blue); }
.button-primary:hover { color: var(--white); background: var(--blue-deep); }
.button-secondary { border-color: var(--line); color: var(--ink); background: var(--white); }
.button-secondary:hover { border-color: var(--blue); color: var(--blue-deep); }
.hero-system { display: flex; min-width: 0; min-height: 390px; flex-direction: column; border: 1px solid #c9d5e3; border-top: 3px solid var(--blue); background: var(--white); box-shadow: 0 18px 42px rgba(16, 24, 40, .06); }
.system-topline { display: flex; min-height: 48px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-inline: 20px; color: var(--muted); font-size: .63rem; font-weight: 760; letter-spacing: .11em; text-transform: uppercase; }
.system-topline span:last-child { color: var(--blue-deep); }
.system-center { display: flex; flex: 1; align-items: center; gap: clamp(22px, 4vw, 42px); padding: clamp(34px, 6vw, 68px) clamp(26px, 5vw, 58px); }
.system-mark { display: grid; width: clamp(96px, 12vw, 142px); flex: 0 0 auto; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 8px; border: 1px solid var(--ink); }
.system-mark i { display: block; aspect-ratio: 1; background: var(--ink); }
.system-mark i:nth-child(2) { background: var(--blue); }
.system-mark i:nth-child(3) { background: var(--blue-deep); }
.system-center strong { display: block; color: var(--ink); font-size: clamp(1.65rem, 3vw, 2.65rem); letter-spacing: .21em; line-height: 1; }
.system-center p { max-width: 160px; margin: 11px 0 0; color: var(--muted); font-size: .72rem; font-weight: 720; letter-spacing: .09em; line-height: 1.45; text-transform: uppercase; }
.system-ledger { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.system-ledger div { display: grid; min-height: 76px; align-content: space-between; gap: 8px; padding: 13px 14px; }
.system-ledger div + div { border-left: 1px solid var(--line); }
.system-ledger span { color: var(--blue); font-size: .64rem; font-weight: 780; letter-spacing: .08em; }
.system-ledger strong { color: var(--ink); font-size: .75rem; letter-spacing: -.01em; line-height: 1.1; }

.search-band { border-bottom: 1px solid var(--line); background: var(--surface); }
.search-form { display: flex; align-items: center; gap: 10px; padding-block: 18px; }
.search-form label { flex: 0 0 auto; color: var(--muted); font-size: .76rem; font-weight: 720; }
.search-form input { width: 100%; min-height: 42px; border: 1px solid var(--line); padding: .6rem .75rem; color: var(--ink); background: var(--white); }
.search-form button { min-height: 42px; border: 0; padding: .6rem .75rem; color: var(--blue-deep); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 720; }
.search-empty { margin: -4px 0 18px; color: var(--muted); font-size: .85rem; }

.content-section, .architecture-section, .news-section, .code-section { padding-block: clamp(66px, 8vw, 124px); }
.content-section:nth-of-type(even), .architecture-section { background: var(--white); }
.section-heading { max-width: var(--text); margin-bottom: clamp(32px, 5vw, 60px); }
.section-heading h2, .code-layout h2, .closing-cta h2, .template-heading h1, .template-content h2 { margin-bottom: 1rem; font-size: clamp(1.8rem, 3.8vw, 3.5rem); letter-spacing: -.052em; line-height: 1.04; }
.section-heading p:not(.eyebrow), .code-layout p, .closing-cta p, .template-heading p, .template-content p { color: var(--muted); font-size: 1.04rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info-card { position: relative; min-height: 212px; padding: 23px 22px 20px; border: 1px solid var(--line); background: var(--white); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.info-card:hover { border-color: var(--blue); box-shadow: 0 13px 30px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.info-card[hidden] { display: none; }
.card-number { display: block; margin-bottom: 28px; color: var(--blue); font-size: .7rem; font-weight: 760; letter-spacing: .12em; }
.info-card h3 { max-width: 260px; margin-bottom: .65rem; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.2; }
.info-card p { max-width: 340px; margin: 0; color: var(--muted); font-size: .88rem; }
.status-pill { position: absolute; top: 20px; right: 18px; display: inline-flex; max-width: 54%; padding: .24rem .45rem; border: 1px solid currentColor; color: var(--green); font-size: .61rem; font-weight: 750; line-height: 1.2; text-align: right; }

.architecture-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 1px; margin: 0; padding: 1px; background: var(--line); list-style: none; }
.architecture-flow li { position: relative; display: grid; min-height: 150px; align-content: space-between; padding: 18px; background: var(--white); }
.architecture-flow li:not(:last-child)::after { position: absolute; z-index: 1; top: 50%; right: -8px; width: 16px; height: 16px; border-top: 1px solid var(--blue); border-right: 1px solid var(--blue); content: ""; background: var(--white); transform: translateY(-50%) rotate(45deg); }
.architecture-flow span { color: var(--blue); font-size: .7rem; font-weight: 760; letter-spacing: .1em; }
.architecture-flow strong { max-width: 200px; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.1; }

.code-section { color: var(--white); background: var(--ink); }
.code-layout { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); align-items: center; gap: 56px; }
.code-layout .eyebrow { color: #8ebcff; }
.code-layout p { color: #c2cad8; }
.code-frame { overflow: hidden; border: 1px solid #394150; background: #171f2d; }
.code-frame > div { display: flex; min-height: 42px; align-items: center; justify-content: space-between; border-bottom: 1px solid #394150; padding-inline: 14px; color: #b5c1d2; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; }
.code-frame button { border: 0; color: #dcebff; background: transparent; cursor: pointer; font-size: .7rem; }
.code-frame pre { overflow-x: auto; margin: 0; padding: 20px; color: #e8effb; font-size: .82rem; line-height: 1.65; }

.timeline { border-top: 1px solid var(--line); }
.timeline article { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid var(--line); padding-block: 24px; }
.timeline span { color: var(--blue); font-size: .72rem; font-weight: 760; letter-spacing: .1em; }
.timeline h3 { margin-bottom: .4rem; font-size: 1.15rem; letter-spacing: -.025em; }
.timeline p { max-width: var(--text); margin: 0; color: var(--muted); }

.closing-cta { padding-block: clamp(70px, 10vw, 140px); color: var(--white); background: var(--blue-deep); }
.closing-cta .eyebrow { color: var(--blue-soft); }
.closing-cta p { max-width: 680px; color: #dce8ff; }
.inline-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.inline-links a { color: var(--white); font-size: .87rem; font-weight: 720; }
.inline-links a span { color: #a9c8ff; }

.site-footer { padding-block: 54px 34px; color: #d0d5dd; background: #0f1724; }
.site-footer .brand { color: var(--white); }
.site-footer .brand-mark { border-color: var(--white); }
.site-footer .brand-mark i { background: var(--white); }
.site-footer .brand small, .site-footer p { color: #98a2b3; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 50px; }
.site-footer h2 { margin-bottom: .9rem; color: var(--white); font-size: .73rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #d0d5dd; font-size: .84rem; }
.site-footer a:hover { color: var(--white); }
.site-footer p { max-width: 300px; margin-top: 14px; font-size: .79rem; }

.template-hero { padding-block: 76px 62px; border-bottom: 1px solid var(--line); background: var(--white); }
.breadcrumbs { display: flex; gap: 8px; margin-bottom: 54px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { color: var(--blue-deep); }
.template-heading { display: flex; max-width: 850px; align-items: flex-start; gap: 24px; }
.template-heading h1 { margin-bottom: 1rem; font-size: clamp(2.35rem, 5vw, 4.5rem); }
.template-heading p { max-width: 650px; }
.template-icon { display: inline-grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border: 1px solid var(--blue); color: var(--blue-deep); background: var(--blue-soft); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.template-content { padding-block: 78px 118px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 70px; }
.two-column article { max-width: var(--text); }
.two-column aside { align-self: start; border-top: 2px solid var(--blue); padding-top: 16px; }
.two-column aside h2 { font-size: 1.1rem; }
.two-column aside ul { display: grid; gap: 8px; padding-left: 1.1rem; color: var(--muted); }
.two-column aside a { color: var(--blue-deep); font-size: .9rem; }
.analytics-notice { margin-top: 34px; border-left: 3px solid var(--blue); padding: 2px 0 2px 20px; }
.analytics-notice h2 { margin: 1.2rem 0 .5rem; font-size: 1.2rem; }
.analytics-notice h2:first-child { margin-top: 0; }
.analytics-notice ul { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--muted); }
.analytics-notice li { margin-bottom: .55rem; }

.language-landing { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 82% 12%, var(--blue-soft), transparent 32%), var(--canvas); }
.chooser-card { width: min(620px, 100%); padding: clamp(32px, 7vw, 70px); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.chooser-card .brand { margin-bottom: 64px; }
.chooser-card h1 { margin-bottom: 1rem; font-size: clamp(2.2rem, 5vw, 4rem); }
.chooser-card > p:not(.eyebrow) { max-width: 480px; color: var(--muted); font-size: 1.05rem; }
.language-options { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.language-options .button { min-width: 156px; justify-content: space-between; }

.consent-banner { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; width: min(680px, calc(100% - 40px)); align-items: center; justify-content: space-between; gap: 24px; padding: 20px; border: 1px solid var(--line); color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.consent-banner h2 { margin-bottom: .35rem; font-size: 1rem; letter-spacing: -.02em; }
.consent-banner p { max-width: 470px; margin-bottom: .25rem; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.consent-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.consent-actions .button { min-height: 40px; white-space: nowrap; }
.text-button, .footer-link { border: 0; padding: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.text-button { color: var(--blue-deep); font-size: .76rem; font-weight: 700; }
.footer-link { color: #d0d5dd; font-size: .79rem; }
.footer-link:hover { color: var(--white); }
.consent-dialog { width: min(620px, calc(100% - 32px)); border: 1px solid var(--line); padding: 0; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.consent-dialog::backdrop { background: rgba(16, 24, 40, .48); }
.consent-dialog form { position: relative; padding: clamp(28px, 5vw, 48px); }
.consent-dialog h2 { max-width: 420px; margin-bottom: .9rem; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.045em; }
.consent-dialog p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: .92rem; }
.dialog-close { position: absolute; top: 12px; right: 12px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); color: var(--ink); background: var(--white); cursor: pointer; font-size: 1.35rem; line-height: 1; }

@media (max-width: 1023px) {
  .primary-nav { gap: 12px; }
  .primary-nav a { font-size: .74rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { gap: 28px; }
}

@media (max-width: 767px) {
  .shell { width: min(var(--shell), calc(100% - 32px)); }
  .header-inner { min-height: 66px; gap: 10px; }
  .primary-nav, .header-actions .portal-switcher { display: none; }
  .header-actions { margin-left: auto; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav summary { display: grid; width: 44px; height: 44px; align-content: center; gap: 6px; justify-content: center; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary span { display: block; width: 20px; height: 1.5px; background: var(--ink); }
  .mobile-nav[open] summary span:last-child { transform: rotate(90deg) translateX(-7px); }
  .mobile-nav nav { position: absolute; z-index: 25; top: calc(100% + 10px); right: 0; display: grid; width: min(300px, calc(100vw - 32px)); padding: 12px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
  .mobile-nav nav > a { padding: .76rem .55rem; color: var(--ink); font-size: .92rem; font-weight: 650; text-decoration: none; }
  .mobile-nav .portal-switcher { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
  .mobile-nav .portal-menu { position: static; margin-top: 8px; box-shadow: none; }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding-block: 66px 40px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-system { min-height: 250px; margin-bottom: 36px; }
  h1 { font-size: clamp(2.48rem, 12vw, 4.1rem); }
  .hero-copy > p:not(.eyebrow) { font-size: 1.02rem; }
  .content-section, .architecture-section, .news-section, .code-section { padding-block: 64px; }
  .card-grid { grid-template-columns: 1fr; }
  .info-card { min-height: 174px; }
  .architecture-flow { grid-template-columns: 1fr; }
  .architecture-flow li { min-height: 116px; }
  .architecture-flow li:not(:last-child)::after { top: auto; right: auto; bottom: -8px; left: 50%; transform: translateX(-50%) rotate(135deg); }
  .search-form { display: grid; grid-template-columns: 1fr auto; }
  .search-form label { grid-column: 1 / -1; }
  .code-layout, .two-column { grid-template-columns: 1fr; gap: 36px; }
  .code-frame pre { padding: 15px; font-size: .73rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .template-hero { padding-block: 52px 46px; }
  .breadcrumbs { margin-bottom: 34px; }
  .template-heading { gap: 16px; }
  .template-icon { width: 48px; height: 48px; }
  .consent-banner { right: 16px; bottom: 16px; width: calc(100% - 32px); align-items: stretch; flex-direction: column; gap: 14px; }
  .consent-banner .consent-actions { width: 100%; }
  .consent-banner .button { flex: 1; }
}

@media (max-width: 479px) {
  .brand small { display: none; }
  .language-options { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button, .language-options .button { width: 100%; }
  .timeline article { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .status-pill { max-width: 60%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
