:root {
  color-scheme: light dark;
  --paper: #f7f3e9;
  --paper-raised: #fffdf7;
  --ink: #18201d;
  --muted: #5f6863;
  --line: #c7cec8;
  --accent: #d23a2e;
  --accent-dark: #ae2d24;
  --green: #173f35;
  --tag: #e7e9df;
  --shadow: 0 24px 60px rgb(35 43 38 / 10%);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Noto Serif TC", "Songti TC", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 8%, rgb(210 58 46 / 9%), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

a { color: inherit; }

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

.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordmark span:first-child {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-family: var(--serif);
  font-size: 1.1rem;
}

.header-link, .text-link {
  font-weight: 700;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
  min-height: 680px;
  padding-block: 96px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7.5vw, 6.7rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

h1 span { color: var(--accent); }

.hero-intro {
  max-width: 620px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--ink); }
.button-secondary:hover { background: var(--ink); color: var(--paper); }

.date-mark {
  position: relative;
  display: flex;
  width: 250px;
  min-height: 400px;
  margin-inline: auto;
  padding: 26px 22px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 150px 150px 24px 24px;
  background: var(--green);
  box-shadow: var(--shadow);
  color: #f7f3e9;
  text-align: center;
}

.date-mark::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: inherit;
  content: "";
}

.date-mark-label, .date-mark > span:last-child {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.date-mark strong {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 4.2rem;
  font-weight: 500;
  line-height: 0.92;
}

.date-mark-rule { width: 1px; height: 34px; margin-inline: auto; background: #f7f3e9; opacity: 0.5; }

.feeds, .how-to, .principles { padding-block: 112px; border-top: 1px solid var(--line); }

.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.section-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -10px; }

h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.section-heading > p:last-child { max-width: 520px; color: var(--muted); }

.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }

.feed-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 470px;
  padding: 30px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--paper-raised) 92%, transparent);
}

.feed-card-featured {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(240px, 0.6fr);
  gap: 24px;
  align-items: center;
  min-height: 310px;
  border: 0;
  background: var(--green);
  color: #f7f3e9;
  box-shadow: var(--shadow);
}

.card-index { color: var(--muted); font-family: var(--serif); font-size: 1rem; align-self: flex-start; }
.feed-card-featured .card-index { color: #aebfb8; }
.feed-main { position: relative; z-index: 1; }

.feed-main h3 {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.feed-main > p { color: var(--muted); }
.feed-card-featured .feed-main > p { max-width: 520px; color: #cdd7d2; }

.badge {
  display: inline-flex;
  border: 1px solid #8ca097;
  border-radius: 999px;
  padding: 5px 10px;
  color: #dce6e1;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-tags { display: flex; margin: 20px 0 0; padding: 0; flex-wrap: wrap; gap: 7px; list-style: none; }
.event-tags li { border-radius: 999px; padding: 5px 10px; background: var(--tag); font-size: 0.73rem; font-weight: 700; }
.feed-card-featured .event-tags li { background: rgb(255 255 255 / 10%); }

.feed-action { display: flex; min-width: 0; flex-direction: column; gap: 10px; align-items: flex-start; }
.direct-url { display: block; max-width: 100%; color: var(--muted); }
.feed-action code { display: block; width: 100%; overflow: hidden; font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.feed-card-featured .feed-action code { color: #aebfb8; }

.copy-button {
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.copy-status { min-height: 1.7em; margin-top: 18px; color: var(--muted); font-size: 0.84rem; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.steps article { padding: 34px; border-left: 3px solid var(--accent); background: var(--paper-raised); }
.steps span { font-weight: 850; }
.steps ol { margin-block: 24px; padding-left: 22px; }
.steps p { margin-bottom: 0; color: var(--muted); font-size: 0.88rem; }

.principles { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px 70px; }
.principles .eyebrow, .principles h2 { grid-column: 1; }
.principles blockquote, .principles > p:last-child { grid-column: 2; }
.principles blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.35; }
.principles > p:last-child { color: var(--muted); }

.site-footer {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 32px;
  align-items: end;
  padding-block: 56px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

.site-footer p { margin: 8px 0 0; color: var(--muted); }
.site-footer nav { display: flex; flex-direction: column; gap: 6px; }
.site-footer a { text-underline-offset: 4px; }
.site-footer small { color: var(--muted); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr 210px; min-height: auto; }
  .date-mark { width: 190px; min-height: 330px; }
  .date-mark strong { font-size: 3.2rem; }
  .feed-grid { grid-template-columns: 1fr; }
  .feed-grid .feed-card { min-height: 340px; }
  .feed-card-featured { grid-template-columns: 48px 1fr; }
  .feed-card-featured .feed-action { grid-column: 2; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 70px; }
  .wordmark { font-size: 0.7rem; letter-spacing: 0.03em; }
  .header-link { font-size: 0.82rem; }
  .hero { grid-template-columns: 1fr; padding-block: 76px; }
  .hero-copy { text-align: left; }
  .date-mark { display: none; }
  .feeds, .how-to, .principles { padding-block: 78px; }
  .section-heading, .steps, .principles { grid-template-columns: 1fr; }
  .section-heading .eyebrow, .principles .eyebrow, .principles h2, .principles blockquote, .principles > p:last-child { grid-column: 1; }
  .feed-card-featured { display: flex; padding: 26px; }
  .feed-card { padding: 26px; }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151715;
    --paper-raised: #1c211e;
    --ink: #edf0ea;
    --muted: #aab2ac;
    --line: #3b433e;
    --accent: #ee665a;
    --accent-dark: #ff796e;
    --green: #173d34;
    --tag: #303832;
    --shadow: 0 24px 60px rgb(0 0 0 / 28%);
  }
}

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