/* Website layout and readable surfaces, using the original PulseLog palette. */
.app-shell {
  --text: #f1f3f7;
  --muted: #e7e9ed;
  --reading-text: #e6eaf0;
  --page-scrim: 8, 18, 29;
  --card-surface: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--text);
}
:root[data-theme="light"] .app-shell {
  --text: #131c29;
  --muted: #29323e;
  --reading-text: #303b48;
  --page-scrim: 240, 241, 243;
}
.site-header,
.site-section {
  padding: 0;
  background: none;
}
.site-header::before { content: none; }
.about-section::before {
  inset: -48px -64px;
  background: radial-gradient(ellipse at 30% 50%, rgba(var(--page-scrim), 0.56) 20%, rgba(var(--page-scrim), 0.32) 65%, transparent 100%);
  filter: blur(28px);
}
.release-tabs button,
.icon-button,
.social-link { background: var(--surface); border-color: var(--subtle); }
.release-tabs button[aria-selected="true"] { border-width: 2px; }
.atmosphere {
  position: fixed;
  background-image: url('/pulselog/backgrounds/login-background-dark.webp');
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(var(--page-scrim), 0.52), rgba(var(--page-scrim), 0.34) 65%, rgba(var(--page-scrim), 0.14));
}
:root[data-theme="light"] .atmosphere {
  background-image: url('/pulselog/backgrounds/login-background-light.webp');
}
.site-header,
.site-footer {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
}
.site-header {
  align-items: flex-start;
  flex-wrap: wrap;
  row-gap: 24px;
}
.site-identity { min-width: 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; width: 100%; margin-top: -16px; }
.site-nav a { position: relative; isolation: isolate; display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 -8px; background: rgba(var(--page-scrim), .52); filter: blur(12px); }
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-nav a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.site-identity h1 {
  position: relative;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 0;
  color: var(--text);
  font-weight: 400;
  letter-spacing: normal;
}
.site-controls { flex-wrap: wrap; gap: 12px; }
.site-controls .segmented { border-radius: 5px; background: color-mix(in srgb, var(--bg) 48%, transparent); }
.site-controls button { min-height: 44px; padding: 8px 10px; }
main.site-main {
  display: block;
  max-width: 1040px;
  margin: 64px auto 0;
}
.site-section { margin-bottom: 64px; min-width: 0; }
.site-section h2 {
  position: relative;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.9px;
  margin: 0 0 24px;
}
.site-identity h1::before,
.site-section h2::before,
.roadmap-note::before,
.performance-note::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -8px -24px;
  background: linear-gradient(90deg, rgba(var(--page-scrim), 0.62), rgba(var(--page-scrim), 0.48));
  filter: blur(18px);
}
.roadmap-note,
.performance-note { position: relative; isolation: isolate; }
.roadmap-note::before,
.performance-note::before { background: linear-gradient(90deg, rgba(var(--page-scrim), 0.72), rgba(var(--page-scrim), 0.60)); }
.performance-rate span { color: var(--text); }
.site-section h3 {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
}
/* Approved T: ordinary prose only; existing layout and UI typography stay intact. */
:is(.about-copy, .release-copy) p,
.performance-note,
.author-main :is(.author-intro-copy, .author-employer, [aria-labelledby="teaching-title"], [aria-labelledby="story-title"]) p:where(:not(.author-role):not(.author-meta)) {
  font-family: Inter, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: var(--prose-line-height, 1.65);
  letter-spacing: normal;
  word-spacing: normal;
  color: var(--text);
  -webkit-text-stroke: 0.6px rgb(var(--page-scrim));
  paint-order: stroke fill;
  margin-bottom: 1.25em;
}
.about-section { max-width: none; }
.about-copy { max-width: 780px; }
.about-copy p {
  margin: 0 0 1.25em;
}
.about-copy p:last-child { margin-bottom: 0; }
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; }
.roadmap-arrows { display: flex; gap: 8px; }
.icon-button { min-width: 44px; min-height: 44px; border-radius: 6px; font-size: 21px; }
.release-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.release-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--subtle);
  border-radius: 6px;
}
.release-tabs button:hover { background: var(--surface); color: var(--text); }
.release-tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}
.release-card,
.performance-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-surface);
}
.release-card { min-height: 355px; }
.release-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
.release-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; font-size: 12px; color: var(--muted); }
.release-version { font-family: 'JetBrains Mono', monospace; color: var(--text); font-size: 14px; }
.release-status { border: 1px solid var(--subtle); border-radius: 5px; background: var(--surface); padding: 5px 8px; }
.release-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.release-copy h4 { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.release-copy p { margin: 0; }
.roadmap-note { margin-bottom: 0; }
.performance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.performance-card { min-width: 0; }
.performance-card h3 { font-size: 20px; }
.performance-rate { font-size: 36px; font-weight: 500; letter-spacing: -1px; color: var(--accent); margin: 24px 0; }
.performance-rate span { font-size: 14px; letter-spacing: normal; }
.performance-card dl { font-size: 13px; line-height: 1.7; margin: 0; }
.performance-card dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.performance-card dt { color: var(--muted); }
.performance-card dd { margin: 0; font-variant-numeric: tabular-nums; }
.performance-pass { font-size: 13px; color: var(--text); line-height: 1.65; margin: 20px 0 0; }
.performance-note { max-width: 900px; }
.roadmap-note { color: var(--reading-text); font-size: 17px; line-height: 1.7; }
.back-to-top { position: fixed; z-index: 10; right: max(12px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 44px; height: 44px; padding: 10px; display: grid; place-items: center; }
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.site-footer { display: flex; justify-content: flex-end; gap: 12px; padding-bottom: 8px; }
.social-link { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.social-link:hover { color: var(--text); background: var(--surface); }
.social-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.social-link img.social-logo { display: block; width: 22px; height: 22px; object-fit: contain; }
.social-link img.youtube-logo { width: 32px; height: 28px; }
.social-link img.linkedin-dark { display: none; }
:root[data-theme="dark"] .social-link img.linkedin-light { display: none; }
:root[data-theme="dark"] .social-link img.linkedin-dark { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.video-player { background: var(--bg); border: 1px solid var(--subtle); border-radius: 6px; overflow: hidden; }
.video-player .demo-video { border: 0; border-radius: 0; }
.video-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; background: var(--surface); }
.video-controls button { color: var(--text); flex-shrink: 0; }
.video-controls button:disabled { opacity: 1; cursor: default; }
.video-controls button:focus-visible { outline-offset: 2px; }
.video-fullscreen svg { display: block; width: 22px; height: 22px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.video-seek {
  flex: 1 1 80px;
  min-width: 60px;
  width: auto;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}
.video-time { color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.video-error { padding: 0 16px; }
.video-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; border: 0; border-radius: 0; }
.video-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) .demo-video { flex: 1; min-height: 0; height: 0; object-fit: contain; }
.video-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) .video-controls { flex-shrink: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.video-player.is-expanded { position: fixed; inset: 0; z-index: 20; height: 100dvh; }
:root.video-expanded { overflow: hidden; }
@media (max-width: 767px) {
  .app-shell { --prose-line-height: 1.7; }
  .atmosphere { background-position: 38% center; }
  :root[data-theme="dark"] .atmosphere::after { background: rgba(var(--page-scrim), 0.52); }
  main.site-main { margin-top: 48px; max-width: 1040px; }
  .site-section { margin-bottom: 48px; }
  .release-copy,
  .performance-grid { grid-template-columns: 1fr; gap: 24px; }
  .release-card { min-height: 0; }
  .release-card,
  .performance-card { padding: 22px; }
}
@media (max-width: 540px) {
  .video-controls { gap: 8px; }
  .video-time { order: 1; flex-basis: 100%; text-align: center; }
  .site-controls { gap: 8px; }
  .release-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-section h2 { font-size: 26px; }
}
@media (max-width: 360px) {
  .site-controls { gap: 4px; }
  .site-controls button { padding-inline: 8px; }
  .release-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .release-card,
  .performance-card { padding: 18px; }
}
