/* AIDU release notes. One stylesheet for every page.
   Tokens mirror the dashboard (frontend/src/app/globals.css): brand #465fff, the gray ramp,
   16px cards on a gray-50 page, and the platform UI font (SF on Apple, Segoe UI Variable on Windows). */

/* ── TOKENS ── */
:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --hairline: #e4e7ec;
  --hairline-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --text-3: #667085;
  --brand: #465fff;
  --brand-hover: #3641f5;
  --brand-text: #3641f5;
  --brand-soft: #ecf3ff;
  --on-brand: #ffffff;
  --focus: #465fff;
  --new-bg: #ecf3ff;      --new-fg: #2a31d8;
  --improved-bg: #ecfdf3; --improved-fg: #027a48;
  --fixed-bg: #f2f4f7;    --fixed-fg: #475467;
  --changed-bg: #fff6ed;  --changed-fg: #c4320a;
  --security-bg: #fef3f2; --security-fg: #b42318;
  --note-bg: #fffaeb;     --note-border: #fedf89; --note-fg: #93370d;
  --header-bg: rgba(249, 250, 251, 0.82);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.12), 0 2px 4px rgba(16, 24, 40, 0.06);
  --media-filter: none;
  --backdrop: rgba(16, 24, 40, 0.72);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI Variable",
    "Segoe UI", Inter, system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --header-h: 60px;
  --page-max: 1040px;
  --measure: 680px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c111d;
    --surface: #101828;
    --surface-2: #1d2939;
    --hairline: #1d2939;
    --hairline-strong: #344054;
    --text: #f2f4f7;
    --text-2: #d0d5dd;
    --text-3: #98a2b3;
    --brand: #465fff;
    --brand-hover: #7592ff;
    --brand-text: #9cb9ff;
    --brand-soft: rgba(70, 95, 255, 0.14);
    --focus: #7592ff;
    --new-bg: rgba(70, 95, 255, 0.16);  --new-fg: #9cb9ff;
    --improved-bg: rgba(18, 183, 106, 0.14); --improved-fg: #6ce9a6;
    --fixed-bg: rgba(255, 255, 255, 0.06);   --fixed-fg: #98a2b3;
    --changed-bg: rgba(251, 101, 20, 0.14); --changed-fg: #feb273;
    --security-bg: rgba(240, 68, 56, 0.14); --security-fg: #fda29b;
    --note-bg: rgba(247, 144, 9, 0.08); --note-border: rgba(247, 144, 9, 0.28); --note-fg: #fec84b;
    --header-bg: rgba(12, 17, 29, 0.8);
    --shadow-card: none;
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px #1d2939;
    --media-filter: brightness(0.9);
    --backdrop: rgba(0, 0, 0, 0.85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c111d;
  --surface: #101828;
  --surface-2: #1d2939;
  --hairline: #1d2939;
  --hairline-strong: #344054;
  --text: #f2f4f7;
  --text-2: #d0d5dd;
  --text-3: #98a2b3;
  --brand: #465fff;
  --brand-hover: #7592ff;
  --brand-text: #9cb9ff;
  --brand-soft: rgba(70, 95, 255, 0.14);
  --focus: #7592ff;
  --new-bg: rgba(70, 95, 255, 0.16);  --new-fg: #9cb9ff;
  --improved-bg: rgba(18, 183, 106, 0.14); --improved-fg: #6ce9a6;
  --fixed-bg: rgba(255, 255, 255, 0.06);   --fixed-fg: #98a2b3;
  --changed-bg: rgba(251, 101, 20, 0.14); --changed-fg: #feb273;
  --security-bg: rgba(240, 68, 56, 0.14); --security-fg: #fda29b;
  --note-bg: rgba(247, 144, 9, 0.08); --note-border: rgba(247, 144, 9, 0.28); --note-fg: #fec84b;
  --header-bg: rgba(12, 17, 29, 0.8);
  --shadow-card: none;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px #1d2939;
  --media-filter: brightness(0.9);
  --backdrop: rgba(0, 0, 0, 0.85);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-2);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
:where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; }
h1, h2, h3, h4 { color: var(--text); font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--text); }
a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -120px; z-index: 200;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-pop); font-weight: 500; font-size: 0.875rem; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  max-width: var(--page-max); height: 100%;
  margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.brand-logo { height: 22px; width: auto; }
.brand-logo.on-dark { display: none; }
:root[data-theme="dark"] .brand-logo.on-light { display: none; }
:root[data-theme="dark"] .brand-logo.on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo.on-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo.on-dark { display: block; }
}
.brand-divider { width: 1px; height: 18px; background: var(--hairline-strong); }
.brand-label { font-size: 0.9375rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-2);
  font: 500 0.875rem/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); }
