:root {
  --bg: #ffffff;
  --soft: #f4f5f6;
  --soft-2: #eceeef;
  --ink: #1c1d21;
  --muted: #696f78;
  --subtle: #9298a1;
  --line: #dfe2e5;
  --line-strong: #cbd0d5;
  --accent: #de3d32;
  --accent-dark: #c82f26;
  --accent-soft: #fff0ee;
  --green: #2f7d57;
  --amber: #a76608;
  --purple: #7a4ba0;
  --shadow: 0 22px 70px rgba(25, 30, 38, 0.12);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1240px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

body:has(dialog[open]) {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible + .feed-check {
  outline: 3px solid rgba(222, 61, 50, 0.22);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand img {
  display: block;
  flex: 0 0 auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #555b64;
  font-size: 14px;
  font-weight: 630;
}

.desktop-nav a,
.github-link {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.github-link:hover {
  color: var(--ink);
}

.github-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #60666f;
  font-size: 14px;
  font-weight: 650;
}

.github-link svg,
.button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.hero-layout {
  min-height: 630px;
  padding-block: 86px 78px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  align-items: center;
  gap: 78px;
}

.hero-copy h1 {
  max-width: 610px;
  margin: 0;
  font-size: clamp(50px, 5vw, 76px);
  line-height: 0.99;
  letter-spacing: -0.065em;
  font-weight: 820;
}

.hero-copy > p:not(.hero-note) {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(222, 61, 50, 0.19);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #aeb4bb;
}

.hero-note {
  margin: 18px 0 0;
  color: var(--subtle);
  font-size: 13px;
}

.density-demo {
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.demo-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.demo-toolbar div {
  display: grid;
  gap: 5px;
}

.demo-toolbar strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.demo-toolbar div span {
  color: var(--muted);
  font-size: 12px;
}

.demo-today {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 760;
}

.demo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding-top: 18px;
}

.demo-columns > section {
  min-width: 0;
}

.demo-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.demo-label span {
  font-weight: 730;
  color: var(--ink);
}

.demo-label b {
  font-weight: 620;
}

.demo-day {
  min-height: 175px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.demo-day > span {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 720;
}

.event {
  padding: 6px 8px;
  overflow: hidden;
  border-radius: 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 690;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-essential { background: #f9d9d6; color: #a82d25; }
.event-essential.empty { background: #f0f1f2; color: #737982; }
.event-sky { background: #dfe9f3; color: #345f87; }
.event-dense { background: #eadcf0; color: #7d3889; }
.event-dense-alt { background: #e8dfd6; color: #6e5138; }

.density-demo > p {
  margin: 17px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.facts {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-inline: 1px solid var(--line);
}

.facts-grid > div {
  min-height: 102px;
  padding: 24px 30px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--line);
}

.facts-grid > div:last-child {
  border-right: 0;
}

.facts-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.facts-grid strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.facts-grid b {
  font: inherit;
}

.builder-section {
  padding: 104px 0 116px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.builder-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 38px;
}

.builder-heading h2,
.principles-layout h2,
.guide-layout h2,
.trust-layout h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.052em;
}

.builder-heading p,
.principles-layout > div:first-child > p,
.guide-layout > div:first-child > p,
.trust-layout > div:first-child > p {
  max-width: 620px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.preset-switcher {
  padding: 4px;
  display: flex;
  gap: 2px;
  background: #e7e9eb;
  border-radius: 12px;
}

.preset-switcher button {
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #60666f;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
}

.preset-switcher button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(22, 26, 31, 0.09);
}

.builder-layout {
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.feed-picker {
  display: grid;
  gap: 18px;
}

.mobile-selection-dock {
  display: none;
}

.feed-tier,
.dense-tier {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tier-heading {
  padding: 20px 20px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.tier-heading h3,
.dense-tier summary strong {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.tier-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tier-heading > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf4ef;
  color: var(--green);
  font-size: 10px;
  font-weight: 740;
}

.feed-options {
  display: grid;
}

.feed-option {
  --feed-color: var(--accent);
  position: relative;
  min-width: 0;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 150ms ease;
}

.feed-option:last-child {
  border-bottom: 0;
}

.feed-option:hover {
  background: #fafafa;
}

.feed-option.selected {
  background: color-mix(in srgb, var(--feed-color) 5%, white);
  box-shadow: inset 3px 0 0 var(--feed-color);
}

.feed-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.feed-check {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid #bfc4c9;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 150ms ease, border-color 150ms ease;
}

.feed-check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.feed-option input:checked + .feed-check {
  background: var(--feed-color);
  border-color: var(--feed-color);
}

.feed-option input:checked + .feed-check svg {
  opacity: 1;
}

.feed-option-copy,
.feed-option-title,
.feed-option-meta {
  min-width: 0;
  display: flex;
  align-items: center;
}

.feed-option-copy {
  display: grid;
  gap: 6px;
}

.feed-option-title {
  gap: 7px;
}

.feed-option-title strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-option-title em {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 760;
}

.feed-option-copy > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.feed-option-meta {
  gap: 9px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 10px;
}

.feed-option-meta b {
  flex: 0 0 auto;
  font-weight: 690;
}

.feed-option-meta i {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dense-tier summary {
  padding: 19px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.dense-tier summary::-webkit-details-marker {
  display: none;
}

.dense-tier summary > span:first-child {
  display: grid;
  gap: 4px;
}

.dense-tier summary small {
  color: var(--muted);
  font-size: 11px;
}

.dense-tier summary::after {
  content: "+";
  order: 3;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.dense-tier[open] summary::after {
  content: "−";
}

.dense-count {
  margin-left: auto;
  color: var(--purple);
  font-size: 11px;
  font-weight: 740;
}

.dense-warning {
  margin: 0 18px 14px;
  padding: 11px 12px;
  background: #faf3e7;
  border: 1px solid #efdcb9;
  border-radius: 9px;
  color: #78551e;
  font-size: 11px;
  line-height: 1.55;
}

.dense-tier .feed-options {
  border-top: 1px solid var(--line);
}

.preview-column {
  min-width: 0;
  position: sticky;
  top: 94px;
}

.calendar-preview {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 55px rgba(29, 34, 41, 0.08);
}

.preview-toolbar {
  min-height: 82px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.preview-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.preview-toolbar span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 660;
}

.preview-toolbar h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.density-score {
  min-width: 84px;
  padding: 8px 10px;
  display: grid;
  justify-items: end;
  gap: 2px;
  border-left: 3px solid var(--green);
  background: #f1f7f3;
  border-radius: 4px 8px 8px 4px;
}

.density-score strong {
  color: var(--green);
  font-size: 14px;
}

.density-score[data-density="balanced"] {
  border-left-color: var(--amber);
  background: #faf4e8;
}

.density-score[data-density="balanced"] strong { color: var(--amber); }

.density-score[data-density="crowded"] {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.density-score[data-density="crowded"] strong { color: var(--accent-dark); }

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  min-height: 31px;
  align-items: center;
  background: #f7f7f8;
  border-bottom: 1px solid var(--line);
}

.calendar-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 690;
}

.calendar-day {
  min-width: 0;
  min-height: 88px;
  padding: 7px 5px 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: 0;
}

.calendar-day.outside {
  background: #fafafa;
  color: #bbbfc4;
}

.calendar-date {
  min-width: 0;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.calendar-date span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-date b {
  flex: 0 0 auto;
  font-size: 11px;
}

.calendar-day.today .calendar-date b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.outside .calendar-date span {
  display: none;
}

.calendar-events {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.preview-event {
  --feed-color: var(--accent);
  min-width: 0;
  height: 16px;
  padding: 2px 4px;
  overflow: hidden;
  border-left: 3px solid var(--feed-color);
  border-radius: 3px;
  background: color-mix(in srgb, var(--feed-color) 14%, white);
  color: color-mix(in srgb, var(--feed-color) 78%, #111);
  font-size: 8px;
  font-weight: 690;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-event.continuation {
  border-left-width: 0;
  border-radius: 0;
}

.mobile-agenda {
  display: none;
}

.preview-legend {
  min-height: 47px;
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.preview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--feed-color);
}

.selection-bar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  margin: 14px 12px 0;
  padding: 13px 14px 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #1f2126;
  border: 1px solid #34373e;
  border-radius: 15px;
  color: #fff;
  box-shadow: 0 18px 45px rgba(20, 23, 29, 0.22);
}

.selection-bar > div {
  display: grid;
  gap: 3px;
}

.selection-bar span {
  color: #aeb3bb;
  font-size: 10px;
}

.selection-bar strong {
  font-size: 14px;
}

.selection-bar b {
  font: inherit;
}

.selection-bar .button {
  min-height: 42px;
  box-shadow: none;
}

.selection-message {
  margin: 12px 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.principles-section {
  padding: 112px 0;
  background: #1d1f24;
  color: #fff;
}

.principles-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 110px;
  align-items: start;
}

.principles-layout > div:first-child > p {
  color: #aeb3bc;
}

.principle-list {
  border-top: 1px solid #3a3d44;
}

.principle-list article {
  min-height: 126px;
  padding: 25px 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 26px;
  border-bottom: 1px solid #3a3d44;
}

.principle-list article > span {
  padding-top: 3px;
  color: #f06b61;
  font-size: 11px;
  font-weight: 760;
}

.principle-list h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.principle-list p {
  margin: 8px 0 0;
  color: #aeb3bc;
  font-size: 13px;
  line-height: 1.65;
}

.guide-section {
  padding: 112px 0;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.guide-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 100px;
}

.platform-tabs {
  width: fit-content;
  margin-top: 28px;
  padding: 4px;
  display: flex;
  background: #e5e7e9;
  border-radius: 10px;
}

.platform-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.platform-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 7px rgba(24, 27, 31, 0.08);
}

.guide-panel {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.guide-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-panel li {
  min-height: 78px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.guide-panel li:last-child {
  border-bottom: 0;
}

.guide-panel li b {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1f2126;
  color: #fff;
  font-size: 11px;
}

.guide-panel li span {
  color: #4e545c;
  font-size: 13px;
  line-height: 1.55;
}

.trust-section {
  padding: 106px 0;
  background: #fff;
}

.trust-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 110px;
  align-items: start;
}

.trust-layout dl {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.trust-layout dl > div {
  min-height: 78px;
  padding: 19px 0;
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.trust-layout dt {
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
}

.trust-layout dd {
  margin: 0;
  color: #555b64;
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  padding: 52px 0 26px;
  background: #202227;
  color: #fff;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
}

.footer-brand {
  color: #fff;
}

.footer-main p {
  margin: 12px 0 0;
  color: #8e949e;
  font-size: 11px;
}

.footer-main nav {
  max-width: 590px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 24px;
}

.footer-main nav a {
  color: #b7bcc4;
  font-size: 11px;
}

.footer-main nav a:hover {
  color: #fff;
}

.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #34373d;
  color: #737983;
  font-size: 9px;
}

.subscribe-dialog {
  width: min(calc(100% - 32px), 670px);
  max-height: min(82vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 110px rgba(15, 18, 24, 0.3);
}

.subscribe-dialog::backdrop {
  background: rgba(18, 20, 25, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  padding: 27px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dialog-header > div {
  display: grid;
  gap: 5px;
}

.dialog-header span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.dialog-header h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.dialog-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.dialog-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.dialog-intro {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.subscription-list {
  max-height: 390px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.subscription-row {
  --feed-color: var(--accent);
  min-height: 72px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.subscription-row:last-child {
  border-bottom: 0;
}

.subscription-index {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--feed-color) 15%, white);
  color: var(--feed-color);
  font-size: 11px;
  font-weight: 760;
}

.subscription-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.subscription-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-row small {
  color: var(--muted);
  font-size: 10px;
}

.subscription-row a,
.subscription-row button {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #4d535b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.subscription-row a {
  border-color: #1f2126;
  background: #1f2126;
  color: #fff;
}

.dialog-done {
  width: 100%;
  margin-top: 16px;
}

.empty-subscriptions {
  margin: 0;
  padding: 38px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.copy-status {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  margin: 0;
  padding: 12px 15px;
  border-radius: 10px;
  background: #202227;
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 18, 23, 0.25);
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-status.visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-message {
  padding: 16px;
  background: #fff5d9;
  color: #674b12;
  text-align: center;
  font-size: 13px;
}

.noscript-message a {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 54px;
  }

  .hero-copy h1,
  .hero-copy > p:not(.hero-note) {
    max-width: 760px;
  }

  .density-demo {
    max-width: 760px;
  }

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .feed-picker {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .mobile-selection-dock {
    position: sticky;
    top: 88px;
    z-index: 12;
    grid-column: 1 / -1;
    min-height: 64px;
    padding: 11px 12px 11px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #1f2126;
    border: 1px solid #34373e;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 16px 40px rgba(20, 23, 29, 0.2);
  }

  .mobile-selection-dock > div {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .mobile-selection-dock span {
    color: #aeb3bb;
    font-size: 10px;
  }

  .mobile-selection-dock span b {
    color: #75bc96;
    font: inherit;
  }

  .mobile-selection-dock[data-density="balanced"] span b {
    color: #e3ae5d;
  }

  .mobile-selection-dock[data-density="crowded"] span b {
    color: #ff8077;
  }

  .mobile-selection-dock strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-selection-dock strong b {
    font: inherit;
  }

  .mobile-selection-dock button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 13px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 720;
  }

  .dense-tier {
    grid-column: 1 / -1;
  }

  .preview-column {
    position: static;
  }

  .selection-bar {
    position: static;
  }

  .principles-layout,
  .guide-layout,
  .trust-layout {
    gap: 60px;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .hero-layout {
    min-height: 0;
    padding-block: 62px;
  }

  .hero-copy h1 {
    font-size: clamp(44px, 11vw, 66px);
  }

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

  .facts-grid > div:nth-child(2) {
    border-right: 0;
  }

  .facts-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .builder-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .principles-layout,
  .guide-layout,
  .trust-layout {
    grid-template-columns: 1fr;
  }

  .principles-layout {
    gap: 52px;
  }

  .guide-layout,
  .trust-layout {
    gap: 44px;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer-main nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header {
    position: relative;
    backdrop-filter: none;
  }

  .header-inner {
    height: 64px;
  }

  .brand {
    font-size: 14px;
  }

  .brand img {
    width: 27px;
    height: 27px;
  }

  .github-link {
    font-size: 13px;
  }

  .hero-layout {
    padding-block: 44px 36px;
    gap: 32px;
  }

  .hero-copy h1 {
    font-size: 43px;
    line-height: 1;
    letter-spacing: -0.062em;
  }

  .hero-copy > p:not(.hero-note) {
    margin-top: 19px;
    font-size: 15px;
    line-height: 1.62;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 24px;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 48px;
  }

  .hero-note {
    text-align: center;
  }

  .density-demo {
    padding: 16px;
    border-radius: 18px;
  }

  .demo-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .demo-day {
    min-height: 118px;
    padding: 10px;
  }

  .demo-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .demo-day > span {
    margin-bottom: 7px;
    font-size: 11px;
  }

  .event {
    padding-inline: 6px;
    font-size: 9px;
  }

  .density-demo > p {
    display: none;
  }

  .facts-grid > div {
    min-height: 84px;
    padding: 18px 16px;
  }

  .facts-grid strong {
    font-size: 14px;
  }

  .builder-section,
  .principles-section,
  .guide-section,
  .trust-section {
    padding-block: 78px;
  }

  .builder-heading h2,
  .principles-layout h2,
  .guide-layout h2,
  .trust-layout h2 {
    font-size: 39px;
  }

  .builder-heading {
    margin-bottom: 27px;
  }

  .preset-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .preset-switcher button {
    padding-inline: 7px;
    font-size: 11px;
  }

  .feed-picker {
    grid-template-columns: 1fr;
  }

  .mobile-selection-dock {
    top: 10px;
    gap: 10px;
  }

  .mobile-selection-dock strong {
    font-size: 12px;
  }

  .dense-tier {
    grid-column: auto;
  }

  .calendar-weekdays,
  .calendar-grid {
    display: none;
  }

  .mobile-agenda {
    display: grid;
  }

  .agenda-day {
    min-height: 78px;
    padding: 13px 16px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    border-bottom: 1px solid var(--line);
  }

  .agenda-day time {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 0;
  }

  .agenda-day time b {
    font-size: 22px;
    letter-spacing: -0.04em;
  }

  .agenda-day time span {
    color: var(--muted);
    font-size: 9px;
  }

  .agenda-day.today time b {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
  }

  .agenda-day > div {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 5px;
  }

  .agenda-event {
    min-width: 0;
    display: grid;
    grid-template-columns: 6px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
  }

  .agenda-event i {
    width: 6px;
    height: 20px;
    border-radius: 3px;
    background: var(--feed-color);
  }

  .agenda-event b {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agenda-event small {
    color: var(--muted);
    font-size: 9px;
  }

  .agenda-empty {
    color: #adb1b7;
    font-size: 10px;
  }

  .preview-legend {
    max-height: 76px;
    overflow: hidden;
  }

  .selection-bar {
    margin-inline: 8px;
    padding: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .selection-bar .button {
    width: 100%;
  }

  .principle-list article {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 17px;
  }

  .trust-layout dl > div {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .footer-main nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
  }

  .dialog-shell {
    padding: 18px;
  }

  .dialog-header h2 {
    font-size: 23px;
  }

  .dialog-intro {
    margin: 12px 0 16px;
    font-size: 12px;
  }

  .subscription-row {
    min-height: 66px;
    padding: 10px;
    grid-template-columns: 28px minmax(0, 1fr) 50px 50px;
    gap: 8px;
  }

  .subscription-row button {
    grid-column: auto;
    width: auto;
  }

  .subscription-row a,
  .subscription-row button {
    height: 32px;
    padding-inline: 7px;
  }

  .copy-status {
    right: 14px;
    bottom: 14px;
    left: 14px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
