:root {
  color-scheme: light;
  --paper: #f5f2ed;
  --surface: #fffdfa;
  --surface-muted: #ebe7e0;
  --ink: #17191d;
  --ink-soft: #42464b;
  --muted: #7b7c7c;
  --line: #dfdbd4;
  --line-strong: #c9c4bb;
  --accent: #f26543;
  --accent-deep: #db4d31;
  --navy: #191d28;
  --positive: #7e9a87;
  --warning: #a16c25;
  --danger: #b64f3a;
  --font-ui: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  --font-display: "Segoe UI Variable", "Segoe UI", Aptos, sans-serif;
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 5% 0%, rgba(242, 101, 67, .055), transparent 27rem),
    var(--paper);
  font-size: 14px;
}
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(242, 101, 67, .4);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.skip-link {
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 9px 12px;
  color: white;
  background: var(--navy);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  width: min(1380px, calc(100% - 80px));
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-bottom: 1px solid var(--line-strong);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 27px;
  height: 25px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  padding: 0 4px 3px;
  border-bottom: 2px solid var(--accent);
}
.brand-mark i { width: 3px; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; }
.brand-name { font-size: 12px; font-weight: 750; letter-spacing: .08em; }
.brand-name span { margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; }

.main-content { width: min(1380px, calc(100% - 80px)); margin: 0 auto; }
.intro {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: end;
  gap: 48px;
  padding: 43px 0 38px;
  border-bottom: 1px solid var(--line-strong);
}
.intro-copy { position: relative; min-width: 0; transform: translateY(-14px); }
.intro-index { display: flex; gap: 18px; margin: 0 0 19px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.intro-index span:first-child { color: var(--accent-deep); }
.intro h1 {
  display: grid;
  gap: 0;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(76px, 10.3vw, 146px);
  font-weight: 740;
  line-height: .76;
  letter-spacing: -.09em;
  text-wrap: nowrap;
}
.intro h1 span:first-child { color: var(--accent); }
.intro h1 span:last-child { padding-left: .04em; }
.audience-panel {
  position: relative;
  min-height: 0;
  align-self: center;
  padding: 0;
  color: var(--ink);
}
.audience-question {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.audience-picker {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.audience-option {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 13px 15px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-soft);
  text-align: left;
  background: rgba(255, 253, 250, .62);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.audience-option:hover { border-color: var(--line-strong); background: var(--surface); transform: translateY(-1px); }
.audience-option.selected {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface);
}
.audience-option-head { display: flex; align-items: center; justify-content: space-between; }
.audience-index { color: var(--muted); font-size: 10px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.audience-indicator {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color .2s ease;
}
.audience-indicator::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: scale(0);
  transition: transform .2s ease;
}
.audience-option.selected .audience-indicator { border-color: var(--accent); }
.audience-option.selected .audience-indicator::after { transform: scale(1); }
.audience-option-copy { display: grid; align-content: end; gap: 5px; }
.audience-option strong { color: var(--ink); font-size: 13px; font-weight: 680; line-height: 1.35; }
.audience-description { max-width: 30ch; color: var(--muted); font-size: 11px; line-height: 1.45; }

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "sources"
    "topics"
    "profile"
    "period";
  align-items: start;
  padding: 21px 0 18px;
  border-bottom: 1px solid var(--line-strong);
}
.period-picker { width: min(100%, 450px); display: grid; grid-template-columns: 1fr; gap: 6px; }
.control-label, .criteria-summary-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.source-form input, .source-form select, .criterion-name, .priority-input {
  min-width: 0;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12px;
  transition: border-color .17s, box-shadow .17s;
}
select:hover, input:hover { border-color: var(--accent); }
.source-section { grid-area: sources; min-width: 0; margin-bottom: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 253, 250, .58); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.section-heading h2, .results-heading h2 { margin: 0; font-size: 14px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.source-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 15px; }
.text-button { position: relative; isolation: isolate; padding: 7px 10px; border: 0; border-radius: 5px; color: var(--accent-deep); background: transparent; font-size: 12px; font-weight: 600; transition: color .18s; }
.text-button::before { position: absolute; z-index: -1; inset: -17px -24px; border-radius: 50%; background: radial-gradient(ellipse, rgba(242, 101, 67, .32) 0%, rgba(242, 101, 67, .17) 34%, rgba(242, 101, 67, 0) 73%); content: ""; filter: blur(12px); opacity: 0; pointer-events: none; transform: scale(.78); transition: opacity .22s, transform .28s cubic-bezier(.2,.8,.2,1); }
.text-button:hover, .text-button:focus-visible { color: #c74429; text-decoration: none; }
.text-button:hover::before, .text-button:focus-visible::before { opacity: 1; transform: scale(1); }
.text-button-muted { color: var(--muted); font-weight: 500; }
.source-list { width: 100%; min-height: 32px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.source-loading { padding: 8px 0; color: var(--muted); font-size: 11px; }
.source-chip {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 250, .78);
  transition: border-color .17s, box-shadow .17s, transform .17s;
}
.source-chip:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(35, 32, 27, .06); transform: translateY(-1px); }
.source-chip-name { min-width: 0; max-width: 48%; display: inline-flex; align-items: center; gap: 7px; flex: 0 1 auto; overflow: hidden; color: var(--ink-soft); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.source-chip-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--positive); }
.source-chip-separator { flex: 0 0 auto; color: var(--line-strong); font-size: 10px; }
.source-chip-url { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 450; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; opacity: .82; transition: color .15s, opacity .15s; }
.source-chip-url:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; opacity: 1; }
.icon-button { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 23px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; transition: color .14s, background-color .14s, transform .14s; }
.icon-button:hover { color: white; background: var(--danger); transform: rotate(-8deg); }
.icon-button svg { width: 12px; height: 12px; }
.discovery-option { width: 100%; display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding-top: 11px; border-top: 1px solid var(--line); cursor: pointer; }
.discovery-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-checkbox { width: 15px; height: 15px; display: grid; place-items: center; flex: 0 0 15px; margin-top: 1px; border: 1px solid #a8a49b; border-radius: 3px; background: var(--surface); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.custom-checkbox::after { content: "✓"; color: white; font-size: 10px; font-weight: 700; opacity: 0; }
.discovery-option input:checked + .custom-checkbox { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px rgba(242, 101, 67, .12); }
.discovery-option input:checked + .custom-checkbox::after { opacity: 1; }
.discovery-option input:focus-visible + .custom-checkbox { outline: 3px solid rgba(242, 101, 67, .3); outline-offset: 2px; }
.discovery-copy strong { display: block; font-size: 12px; font-weight: 550; }
.inline-form-wrap { margin-top: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.source-form { display: grid; grid-template-columns: minmax(180px, .72fr) minmax(280px, 1.28fr) auto; align-items: start; gap: 9px; }
.source-form label { display: grid; gap: 4px; color: var(--ink-soft); font-size: 10px; font-weight: 550; }
.source-form input, .source-form select { width: 100%; height: 35px; font-size: 11px; }
.source-form label.has-error input { border-color: var(--danger); background: #fffaf8; box-shadow: 0 0 0 3px rgba(182, 79, 58, .1); }
.field-error { min-height: 13px; display: flex; align-items: center; gap: 5px; color: var(--danger); font-size: 9px; font-weight: 520; line-height: 1.3; }
.field-error::before { width: 12px; height: 12px; display: grid; place-items: center; flex: 0 0 12px; border-radius: 50%; color: var(--danger); background: rgba(182, 79, 58, .12); content: "!"; font-size: 8px; font-weight: 750; }
.field-error[hidden] { display: none; }
.small-primary { min-height: 35px; padding: 0 13px; border: 0; border-radius: 3px; color: white; background: var(--accent-deep); font-size: 11px; font-weight: 650; transition: box-shadow .18s, transform .18s, background-color .18s; }
.source-form > .small-primary { margin-top: 18px; }
.small-primary:hover { background: var(--accent); box-shadow: 0 5px 16px rgba(242, 101, 67, .23); transform: translateY(-1px); }
.small-primary:disabled { opacity: .6; cursor: wait; }

.period-section { grid-area: period; min-width: 0; padding: 12px 0 15px; border-bottom: 1px solid var(--line); }
.period-dropdown { position: relative; }
.period-trigger { width: 100%; min-height: 39px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink-soft); background: var(--surface); font: 550 12px/1.2 var(--font-ui); letter-spacing: -.01em; text-align: left; transition: border-color .16s, box-shadow .16s, background-color .16s; }
.period-trigger:hover, .period-dropdown.is-open .period-trigger { border-color: var(--accent); }
.period-dropdown.is-open .period-trigger { box-shadow: 0 0 0 3px rgba(242, 101, 67, .1); }
.period-chevron { width: 7px; height: 7px; flex: 0 0 7px; margin: -4px 2px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .16s, margin .16s; }
.period-dropdown.is-open .period-chevron { margin-top: 4px; transform: rotate(225deg); }
.period-options { position: absolute; z-index: 12; top: calc(100% + 6px); right: 0; left: 0; display: grid; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: 0 10px 28px rgba(38, 34, 29, .13); }
.period-option { width: 100%; min-height: 33px; padding: 7px 9px; border: 0; border-radius: 3px; color: var(--ink-soft); background: transparent; font: 500 12px/1.25 var(--font-ui); text-align: left; cursor: pointer; transition: color .14s, background-color .14s; }
.period-option:hover, .period-option:focus-visible { color: var(--accent-deep); background: #f8eee8; outline: none; }
.period-option.selected { color: var(--accent-deep); background: #f8eee8; }
.criteria-section { grid-area: topics; min-width: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.criteria-section > summary { min-height: 43px; display: grid; grid-template-columns: 1fr 32px; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.criteria-section > summary::-webkit-details-marker { display: none; }
.summary-chevron { width: 28px; height: 28px; display: grid; place-items: center; justify-self: end; border-radius: 50%; color: var(--ink-soft); background: rgba(23, 25, 29, .055); transition: color .18s, background-color .18s, transform .2s; }
.summary-chevron::before { width: 8px; height: 8px; margin-top: -4px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; content: ""; transform: rotate(45deg); }
.criteria-section > summary:hover .summary-chevron { color: var(--accent-deep); background: #f8e9e2; }
.criteria-section[open] .summary-chevron { color: var(--accent-deep); background: #f8e9e2; transform: rotate(180deg); }
.personalization-section { grid-area: profile; min-width: 0; margin-top: 15px; }
.profile-heading { margin: 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.profile-settings { width: min(100%, 1040px); display: grid; grid-template-columns: minmax(210px, .78fr) minmax(340px, 1.22fr); align-items: start; gap: clamp(28px, 5vw, 70px); }
.profile-intro { display: grid; align-content: start; gap: 8px; }
.profile-intro .profile-heading { font-size: 15px; letter-spacing: -.025em; }
.profile-note { max-width: 34ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.profile-controls { width: min(100%, 560px); min-width: 0; display: grid; align-content: start; gap: 13px; }
.profile-email-field { width: 100%; min-width: 0; display: grid; gap: 6px; }
.profile-email-label { display: flex; align-items: baseline; gap: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.profile-required { color: var(--muted); font-size: 9px; font-weight: 500; }
.profile-email-input { width: 100%; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); background: var(--surface); font: 500 12px/1.25 var(--font-ui); transition: border-color .16s, box-shadow .16s; }
.profile-email-input::placeholder { color: var(--muted); opacity: .76; }
.profile-email-input:hover { border-color: var(--accent); }
.profile-email-input:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(242, 101, 67, .1); }
.daily-subscription-option { align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
.daily-subscription-option .custom-checkbox { margin-top: 0; }
.daily-subscription-copy { display: block; transform: translateY(-2px); }
.daily-subscription-copy strong { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.profile-status { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.profile-status:empty { display: none; }
.profile-status.error { color: var(--danger); }
.criteria-content { padding: 0 0 13px; }
.criteria-table-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(90px, .65fr) 28px; gap: 7px; padding: 0 0 6px; color: var(--muted); font-size: 9px; font-weight: 600; }
.criteria-rows { display: grid; gap: 8px; }
.criteria-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(90px, .65fr) 28px; align-items: start; gap: 7px; padding: 0 0 8px; border-bottom: 1px solid var(--line); background: transparent; }
.criterion-group-field { grid-column: 1; min-width: 0; }
.criterion-group-label { display: none; }
.criterion-name { width: 100%; height: 34px; color: var(--ink-soft); font-size: 11px; font-weight: 550; }
.criteria-values { grid-column: 2 / 4; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr); align-content: start; gap: 5px 7px; }
.priority-input-wrap { position: relative; min-width: 0; }
.priority-input-wrap.priority-menu-open { z-index: 14; }
.priority-dropdown { position: relative; min-width: 0; }
.priority-trigger { width: 100%; height: 33px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 31px 0 11px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ink-soft); background: var(--surface); font: 500 10px/1.2 var(--font-ui); text-align: left; cursor: pointer; transition: border-color .16s, box-shadow .16s, background-color .16s; }
.priority-trigger:hover, .priority-dropdown.is-open .priority-trigger { border-color: var(--accent); }
.priority-dropdown.is-open .priority-trigger { box-shadow: 0 0 0 3px rgba(242, 101, 67, .1); }
.priority-chevron { width: 7px; height: 7px; flex: 0 0 7px; margin: -4px 2px 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .16s, margin .16s; }
.priority-dropdown.is-open .priority-chevron { margin-top: 4px; transform: rotate(225deg); }
.priority-options { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; left: 0; display: grid; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: 0 10px 28px rgba(38, 34, 29, .13); }
.priority-option { width: 100%; min-height: 31px; padding: 6px 9px; border: 0; border-radius: 3px; color: var(--ink-soft); background: transparent; font: 500 11px/1.25 var(--font-ui); text-align: left; cursor: pointer; transition: color .14s, background-color .14s; }
.priority-option:hover, .priority-option:focus-visible { color: var(--accent-deep); background: #f8eee8; outline: none; }
.priority-option.selected { color: var(--accent-deep); background: #f8eee8; }
.priority-input { width: 100%; height: 33px; padding-right: 31px; color: var(--ink-soft); font-size: 10px; }
.parameter-input { padding-right: 11px; }
.priority-input::placeholder { color: #8c8a84; }
.priority-remove { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.priority-remove:hover, .remove-criterion:hover { color: var(--danger); background: #f5e9e4; }
.priority-remove span { font-size: 15px; line-height: 1; }
.add-priority { grid-column: 1 / -1; min-height: 30px; padding: 0 7px; border: 1px dashed var(--line-strong); border-radius: 3px; color: var(--accent-deep); background: transparent; font-size: 10px; text-align: left; }
.add-priority:hover { border-color: var(--accent); background: #fff2ed; }
.remove-criterion { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.remove-criterion svg { width: 14px; height: 14px; }
.add-criterion { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 0; border: 0; color: var(--accent-deep); background: transparent; font-size: 10px; font-weight: 620; }
.add-criterion span { font-size: 15px; }
.add-criterion:hover { text-decoration: underline; text-underline-offset: 3px; }
.run-footer { display: flex; justify-content: center; padding: 21px 0 6px; }
.run-area { width: min(100%, 440px); display: grid; align-content: center; gap: 6px; }
.run-button {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px 16px;
  border: 0;
  border-radius: 4px;
  color: white;
  background: var(--accent-deep);
  text-align: center;
  box-shadow: 0 7px 16px rgba(219, 77, 49, .15);
  transition: background-color .18s, box-shadow .18s, transform .18s;
}
.run-button::after { position: absolute; inset: -1px; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.2) 48%, transparent 61%); content: ""; transform: translateX(-115%); transition: transform .65s ease; }
.run-button:hover { background: var(--accent); box-shadow: 0 9px 23px rgba(219, 77, 49, .24); transform: translateY(-2px); }
.run-button:hover::after { transform: translateX(115%); }
.run-button:disabled { opacity: .72; cursor: wait; transform: none; }
.run-button-copy { position: relative; z-index: 1; display: grid; gap: 3px; }
.run-button-copy strong { font-size: 14px; font-weight: 650; }
.run-status { min-height: 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }
.run-status:not(:empty) { margin-top: 2px; }
.run-status.error { color: var(--danger); }

.results-section {
  min-width: 0;
  margin: 19px 0 0;
  padding: 25px 28px 28px;
  border: 1px solid rgba(201, 196, 187, .75);
  border-radius: 4px 40px 4px 4px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(42, 39, 34, .035);
}
.digest-loading {
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
}
.postman-scene {
  position: relative;
  flex: 0 0 clamp(144px, 16vw, 190px);
  width: clamp(144px, 16vw, 190px);
  aspect-ratio: 1;
  animation: postman-arrives 5.8s ease-in-out infinite;
}
.postman-illustration {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.postman-flight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.postman-flight-path {
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: .55;
  stroke-dasharray: 1.2 1.6;
  opacity: .48;
}
.postman-envelope rect {
  fill: #fff9e8;
  stroke: #bb8b39;
  stroke-width: .45;
}
.postman-envelope path {
  fill: none;
  stroke: #bb8b39;
  stroke-width: .4;
}
.digest-loading-copy { display: grid; gap: 5px; }
.digest-loading-copy .section-eyebrow { margin-bottom: 1px; }
.digest-loading-copy strong { font-size: 18px; font-weight: 680; letter-spacing: -.03em; }
.digest-loading-copy > span:last-child { max-width: 38ch; color: var(--muted); font-size: 12px; line-height: 1.5; }
@keyframes postman-arrives {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .audience-option,
  .audience-indicator,
  .audience-indicator::after { transition: none; }
  .audience-option:hover { transform: none; }
  .postman-scene { animation: none; }
  .postman-envelope { display: none; }
}
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.section-eyebrow { margin: 0 0 4px; color: var(--accent-deep); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.results-heading h2 { font-size: 25px; font-weight: 680; letter-spacing: -.055em; }
.results-tools { display: flex; align-items: center; gap: 12px; }
.result-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.export-button { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ink-soft); background: transparent; font-size: 10px; font-weight: 570; transition: border-color .16s, background-color .16s, transform .16s; }
.export-button:hover { border-color: var(--accent); background: #fff2ed; transform: translateY(-1px); }
.export-button span { margin-left: 4px; color: var(--accent-deep); }
.article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.article-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(35, 32, 27, .025);
  transition: border-color .2s, box-shadow .24s, transform .24s;
}
.article-card:hover { border-color: #c7bfb4; box-shadow: 0 14px 32px rgba(35, 32, 27, .1); transform: translateY(-3px); }
.article-feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(280px, .86fr) minmax(0, 1.14fr); min-height: 305px; }
.article-art {
  position: relative;
  min-height: 175px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #f0ede7, #dfdbd3);
}
.article-art::before {
  position: absolute;
  z-index: -1;
  inset: -15%;
  background: repeating-radial-gradient(circle at 78% 62%, transparent 0 23px, rgba(23,25,29,.1) 24px 25px);
  content: "";
  transform: rotate(-16deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.article-card:hover .article-art::before { transform: rotate(0) scale(1.08); }
.article-art::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(23,25,29,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(23,25,29,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  mask-image: linear-gradient(135deg, black, transparent 85%);
}
.article-art.has-image::before { opacity: .17; }
.article-art.has-image::after { opacity: .14; }
.article-art img { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.article-card:hover .article-art img { transform: scale(1.045); }
.article-art-kicker { position: absolute; z-index: 1; top: 16px; left: 17px; max-width: calc(100% - 34px); overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .12em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.article-art-index { position: absolute; z-index: 1; right: 17px; bottom: 4px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(76px, 9vw, 116px); font-weight: 400; font-variant-numeric: lining-nums tabular-nums; line-height: .78; letter-spacing: -.09em; }
.article-feature .article-art { height: 100%; min-height: 305px; }
.article-body { min-width: 0; display: flex; flex-direction: column; padding: 15px 16px 12px; }
.article-feature .article-body { padding: 24px 25px 18px; }
.article-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 18px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 9px; font-weight: 620; }
.badge-high { padding: 2px 7px; border-radius: 999px; color: #a94631; background: #fae8e1; }
.badge-medium { padding: 2px 7px; border-radius: 999px; color: #8b641f; background: #f5eddb; }
.badge-low { padding: 2px 7px; border-radius: 999px; color: #347351; background: #e7f0e9; }
.badge-category { padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: var(--paper); }
.badge-tag { padding: 3px 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 9px; }
.article-date { margin-left: auto; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.article-title { margin: 0; font-size: 16px; font-weight: 680; line-height: 1.32; letter-spacing: -.035em; text-wrap: pretty; }
.article-feature .article-title { max-width: 650px; font-size: clamp(20px, 2.1vw, 29px); line-height: 1.17; letter-spacing: -.055em; }
.article-title a { color: var(--ink); text-decoration: none; }
.article-title a:hover { color: var(--accent-deep); }
.article-summary { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.48; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-feature .article-summary { max-width: 720px; margin-top: 9px; font-size: 12px; -webkit-line-clamp: 3; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 9px; }
.article-source { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-weight: 550; }
.article-source::before { width: 5px; height: 5px; border-radius: 50%; background: #72967d; content: ""; }
.article-source-link { padding: 0; border: 0; color: #a65f3e; background: transparent; font: inherit; font-weight: 550; text-align: left; text-decoration: none; cursor: pointer; transition: color .15s; }
.article-source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.article-facts { margin-top: 9px; border-top: 1px solid var(--line); }
.article-facts summary { width: fit-content; padding-top: 7px; color: var(--accent-deep); cursor: pointer; font-size: 9px; font-weight: 600; }
.article-facts-list { display: grid; gap: 7px; padding-top: 8px; }
.article-fact { display: grid; grid-template-columns: minmax(110px, .3fr) 1fr; gap: 10px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.article-fact dt { font-weight: 650; }
.article-fact dd { margin: 0; }
.article-fact small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.article-footer { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: auto; padding-top: 10px; }
.feedback-label { margin-right: auto; color: var(--muted); font-size: 9px; }
.feedback-button { min-height: 26px; padding: 0 8px; border: 1px solid transparent; border-radius: 99px; color: var(--ink-soft); background: #f5f2ed; font-size: 9px; font-weight: 570; transition: color .16s, border-color .16s, background-color .16s, transform .16s; }
.feedback-button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.feedback-button.positive:hover { border-color: #bacbbc; color: #526b57; background: #e8eee8; }
.feedback-button.negative:hover { border-color: #d7b9b1; color: #9a5a4d; background: #f3e9e5; }
.feedback-button.selected.positive { border-color: #a9c3b4; color: #315f49; background: #eaf1ec; }
.feedback-button.selected.negative { border-color: #d4b3ae; color: #873e35; background: #f4eae8; }
.article-card.motion-in { animation: story-in .48s both; animation-delay: calc(min(var(--story-index, 0), 5) * 55ms); }
@keyframes story-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.empty-state { grid-column: 1 / -1; padding: 19px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; color: var(--muted); background: #f7f3ec; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.5; }

.markdown-output { margin: 22px 0 0; padding: 15px 0; border-top: 1px solid var(--line-strong); background: transparent; }
.markdown-output > summary { display: inline-block; color: var(--accent-deep); cursor: pointer; font-size: 11px; font-weight: 570; }
.markdown-actions { display: inline-block; margin-left: 15px; }
.markdown-output pre { max-height: 360px; overflow: auto; margin: 12px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); background: var(--surface); font: 11px/1.55 Consolas, monospace; white-space: pre-wrap; }
.toast { position: fixed; z-index: 10; right: 18px; bottom: 18px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: var(--surface); box-shadow: 0 7px 24px rgba(26, 45, 59, .12); font-size: 11px; line-height: 1.5; opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #d4b3ae; color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

body.motion-ready .motion-reveal { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.75,.25,1); }
body.motion-ready .motion-reveal.is-visible { opacity: 1; transform: translateY(0); }
button, .source-chip { -webkit-tap-highlight-color: transparent; }

@media (max-width: 980px) {
  .site-header, .main-content { width: min(100% - 48px, 850px); }
  .intro { grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 27px; min-height: 290px; }
  .intro h1 { font-size: clamp(70px, 10vw, 104px); }
  .audience-picker { grid-template-columns: 1fr; gap: 8px; }
  .audience-option { min-height: 82px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 8px; }
  .article-feature { grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); }
}

@media (max-width: 700px) {
  .site-header, .main-content { width: calc(100% - 32px); }
  .site-header { height: 59px; }
  .intro { grid-template-columns: 1fr; gap: 25px; min-height: 0; padding: 33px 0 26px; }
  .intro-copy { transform: none; }
  .intro-index { margin-bottom: 16px; font-size: 9px; }
  .intro h1 { font-size: clamp(64px, 15vw, 96px); }
  .audience-panel { width: 100%; }
  .audience-option { min-height: 52px; }
  .builder { grid-template-columns: minmax(0, 1fr); padding: 16px 0; }
  .source-form { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .source-form > .small-primary { grid-column: 2; justify-self: end; }
  .profile-settings { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .profile-intro .profile-note { max-width: 58ch; }
  .profile-controls, .profile-email-field { width: 100%; }
  .run-footer { padding-top: 18px; }
  .results-section { margin-top: 15px; padding: 18px 16px 20px; border-top-right-radius: 28px; }
  .digest-loading { min-height: 210px; flex-direction: column; gap: 2px; text-align: center; }
  .postman-scene { flex-basis: 132px; width: 132px; }
  .digest-loading-copy { justify-items: center; }
  .digest-loading-copy strong { font-size: 16px; }
  .digest-loading-copy > span:last-child { max-width: 250px; }
  .article-feature { min-height: 0; grid-template-columns: 1fr; }
  .article-feature .article-art { height: auto; min-height: 220px; }
  .article-feature .article-body { padding: 17px 16px 12px; }
  .article-feature .article-title { font-size: 23px; }
  .article-list { gap: 10px; }
}

@media (max-width: 520px) {
  html { min-width: 0; }
  .site-header, .main-content { width: calc(100% - 24px); }
  .brand-name { font-size: 11px; }
  .brand-name span { font-size: 9px; }
  .intro h1 { font-size: clamp(42px, 13vw, 66px); }
  .intro-index { gap: 11px; letter-spacing: .08em; }
  .section-heading { align-items: flex-start; }
  .source-actions { gap: 10px; }
  .text-button { font-size: 11px; }
  .text-button::before { inset: -12px -4px; filter: blur(6px); }
  .source-chip { max-width: 100%; }
  .source-chip-name { max-width: 43%; }
  .source-form { grid-template-columns: 1fr; }
  .source-form > .small-primary { grid-column: 1; }
  .source-form > .small-primary { justify-self: stretch; margin-top: 0; }
  .criteria-table-head { display: none; }
  .criteria-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .criterion-group-field { display: grid; gap: 4px; }
  .criterion-group-label { display: block; color: var(--muted); font-size: 9px; }
  .remove-criterion { grid-column: 2; grid-row: 1; }
  .criteria-values { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .priority-input-wrap::before { display: block; margin-bottom: 3px; color: var(--muted); content: attr(data-label); font-size: 9px; }
  .priority-remove { top: 24px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .results-tools { width: 100%; justify-content: space-between; }
  .article-list { grid-template-columns: 1fr; }
  .article-feature { grid-column: auto; }
  .article-feature .article-art { min-height: 190px; }
  .article-title { font-size: 16px; }
  .article-footer { flex-wrap: wrap; }
  .feedback-label { width: 100%; }
  .article-fact { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  body.motion-ready .motion-reveal { opacity: 1; transform: none; }
}
