*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.block {
  display: block;
}

.flex {
  display: flex;
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

/* ============================================================
   THE BRIEF — Design System Tokens (Copied from Resume)
   ============================================================ */

:root {
  /* Brand Yellow */
  --yellow-100: #FFF8CC;
  --yellow-200: #FFEE80;
  --yellow-300: #FFE033;
  --yellow-400: #FFD700;
  --yellow-500: #E6C000;
  --yellow-600: #B89600;
  --yellow-700: #7A6400;
  /* Black Scale */
  --black-0:   #FFFFFF;
  --black-50:  #F5F5F5;
  --black-100: #E8E8E8;
  --black-200: #C4C4C4;
  --black-300: #8A8A8A;
  --black-400: #555555;
  --black-500: #2E2E2E;
  --black-600: #1A1A1A;
  --black-700: #111111;
  --black-800: #0A0A0A;
  --black-900: #000000;
  /* Cyan Accent */
  --cyan-100: #CCFBF6;
  --cyan-200: #80F0E6;
  --cyan-300: #33E5D4;
  --cyan-400: #00D4C2;
  --cyan-500: #00A898;
  /* Lavender Accent */
  --lavender-100: #F0E8FF;
  --lavender-200: #D4BBFF;
  --lavender-300: #B57BFF;
  --lavender-400: #9B52FF;
  --lavender-500: #7A2FCC;
  /* Semantic Tokens — Backgrounds */
  --bg-primary:    var(--black-800);
  --bg-secondary:  var(--black-700);
  --bg-tertiary:   var(--black-600);
  --bg-inverse:    var(--yellow-400);
  --bg-code:       var(--black-600);
  /* Foregrounds */
  --fg-primary:    #FFFFFF;
  --fg-secondary:  var(--black-200);
  --fg-muted:      var(--black-300);
  --fg-inverse:    var(--black-800);
  /* Accent */
  --accent-primary:   var(--yellow-400);
  --accent-cyan:      var(--cyan-400);
  --accent-lavender:  var(--lavender-300);
  /* Borders */
  --border-subtle:  rgba(255,255,255,0.07);
  --border-default: rgba(255,255,255,0.15);
  --border-accent:  var(--yellow-400);
  /* Typography */
  --font-display:  'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body:     'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif:    'Newsreader', Georgia, serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;
  /* Font Sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.5rem;
  --text-5xl:  5rem;
  /* Font Weights */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;
  --weight-black:   900;
  /* Line Heights */
  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.5;
  --leading-relaxed:1.7;
  /* Letter Spacing */
  --tracking-wide:   0.05em;
  --tracking-wider:  0.1em;
  --tracking-widest: 0.2em;
  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;
  /* Layout */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;
  --container-2xl:  1400px;
  /* Nav */
  --bg-nav:         rgba(10,10,10,0.95);
  --nav-border:     rgba(255,255,255,0.07);
  /* Accent text (legible version of accent-primary on current bg) */
  --accent-text:    var(--yellow-400);
  /* Status Colors */
  --status-green-bg:     rgba(74, 222, 128, 0.15);
  --status-green-text:   #4ade80;
  --status-gray-bg:      rgba(255, 255, 255, 0.08);
  --status-gray-text:    var(--black-300);
  /* Badge colors (per category) */
  --badge-yellow-text:   #FFD700;
  --badge-yellow-bg:     rgba(255,215,0,0.12);
  --badge-yellow-border: rgba(255,215,0,0.4);
  --badge-cyan-text:     #00D4C2;
  --badge-cyan-bg:       rgba(0,212,194,0.12);
  --badge-cyan-border:   rgba(0,212,194,0.4);
  --badge-lav-text:      #B57BFF;
  --badge-lav-bg:        rgba(181,123,255,0.12);
  --badge-lav-border:    rgba(181,123,255,0.4);
  --badge-green-text:    #4ade80;
  --badge-green-bg:      rgba(74,222,128,0.12);
  --badge-green-border:  rgba(74,222,128,0.4);
}

/* ─── LIGHT MODE OVERRIDES ──────────────────────────────── */

[data-theme="light"] {
  --bg-primary:    #FAF8F4;
  --bg-secondary:  #FFFFFF;
  --bg-tertiary:   #F0EDE5;
  --bg-code:       #F0EDE5;
  --fg-primary:    #0A0A0A;
  --fg-secondary:  #2E2E2E;
  --fg-muted:      #6B6B6B;
  --accent-primary:   #FFD700;
  --accent-text:      #7A6400;
  --accent-cyan:      #007A6F;
  --accent-lavender:  #6D28B0;
  --border-subtle:  rgba(0,0,0,0.08);
  --border-default: rgba(0,0,0,0.18);
  --border-accent:  #7A6400;
  --bg-nav:     rgba(250,248,244,0.96);
  --nav-border: rgba(0,0,0,0.08);
  --status-green-bg:     rgba(22, 101, 52, 0.10);
  --status-green-text:   #166534;
  --status-gray-bg:      rgba(0, 0, 0, 0.06);
  --status-gray-text:    #6B6B6B;
  --badge-yellow-text:   #7A6400;
  --badge-yellow-bg:     rgba(122,100,0,0.08);
  --badge-yellow-border: rgba(122,100,0,0.25);
  --badge-cyan-text:     #007A6F;
  --badge-cyan-bg:       rgba(0,122,111,0.08);
  --badge-cyan-border:   rgba(0,122,111,0.25);
  --badge-lav-text:      #6D28B0;
  --badge-lav-bg:        rgba(109,40,176,0.08);
  --badge-lav-border:    rgba(109,40,176,0.25);
  --badge-green-text:    #166534;
  --badge-green-bg:      rgba(22,101,52,0.08);
  --badge-green-border:  rgba(22,101,52,0.25);
}

/* ─── BASE STYLES ───────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── TYPOGRAPHY UTILITY CLASSES ────────────────────────── */

.ds-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent-text);
}

