*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --background: #0b1220;
  --surface: #111c2d;
  --line: #243247;
  --muted: #9badc5;
  --text: #f3f6fc;
  --accent: #ffb454;
}
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 0, #17243b70, transparent 650px), var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; vertical-align: middle; }
.wrap { width: min(1220px, calc(100% - 80px)); margin: 0 auto; }
.skip-link { position: absolute; z-index: 5; left: 16px; top: -100px; padding: 8px 16px; background: var(--accent); color: #0b1220; border-radius: 6px; }
.skip-link:focus { top: 8px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
.site-header { border-bottom: 1px solid #24324780; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; }
.brand b { color: var(--accent); }
.brand small { display: block; margin-top: 5px; color: #95a8c1; font-size: 9px; font-weight: 500; letter-spacing: 1.7px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: #ffb45412; border: 1px solid #ffb45440; border-radius: 10px; }
.header-note { color: #9aabc2; font-size: 12px; }
.hero { padding: 48px 0 43px; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 17px; font-size: 11px; font-weight: 700; letter-spacing: 2.5px; color: var(--accent); }
.hero .eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(32px, 4.1vw, 44px); line-height: 1.15; letter-spacing: -1.6px; font-weight: 700; }
.hero h1 span { color: #bacbe0; }
.lede { margin-top: 18px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.collection-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.collection-head h2 { font-size: 14px; font-weight: 500; }
.collection-head p { font-family: monospace; font-size: 11px; color: var(--muted); }
.collection-head p span { margin: 0 10px; color: #637590; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.service-index { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -3px 0 24px; }
.service-index > span { color: #8fa4c0; font-size: 11px; margin-right: 4px; }
.service-index a { padding: 5px 10px; color: #b9c9df; background: #142034; border: 1px solid #2d3c53; border-radius: 5px; font-size: 11px; }
.service-index a:hover, .service-index a:focus-visible { color: var(--accent); border-color: var(--accent); }
.card:target { border-color: var(--accent); }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px #00000012; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-4px); box-shadow: 0 16px 28px #00000035; }
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-link:focus-visible { outline-offset: -3px; outline-width: 3px; border-radius: 13px; }
.card-preview { --preview-pad: 0px; position: relative; aspect-ratio: 45 / 31; min-height: 0; overflow: hidden; background: #18263a; border-bottom: 1px solid var(--line); }
.card-preview img { position: absolute; inset: var(--preview-pad); display: block; width: calc(100% - 2 * var(--preview-pad)); height: calc(100% - 2 * var(--preview-pad)); object-fit: contain; border-radius: 0; }
.card-body { padding: 22px 22px 0; display: flex; flex-direction: column; flex-grow: 1; }
.category { display: flex; justify-content: space-between; align-items: center; color: var(--accent); font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.sheet-number { font-family: monospace; color: #7f94ae; font-size: 11px; letter-spacing: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-top: 13px; }
.service-icon { display: grid; place-items: center; flex-shrink: 0; width: 45px; height: 45px; border-radius: 10px; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 27%, var(--surface)); }
.card h2 { font-size: 21px; line-height: 1.25; letter-spacing: -.5px; }
.card-description { margin: 15px 0 23px; font-size: 14px; line-height: 1.65; color: #aebed2; }
.card-action { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: auto; padding: 16px 0; font-size: 10px; color: #99adc8; }
.action-dot { padding: 0 3px; color: #627691; }
.explore { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.explore svg { transition: transform .2s; }
.card:hover .explore svg { transform: translateX(3px); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 32px; margin-top: 46px; border-top: 1px solid var(--line); color: #91a4bf; font-size: 11px; }
.footer-dot { padding: 0 9px; color: #5e7492; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; }
.site-footer a:hover { color: var(--text); }

/* Reading pages keep the full reference accessible at every screen size. */
.reader { padding-top: 30px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.back-link:hover, .reader-bottom a:hover { color: var(--accent); }
.reader-hero { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 34px 0 36px; }
.reader-hero .eyebrow { justify-content: flex-start; margin-bottom: 16px; }
.reader-number { color: #8598b2; letter-spacing: 0; margin-left: 5px; }
.reader h1 { display: flex; gap: 18px; align-items: center; font-size: clamp(30px, 4vw, 47px); }
.reader h1 .service-icon { width: 61px; height: 61px; border-radius: 14px; }
.reader-hero .lede { font-size: 16px; margin-top: 14px; }
.download { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; white-space: nowrap; background: var(--surface); }
.download span { font-family: monospace; padding: 2px 5px; margin-left: 4px; color: #afc0d7; font-size: 9px; border-radius: 3px; border: 1px solid #35455b; }
.download:hover { border-color: var(--accent); }
.architecture { padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.architecture h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.3px; margin-top: 8px; }
.flow { display: flex; gap: 30px; list-style: none; padding: 0; margin: 26px 0 19px; }
.flow-step { flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px; position: relative; background: #16253a; border: 1px solid #324258; border-radius: 8px; padding: 18px 14px; }
.flow-icon { color: var(--accent); flex-shrink: 0; }
.flow-step strong { display: block; font-size: 13px; line-height: 1.3; font-weight: 700; }
.flow-step div > span { display: block; color: #a9bbd2; font-size: 10px; line-height: 1.4; margin-top: 7px; }
.flow-arrow { position: absolute; right: -25px; top: calc(50% - 9px); color: var(--accent); }
.flow-step:last-child .flow-arrow { display: none; }
.diagram-note { color: #a8b9ce; font-size: 12px; line-height: 1.7; max-width: 840px; }
.reader-layout { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: 54px; margin-top: 48px; }
.contents { align-self: start; position: sticky; top: 28px; }
.contents summary { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; gap: 15px; cursor: pointer; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.contents summary span { font-size: 10px; font-weight: 400; color: var(--muted); }
.contents summary::-webkit-details-marker { display: none; }
.contents nav { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; }
.contents nav a { display: flex; align-items: baseline; gap: 11px; color: #acbdd4; font-size: 12px; line-height: 1.5; padding: 8px 0; }
.contents nav a span { color: #7389a5; font-family: monospace; font-size: 10px; }
.contents nav a:hover { color: var(--accent); }
.reader-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 30px; }
.reader-topic { border-top: 1px solid var(--line); padding-top: 22px; }
.reader-topic h2 { display: flex; align-items: baseline; gap: 12px; font-size: 18px; line-height: 1.4; letter-spacing: -.2px; }
.reader-topic h2 span { color: var(--accent); font-family: monospace; font-size: 11px; font-weight: 400; }
.reader-topic ul { margin: 18px 0 0; padding-left: 18px; color: #b8c6d9; font-size: 14px; line-height: 1.8; }
.reader-topic li { margin-bottom: 10px; padding-left: 2px; }
.reader-topic li::marker { color: var(--accent); font-size: 9px; }
.sources { grid-column: 1 / -1; padding: 26px 0 8px; border-top: 1px solid var(--line); margin-top: 14px; }
.sources h2 { font-size: 18px; }
.sources p { margin: 10px 0 15px; color: var(--muted); font-size: 13px; }
.sources div { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.sources a { color: var(--accent); font-size: 12px; }
.sources a:hover { text-decoration: underline; }
.reader-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.reader-bottom a { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 1080px) {
  .wrap { width: calc(100% - 48px); }
  .grid { gap: 18px; }
  .card-body { padding: 18px 17px 0; }
  .card h2 { font-size: 18px; }
  .card-action > span:first-child { font-size: 9px; }
  .flow { gap: 25px; }
  .flow-step { padding: 15px 10px; gap: 9px; }
  .flow-icon svg { width: 23px; }
  .flow-arrow { right: -22px; }
  .reader-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 30px; }
  .reader-topics { gap: 24px; }
}
@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .card h2 { font-size: 21px; }
  .card-body { padding: 22px 22px 0; }
  .flow-step { flex-direction: column; text-align: center; padding: 17px 8px; }
  .reader-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 32px; }
  .reader-topics { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 78px; }
  .brand { font-size: 19px; }
  .brand small { font-size: 8px; letter-spacing: 1.3px; }
  .brand-mark { width: 36px; height: 36px; }
  .header-note { display: none; }
  .hero { padding: 41px 0 36px; text-align: left; }
  .hero .eyebrow { justify-content: flex-start; font-size: 9px; letter-spacing: 2px; margin-bottom: 15px; }
  h1 { font-size: 36px; line-height: 1.16; letter-spacing: -1px; }
  .hero h1 span { display: block; }
  .lede { font-size: 14px; line-height: 1.8; margin-top: 17px; }
  .collection-head { margin-bottom: 18px; padding-bottom: 12px; }
  .collection-head h2 { font-size: 13px; }
  .collection-head p { font-size: 10px; }
  .collection-head p span { margin: 0 6px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .card-preview { --preview-pad: 0px; }
  .card-body { padding: 20px 20px 0; }
  .card h2 { font-size: 21px; }
  .card-description { font-size: 14px; }
  .card-action { padding: 15px 0; }
  .card-action > span:first-child { font-size: 10px; }
  .site-footer { flex-direction: column; gap: 12px; padding: 24px 0; margin-top: 30px; font-size: 10px; }
  .reader { padding-top: 23px; }
  .reader-hero { align-items: flex-start; flex-direction: column; gap: 23px; padding: 29px 0; }
  .reader-hero .eyebrow { font-size: 10px; letter-spacing: 1.6px; margin-bottom: 13px; }
  .reader h1 { font-size: 30px; gap: 13px; letter-spacing: -.8px; }
  .reader h1 .service-icon { width: 48px; height: 48px; border-radius: 11px; }
  .reader h1 .service-icon svg { width: 28px; height: 28px; }
  .reader-hero .lede { font-size: 14px; }
  .download { width: 100%; min-height: 46px; }
  .architecture { padding: 21px 20px; }
  .architecture h2 { font-size: 20px; line-height: 1.4; margin-top: 9px; }
  .flow { flex-direction: column; gap: 27px; margin-top: 24px; }
  .flow-step { flex-direction: row; text-align: left; padding: 16px; gap: 16px; }
  .flow-icon svg { width: 27px; height: 27px; }
  .flow-step strong { font-size: 14px; }
  .flow-step div > span { font-size: 11px; margin-top: 4px; }
  .flow-arrow { top: auto; bottom: -24px; right: auto; left: calc(50% - 9px); }
  .diagram-note { font-size: 12px; }
  .reader-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; margin-top: 30px; }
  .contents { position: static; padding: 17px 20px; background: #111c2d; border: 1px solid var(--line); border-radius: 8px; }
  .contents summary { padding-bottom: 12px; font-size: 13px; min-height: 32px; }
  .contents details:not([open]) summary { border-bottom: 0; padding-bottom: 0; }
  .contents nav { padding-top: 8px; gap: 0; }
  .contents nav a { padding: 11px 0; font-size: 12px; min-height: 44px; }
  .reader-topics { gap: 22px; }
  .reader-topic { padding-top: 21px; }
  .reader-topic h2 { font-size: 20px; }
  .reader-topic ul { font-size: 15px; line-height: 1.8; margin-top: 16px; }
  .reader-topic li { margin-bottom: 12px; }
  .sources { margin-top: 2px; }
  .sources div { flex-direction: column; gap: 16px; }
  .sources a { font-size: 13px; }
  .reader-bottom { flex-direction: column; font-size: 13px; gap: 20px; }
  .reader-bottom a { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .card:hover, .card:hover .explore svg { transform: none; }
}
@media print {
  body { background: white; color: black; }
  .site-header, .site-footer, .back-link, .download, .contents, .reader-bottom, .skip-link { display: none; }
  .wrap { width: 100%; }
  .reader-layout, .reader-topics { display: block; }
  .reader-topic { break-inside: avoid; margin-bottom: 24px; }
  .reader-topic ul, .lede, .diagram-note { color: #333; }
  .architecture, .flow-step { background: white; }
}

.flow-arrow-label { position: absolute; left: -22px; top: -16px; width: 60px; text-align: center; font-size: 8px; white-space: nowrap; }
.flow-branch { position: relative; display: flex; align-items: center; gap: 12px; border: 1px solid #324258; border-radius: 8px; background: #16253a; width: calc((100% - 60px) / 3); margin: 26px 0 20px; padding: 15px; }
.branch-dynamodb { margin-left: calc((100% + 30px) / 3); }
.branch-ec2 { margin-left: auto; }
.branch-middle { margin-left: calc((100% + 30px) / 3); }
.branch-end { margin-left: auto; }
.flow-branch::before { content: ''; position: absolute; height: 24px; width: 1px; background: var(--accent); top: -25px; left: 50%; }
.flow-branch strong { display: block; font-size: 13px; }
.flow-branch div > span { display: block; color: #a9bbd2; font-size: 10px; margin-top: 4px; }
@media (max-width: 600px) {
  .flow-arrow svg { transform: rotate(90deg); }
  .flow-arrow-label { left: 24px; top: 0; font-size: 9px; }
  .flow-cloudfront .flow-step:nth-child(2) { margin-bottom: 9px; }
  .flow-branch { width: 100%; margin-left: 0; padding: 16px; }
  .flow-branch::before { display: none; }
  .flow-branch strong { font-size: 14px; }
  .flow-branch div > span { font-size: 11px; }
}
.contents summary span::after { content: ' −'; font-size: 16px; margin-left: 9px; }
.contents details:not([open]) summary span::after { content: ' +'; }

/* Light, depth and motion. Pages read the same with reduced motion or without JavaScript. */
::selection { background: #ffb45455; }
body::before { content: ''; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; background: radial-gradient(36vmax 28vmax at 18% 10%, #ffb45412, transparent 70%), radial-gradient(42vmax 32vmax at 86% 18%, #b497fc17, transparent 70%), radial-gradient(40vmax 34vmax at 50% 95%, #6aa9ff10, transparent 70%); animation: aurora 40s ease-in-out infinite alternate; }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes aurora { 50% { transform: translate3d(3vmax, -2vmax, 0) rotate(3deg) scale(1.05); } to { transform: translate3d(-3vmax, 2vmax, 0) rotate(-2deg) scale(1.02); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes ring { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 15%, transparent), 0 0 14px var(--accent); } }
@keyframes nudge { 50% { translate: var(--nudge, 4px 0); } }
@keyframes step-glow { 0%, 34%, 100% { border-color: #324258; box-shadow: none; } 14% { border-color: color-mix(in srgb, var(--accent) 75%, #324258); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 12px 32px -12px color-mix(in srgb, var(--accent) 70%, transparent); } }
@keyframes target-glow { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 60px -10px var(--accent); } }

.site-header { position: relative; border-bottom-color: transparent; }
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, #ffb45466 22%, #b497fc66 52%, #6aa9ff55 80%, transparent); }
.brand-mark { box-shadow: 0 0 24px -6px #ffb45499; transition: transform .3s cubic-bezier(.2, .8, .3, 1.4); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.hero { position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: -30px 0 -10px; pointer-events: none; background: radial-gradient(closest-side at 50% 45%, #b497fc1c, transparent), radial-gradient(40% 55% at 32% 50%, #ffb45414, transparent 70%), radial-gradient(40% 55% at 70% 45%, #6aa9ff14, transparent 70%); }
.hero::after { content: ''; position: absolute; z-index: -1; inset: -30px 0 0; pointer-events: none; background-image: radial-gradient(#7d93b1 .8px, transparent 1px); background-size: 24px 24px; opacity: .35; -webkit-mask-image: radial-gradient(ellipse 55% 70% at 50% 45%, #000, transparent 75%); mask-image: radial-gradient(ellipse 55% 70% at 50% 45%, #000, transparent 75%); }
.hero > *, .reader-hero > *, .back-link { animation: rise .8s cubic-bezier(.2, .8, .3, 1) backwards; }
.hero > :nth-child(2), .reader-hero > :nth-child(2) { animation-delay: .08s; }
.hero > :nth-child(3) { animation-delay: .16s; }
.hero .eyebrow > span { --accent: #ffb454; animation: pulse-dot 2.6s ease-in-out infinite; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -2px; }
.hero h1 span { background: linear-gradient(100deg, #bacbe0, #ffffff 20%, #ffb454 40%, #ff8fbf 55%, #b497fc 72%, #bacbe0); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 12s linear infinite; }

.service-index a { display: inline-flex; align-items: center; gap: 7px; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.service-index a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.service-index a:hover, .service-index a:focus-visible { color: var(--text); border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, #142034); transform: translateY(-1px); }

.grid .card:nth-child(-n+3) { animation: rise .9s cubic-bezier(.2, .8, .3, 1) backwards; }
.grid .card:nth-child(1) { animation-delay: .2s; }
.grid .card:nth-child(2) { animation-delay: .3s; }
.grid .card:nth-child(3) { animation-delay: .4s; }
.card { position: relative; isolation: isolate; background: linear-gradient(180deg, #11192900, #0e1828), var(--surface); transition: border-color .3s, transform .35s cubic-bezier(.2, .8, .3, 1), box-shadow .35s; }
.card::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--accent) 13%, transparent), transparent 65%); opacity: 0; transition: opacity .4s; }
.card::after { content: ''; position: absolute; inset: -1px; z-index: 2; pointer-events: none; border-radius: inherit; padding: 1px; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -30%), var(--accent), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--accent) 60%, transparent), 0 16px 30px #00000040; }
.card:target { animation: target-glow 1.8s ease-out; }
.card-preview img { transition: transform .8s cubic-bezier(.2, .8, .3, 1); }
.card:hover .card-preview img { transform: scale(1.04); }
.card-preview::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; pointer-events: none; background: linear-gradient(transparent, #0b122055); }
.service-icon { transition: box-shadow .3s, transform .3s cubic-bezier(.2, .8, .3, 1.4); }
.card:hover .service-icon { transform: rotate(-6deg) scale(1.06); box-shadow: 0 0 24px -4px color-mix(in srgb, var(--accent) 70%, transparent); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .3, 1) var(--reveal-delay, 0ms), transform .8s cubic-bezier(.2, .8, .3, 1) var(--reveal-delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* Reading pages */
.progress { position: fixed; z-index: 10; left: 0; top: 0; width: 100%; height: 3px; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, transparent), var(--accent)); box-shadow: 0 0 14px var(--accent); }
.reader::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(55vmax 40vmax at 8% -6%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.reader h1 .service-icon { position: relative; box-shadow: 0 14px 40px -12px color-mix(in srgb, var(--accent) 80%, transparent); background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent) 6%, var(--surface))); }
.reader h1 .service-icon::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--accent); animation: ring 3.2s ease-out infinite; }
.download { position: relative; overflow: hidden; transition: border-color .25s, box-shadow .3s, transform .25s; }
.download::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, #ffffff22 50%, transparent 65%); transform: translateX(-100%); transition: transform .8s; }
.download:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -14px var(--accent); }
.download:hover::after { transform: translateX(100%); }
.architecture { position: relative; border-color: transparent; background: linear-gradient(160deg, #132136, #0f1a2a) padding-box, linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--line) 32%, var(--line) 70%, color-mix(in srgb, var(--accent) 30%, transparent)) border-box; box-shadow: 0 30px 70px -40px color-mix(in srgb, var(--accent) 45%, #000); }
.architecture .category { color: var(--accent); }
.flow-step { background: linear-gradient(160deg, #1a2a41, #142236); transition: transform .3s cubic-bezier(.2, .8, .3, 1); animation: step-glow 6s ease-in-out infinite; }
.flow-step:nth-child(2) { animation-delay: 1s; }
.flow-step:nth-child(3) { animation-delay: 2s; }
.flow-step:nth-child(4) { animation-delay: 3s; }
.flow-step:nth-child(5) { animation-delay: 4s; }
.flow-step:hover { transform: translateY(-3px); }
.flow-icon { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent)); }
.flow-arrow { animation: nudge 1.8s ease-in-out infinite; }
.flow-branch { background: linear-gradient(160deg, #1a2a41, #142236); }
.contents nav { border-left: 1px solid var(--line); }
.contents nav a { margin-left: -1px; padding-left: 14px; border-left: 2px solid transparent; transition: color .2s, border-color .2s, background .2s; }
.contents nav a.active { color: var(--text); border-left-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 80%); }
.contents nav a.active span { color: var(--accent); }
.reader-topic { position: relative; }
.reader-topic::before { content: ''; position: absolute; left: 0; top: -1px; width: 56px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); transition: width .6s cubic-bezier(.2, .8, .3, 1); }
.reader-topic:hover::before { width: 100%; }
.reader-topic h2 span { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); }
.reader-topic li::marker { font-size: 11px; }
.sources a { transition: color .2s, text-shadow .2s; }
.sources a:hover { text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 70%, transparent); }
.reader-bottom a { transition: color .2s, transform .25s; }
.reader-bottom a:last-child:hover { transform: translateX(3px); }
.site-footer { position: relative; border-top-color: transparent; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, #ffb45455 25%, #b497fc55 55%, transparent); }

.reader-topic { isolation: isolate; }
.reader-topic::after { content: ''; position: absolute; z-index: -1; inset: -10px -12px -14px; border-radius: 16px; pointer-events: none; opacity: 0; background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 42px -14px var(--accent); }
.reader-topic.flash::after { animation: topic-flash 3.2s ease-out; }
.reader-topic.flash h2 { color: var(--accent); transition: color .3s; }
.card.flash { animation: target-glow 1.8s ease-out; }
@keyframes topic-flash { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }

.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero > :nth-child(4) { animation-delay: .24s; }

@media (max-width: 600px) {
  .flow-arrow { --nudge: 0 4px; }
  .hero h1 { font-size: 40px; letter-spacing: -1.4px; }
}
@media (hover: none) {
  .card:hover, .flow-step:hover, .download:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .reader-topic.flash::after { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  body::before, body::after, .reader::before, .progress { display: none; }
  .reveal { opacity: 1; transform: none; }
}