.btn-icon { width: 36px; padding: 0; }
.theme-toggle svg { display: none; }
.theme-toggle:not([data-mode]) .ti-system,
.theme-toggle[data-mode="system"] .ti-system,
.theme-toggle[data-mode="light"] .ti-light,
.theme-toggle[data-mode="dark"] .ti-dark { display: block; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand-divider, .brand-label { display: none; }
  .header-actions .btn-label { display: none; }
  .header-actions .btn:not(.btn-icon) { width: 40px; padding: 0; }
  .btn { height: 40px; }
  .btn-icon { width: 40px; }
}

/* ── PAGE ── */
.page { max-width: var(--page-max); margin: 0 auto; padding: 56px var(--gutter) 96px; }
.eyebrow { font-size: 0.8125rem; font-weight: 500; color: var(--brand-text); letter-spacing: 0.01em; }
.page-hero { max-width: var(--measure); }
.page-hero h1 { margin-top: 8px; font-size: 2.75rem; line-height: 1.08; letter-spacing: -0.03em; }
.page-hero .lede { margin-top: 16px; font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); }
.hero-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .page { padding-top: 32px; }
  .page-hero h1 { font-size: 2.125rem; }
  .page-hero .lede { font-size: 1.0625rem; }
}

/* ── FILTER (area chips) ── */
.filters {
  margin-top: 40px; padding-bottom: 16px;
  display: flex; flex-wrap: wrap; gap: 8px;
  border-bottom: 1px solid var(--hairline);
}
.chip {
  height: 32px; padding: 0 12px;
  border: 1px solid var(--hairline); border-radius: var(--r-full);
  background: var(--surface); color: var(--text-2);
  font: 500 0.8125rem/1 var(--font); cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.chip:hover { border-color: var(--hairline-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filter-empty { margin-top: 32px; color: var(--text-3); }

/* ── TIMELINE (index) ── */
.month { margin-top: 48px; }
.month-title {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
}
.entry {
  display: grid; grid-template-columns: 152px minmax(0, 1fr); column-gap: 32px;
  margin-top: 24px;
}
.entry-date {
  position: sticky; top: calc(var(--header-h) + 24px); align-self: start;
  padding-top: 20px; font-size: 0.875rem; font-weight: 500; color: var(--text-3);
}
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.entry-card { position: relative; transition: border-color 150ms; }
.entry-card:hover { border-color: var(--hairline-strong); }
.entry-media { display: block; background: var(--surface-2); border-bottom: 1px solid var(--hairline); }
.entry-media img, .entry-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; filter: var(--media-filter); }
.entry-body { padding: 24px 28px 28px; }
.entry-title { margin-top: 12px; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.02em; }
.entry-title a { color: inherit; text-decoration: none; }
/* The whole card is the link target; the title link stretches over it. */
.entry-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.entry-title a:focus-visible { outline: none; }
.entry-card:has(.entry-title a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.entry-summary { margin-top: 10px; color: var(--text-2); }
.entry-points { margin-top: 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.entry-points li { position: relative; padding-left: 22px; font-size: 0.9375rem; line-height: 1.55; }
.entry-points li::before {
  content: ""; position: absolute; left: 4px; top: 0.6em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.read-more {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.9375rem; font-weight: 500; color: var(--brand-text);
}
.read-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms; }
.entry-card:hover .read-more svg { transform: translateX(2px); }
@media (max-width: 760px) {
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-date { position: static; padding: 0 0 8px; }
  .entry-body { padding: 20px; }
  .entry-title { font-size: 1.3125rem; }
}

/* ── TAGS ── */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: var(--r-full); font-size: 0.75rem; font-weight: 600; line-height: 1; white-space: nowrap;
}
.tag-new { background: var(--new-bg); color: var(--new-fg); }
.tag-improved { background: var(--improved-bg); color: var(--improved-fg); }
.tag-fixed, .tag-retired { background: var(--fixed-bg); color: var(--fixed-fg); }
.tag-changed { background: var(--changed-bg); color: var(--changed-fg); }
.tag-security { background: var(--security-bg); color: var(--security-fg); }
.tag-area, .tag-audience { border: 1px solid var(--hairline); color: var(--text-3); font-weight: 500; }

/* ── RELEASE (detail page) ── */
.release { max-width: var(--measure); margin: 0 auto; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-3); text-decoration: none;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.release-head { margin-top: 32px; }
.release-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.release-meta time { font-size: 0.875rem; font-weight: 500; color: var(--text-3); }
.release-head h1 { margin-top: 12px; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.03em; }
.release-head .lede { margin-top: 16px; font-size: 1.1875rem; line-height: 1.55; }
@media (max-width: 640px) {
  .release-head h1 { font-size: 2rem; }
  .release-head .lede { font-size: 1.0625rem; }
}

.toc { margin-top: 32px; padding: 20px 24px; }
.toc-title { font-size: 0.8125rem; font-weight: 600; color: var(--text-3); }
.toc ol { margin-top: 10px; padding: 0; list-style: none; display: grid; gap: 6px; }
.toc li { display: flex; align-items: center; gap: 10px; }
.toc a { color: var(--text); text-decoration: none; font-weight: 500; }
.toc a:hover { color: var(--brand-text); text-decoration: underline; }

.release-body { margin-top: 8px; }
.feature { padding-top: 48px; }
.feature + .feature { margin-top: 48px; border-top: 1px solid var(--hairline); }
.feature h2 { margin-top: 12px; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.02em; }
.feature h3 { margin-top: 28px; font-size: 1.0625rem; }
.feature p, .feature ul, .feature ol { margin-top: 14px; }
.feature ul, .feature ol, .more-list { padding-left: 1.25em; }
.feature li + li, .more-list li + li { margin-top: 6px; }
.feature li::marker { color: var(--text-3); }
.heading-anchor {
  margin-left: 8px; color: var(--text-3); text-decoration: none; font-weight: 400;
  opacity: 0; transition: opacity 150ms;
}
h2:hover .heading-anchor, .heading-anchor:focus-visible { opacity: 1; }
@media (hover: none) { .heading-anchor { display: none; } }

.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { position: relative; padding-left: 36px; min-height: 24px; }
.steps li + li { margin-top: 10px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-text);
  font-size: 0.75rem; font-weight: 600; line-height: 24px; text-align: center;
}
.ui { font-weight: 600; color: var(--text); }

.media { margin-top: 24px; }
/* A frame never stretches a screenshot past its own width; small shots sit centred. */
.media-frame {
  display: block; width: fit-content; max-width: 100%; margin: 0 auto; padding: 0;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface-2); overflow: hidden; cursor: zoom-in;
}
.media-frame img, .media-frame video { width: auto; max-width: 100%; filter: var(--media-filter); }
video.media-frame { cursor: default; }
.media figcaption { margin-top: 10px; font-size: 0.875rem; line-height: 1.5; color: var(--text-3); text-align: center; }
/* Tall shots of the Outlook pane or a chat card stay phone-sized. */
.media.pane .media-frame { max-width: 360px; }
/* Two shots side by side (steps, before/after); stacks on phones. */
.media-row { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.media-row .media { margin-top: 0; }
@media (max-width: 560px) { .media-row { grid-template-columns: minmax(0, 1fr); } }
/* A teaser or clip at the top of a release, under the lede. */
.release-hero { margin-top: 32px; }
.release-hero video, .release-hero img { width: 100%; }
/* Index cards: a clip's poster with a play badge, so readers know there is motion inside. */
.entry-media { position: relative; }
.entry-media.has-video::after {
  content: ""; position: absolute; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(16, 24, 40, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 7.5v9l7.5-4.5z'/%3E%3C/svg%3E") center / 22px no-repeat;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
/* Wider than the text column on big screens, so screenshots stay legible. */
@media (min-width: 1000px) { .media.wide { margin-left: -80px; margin-right: -80px; } }

.note {
  margin-top: 20px; padding: 14px 16px;
  border: 1px solid var(--note-border); border-radius: var(--r-md);
  background: var(--note-bg); color: var(--text-2); font-size: 0.9375rem;
}
.note strong { color: var(--note-fg); }
.learn-more { margin-top: 20px !important; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.9375rem; font-weight: 500; }
.learn-more a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.learn-more a:hover { text-decoration: underline; }
.learn-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.more { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--hairline); }
.more h2 { font-size: 1.25rem; letter-spacing: -0.01em; }
.more .tags { margin-top: 0; }
.more-head { display: flex; align-items: center; gap: 10px; }
.more-list { margin-top: 14px; }
.more + .more { margin-top: 40px; padding-top: 0; border-top: 0; }

.feedback {
  margin-top: 64px; padding: 24px 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.feedback p { color: var(--text-2); }
.feedback strong { display: block; }

.pager { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a {
  display: block; padding: 16px 20px; border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; transition: border-color 150ms;
}
.pager a:hover { border-color: var(--hairline-strong); }
.pager span { display: block; font-size: 0.8125rem; color: var(--text-3); }
.pager strong { display: block; margin-top: 2px; font-weight: 500; line-height: 1.4; }
.pager .next { grid-column: 2; text-align: right; }
@media (max-width: 640px) {
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}

/* ── LIGHTBOX ── */
.lightbox {
  max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; padding: 24px;
  border: 0; background: transparent; display: none; align-items: center; justify-content: center;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: var(--backdrop); }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; border-radius: var(--r-md); cursor: zoom-out; }
.lightbox-close { position: fixed; top: 16px; right: 16px; }

/* ── FOOTER ── */
.site-footer { border-top: 1px solid var(--hairline); }
.footer-inner {
  max-width: var(--page-max); margin: 0 auto; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  font-size: 0.875rem; color: var(--text-3);
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-inner a { color: var(--text-3); text-decoration: none; }
.footer-inner a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