.ds-h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  color: var(--fg-primary);
}

.ds-h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--fg-primary);
}

.ds-h3 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--fg-primary);
}

.ds-h4 {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  color: var(--fg-primary);
}

.ds-body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--fg-secondary);
}

.ds-body-lg {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--fg-secondary);
}

.ds-caption {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: var(--leading-normal);
}

/* ─── COMPONENT UTILITIES ───────────────────────────────── */

.ds-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

/* ─── DIGEST CONTENT (Serif & Readability) ──────────────── */

.digest-content {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--fg-secondary);
  max-width: 720px;
  /* Optimal line length constraint */
}

.digest-content strong {
  color: var(--fg-primary);
  font-weight: 600;
}

.digest-content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.digest-content a:hover {
  color: var(--fg-primary);
  text-decoration-color: var(--fg-primary);
}

.digest-content ul {
  padding-left: var(--space-5);
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.digest-content li {
  margin-bottom: var(--space-2);
}

/* ─── STICKY NAV ────────────────────────────────────────── */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  padding: var(--space-3) 0;
  margin-bottom: var(--space-8);
  display: flex;
  gap: var(--space-6);
}

.nav-sticky a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: color 0.15s ease;
}

.nav-sticky a:hover {
  color: var(--fg-primary);
}

/* ─── STATUS CHIP ───────────────────────────────────────── */

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.status-chip.active {
  background-color: var(--status-green-bg);
  color: var(--status-green-text);
}

.status-chip.empty {
  background-color: var(--status-gray-bg);
  color: var(--status-gray-text);
}

/* ─── BUTTONS ───────────────────────────────────────────── */

.btn-utility {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-utility:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg-primary);
}

/* ─── DASHBOARD LAYOUT ───────────────────────────────────────── */

html, body {
  height: 100%;
  overflow: hidden;
}

.brief-main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 16px;
  box-sizing: border-box;
}

.brief-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.brief-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── TOP PANEL (1/3) ────────────────────────────────────────── */

.brief-top-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  overflow: hidden;
}

.brief-top-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.top-stories-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.top-stories-scroll ol {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px 48px;
  counter-reset: story-counter;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.top-stories-scroll li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--fg-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

/* Legacy counter for old-format items (no .transformed class) */

.top-stories-scroll li:not(.transformed) {
  counter-increment: story-counter;
}

.top-stories-scroll li:not(.transformed)::before {
  content: counter(story-counter, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--badge-yellow-text);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
  opacity: 0.8;
}

.top-stories-scroll li strong {
  color: var(--fg-primary);
  font-weight: 600;
}

.top-stories-scroll li a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.top-stories-scroll li a:hover {
  color: var(--fg-primary);
  text-decoration-color: var(--fg-primary);
}

/* New-format top story elements */

.story-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--badge-yellow-text);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
  opacity: 0.8;
  text-decoration: none;
}

.story-num:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.story-title {
  cursor: pointer;
  color: var(--fg-primary);
  font-weight: 600;
  flex: 1;
  font-family: var(--font-serif);
}

.story-title:hover {
  color: var(--accent-primary);
}

.story-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--fg-secondary);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
}

.story-tip.visible {
  display: block;
}

/* ─── BOTTOM PANEL (2/3) — 4 columns ────────────────────────── */

.brief-bottom-panel {
  flex: 2;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.brief-category-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow: hidden;
}

.brief-category-col .col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.col-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.col-digest {
  font-family: var(--font-serif);
  font-size: var(--text-sm) !important;
  line-height: 1.65 !important;
  color: var(--fg-secondary);
  max-width: none !important;
}

.col-digest strong {
  color: var(--fg-primary);
  font-weight: 600;
}

.col-digest a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.col-digest a:hover {
  color: var(--fg-primary);
  text-decoration-color: var(--fg-primary);
}

.col-digest ol, .col-digest ul {
  padding-left: 1.1rem;
  margin: 0;
}

.col-digest li {
  margin-bottom: 8px;
}

.col-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* ─── LEGACY GRID (unused, kept for reference) ───────────────── */

.brief-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: 64px;
}

.brief-full {
  width: 100%;
}

/* ─── AI DAILY DIGEST LAYOUT ─────────────────────────────── */

html,
body {
  margin: 0;
  min-height: 100vh;
  height: auto;
  overflow: auto;
}

.brief-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 28px;
}

.brief-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 4px 0 0;
}

.brief-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.brief-header-actions {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.brief-header-link {
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding-bottom: 9px;
}

.brief-header-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ds-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--fg-muted);
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ds-theme-toggle:hover,
.ds-theme-toggle:focus-visible {
  border-color: var(--accent-text);
  color: var(--accent-text);
  outline: none;
}

.theme-icon {
  line-height: 0;
}

.theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: inline-flex;
}

.edition-hero {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  min-height: 0;
}

.edition-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.edition-status,
.freshness-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.freshness-stack {
  align-items: flex-end;
  text-align: right;
}

.markdown-digest {
  font-family: var(--font-serif);
  color: var(--fg-secondary);
  font-size: var(--text-base);
  line-height: 1.75;
  max-width: 860px;
}

.markdown-digest h1,
.markdown-digest h2,
.markdown-digest h3 {
  font-family: var(--font-display);
  color: var(--fg-primary);
  letter-spacing: 0;
  margin: 22px 0 10px;
}

.markdown-digest h1 {
  font-size: var(--text-2xl);
}

.markdown-digest h2 {
  font-size: var(--text-xl);
}

.markdown-digest h3 {
  font-size: var(--text-lg);
}

.markdown-digest p {
  margin: 0 0 16px;
}

.markdown-digest ul {
  margin: 0 0 20px;
  padding-left: 1.2rem;
}

.markdown-digest li {
  margin-bottom: 10px;
  padding-left: 2px;
}

.markdown-digest strong {
  color: var(--fg-primary);
  font-weight: 650;
}

.markdown-digest a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-default);
  text-underline-offset: 3px;
}

.markdown-digest a:hover {
  color: var(--fg-primary);
  text-decoration-color: var(--fg-primary);
}

.markdown-digest em {
  color: var(--fg-muted);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.82em;
}

.markdown-digest hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 22px 0;
}

.edition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.edition-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.edition-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.edition-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin: 0;
}

.edition-card p {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  margin: 3px 0 0;
}

.edition-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  margin-bottom: 14px;
}

.edition-story-list {
  counter-reset: edition-story;
  list-style: none;
  margin: 0;
  padding: 0;
}

.edition-story-list li {
  counter-increment: edition-story;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.edition-story-list li::before {
  content: counter(edition-story, decimal-leading-zero);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-bold);
}

.edition-story-list a {
  color: inherit;
  text-decoration: none;
}

.edition-story-list a:hover {
  color: var(--fg-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.edition-theme-list {
  margin-top: 14px;
}

.edition-theme-list > span {
  display: block;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.edition-theme-list ul {
  margin: 0;
  padding-left: 1rem;
}

.edition-theme-list li {
  color: var(--fg-muted);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: 6px;
}

.edition-preview {
  max-height: 360px;
  overflow-y: auto;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--fg-secondary);
  flex: 1;
  min-height: 0;
  padding-right: 6px;
}

.edition-preview h1,
.edition-preview h2,
.edition-preview h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--fg-primary);
  margin: 12px 0 6px;
}

.edition-preview ul {
  padding-left: 1rem;
  margin: 0 0 10px;
}

.edition-preview li {
  margin-bottom: 6px;
}

.edition-card details {
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.edition-card summary {
  cursor: pointer;
  color: var(--badge-yellow-text);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.edition-full {
  margin-top: auto;
}

.edition-full[open] {
  margin-top: 16px;
}

.edition-card details ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.edition-card-link {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  margin-top: 10px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  text-transform: uppercase;
}

.edition-card-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.edition-card details li {
  margin-bottom: 6px;
}

.edition-card details a {
  color: var(--fg-muted);
  font-size: var(--text-xs);
  text-decoration: none;
}

.edition-card details a:hover {
  color: var(--fg-primary);
  text-decoration: underline;
}

.empty-copy {
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.brief-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.brief-footer a {
  color: inherit;
  text-decoration: none;
}

.brief-footer a:hover {
  color: var(--fg-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.archive-list {
  display: grid;
  gap: 14px;
}

.archive-row {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.archive-row-main,
.archive-row-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.archive-date {
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.archive-row h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  margin: 0;
}

.archive-row h2 a {
  color: var(--fg-primary);
  text-decoration: none;
}

.archive-row h2 a:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.archive-preview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.archive-preview-list li {
  color: var(--fg-secondary);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.archive-row-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.archive-row-footer a {
  color: var(--accent-text);
  text-decoration: none;
}

.archive-row-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .brief-shell {
    width: min(100vw - 24px, 720px);
    padding-top: 20px;
  }

  .brief-header {
    align-items: flex-start;
    gap: 12px;
  }

  .brief-clock {
    align-items: flex-start;
  }

  .brief-header-actions {
    align-items: flex-start;
  }

  .brief-header-link {
    padding-bottom: 0;
    padding-top: 9px;
  }

  .edition-hero {
    padding: 22px 18px;
    min-height: auto;
  }

  .markdown-digest {
    max-width: none;
    font-size: var(--text-sm);
  }

  .markdown-digest h1 {
    font-size: var(--text-xl);
  }

  .edition-meta,
  .brief-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .freshness-stack {
    align-items: flex-start;
    text-align: left;
  }

  .edition-grid {
    grid-template-columns: 1fr;
  }

  .archive-row-main,
  .archive-row-footer {
    flex-direction: column;
  }

  .archive-preview-list {
    grid-template-columns: 1fr;
  }
}
