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

:root {
  /* Oatmeal palette (Shiori) */
  --oatmeal-50:  oklch(98.5% .008 75);
  --oatmeal-100: oklch(96%   .016 72);
  --oatmeal-200: oklch(92%   .018 68);
  --oatmeal-300: oklch(87%   .025 63);
  --oatmeal-400: oklch(71%   .038 58);
  --oatmeal-500: oklch(55%   .042 55);
  --oatmeal-600: oklch(44%   .038 52);
  --oatmeal-950: oklch(14.5% .012 44);

  --bg:        var(--oatmeal-50);
  --bg-raised: var(--oatmeal-100);
  --border:    var(--oatmeal-200);
  --text:      var(--oatmeal-950);
  --secondary: var(--oatmeal-600);
  --tertiary:  var(--oatmeal-500);
  --accent:    #ff8c42;
  --link:      #6b33be;

  --max-width: 660px;
}

html {
  font-size: 20px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  line-height: 1.6;
  padding: 0 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Masthead */
/* Masthead */
.masthead {
  margin: 0 -1.5rem 1rem;
  overflow: hidden;
}

/* Utility bar */
.util-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #5b16c4, #c11fd6);
  color: #fff;
  padding: 10px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: 'Archivo', 'Inter', sans-serif;
}

.util-center { opacity: .85; }

.util-links {
  display: flex;
  gap: 22px;
}

.util-links a {
  color: #fff;
  text-decoration: none;
  opacity: .9;
  transition: opacity 0.12s;
}

.util-links a:hover { opacity: .7; }

/* Masthead block */
.masthead-block {
  text-align: center;
  padding: 48px 24px 40px;
}

/* Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow-rule {
  display: block;
  height: 1px;
  width: 70px;
  background: #c9bfa6;
  flex-shrink: 0;
}

.eyebrow-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #8a8577;
  white-space: nowrap;
  font-family: 'Archivo', 'Inter', sans-serif;
}

/* Wordmark */
.site-name {
  font-family: 'Archivo', sans-serif;
  font-size: clamp(52px, 12vw, 132px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .9;
  background: linear-gradient(92deg, #5b16c4, #a020c4 55%, #c11fd6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  margin: 0;
}

a.site-name {
  text-decoration: none;
  display: block;
}

/* Masthead tagline */
.masthead-tagline {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: #6b6558;
  margin-top: 24px;
  margin-bottom: 0;
}


@media (max-width: 900px) {
  .util-center { display: none; }
  .eyebrow-rule { width: 40px; }
}

@media (max-width: 600px) {
  .masthead { margin-left: -1.5rem; margin-right: -1.5rem; }
  .util-bar { flex-direction: column; gap: 4px; text-align: center; padding: 10px 16px; }
  .util-links { gap: 16px; }
  .masthead-block { padding: 30px 16px 26px; }
  .eyebrow-rule { display: none; }
  .masthead-tagline { font-size: 17px; }
}


/* Feed */
.feed {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Story */
.story {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.story:last-child {
  border-bottom: none;
}

.archive-group {
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
}

.archive-group:last-child {
  border-bottom: none;
}

.archive-month {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  margin: 0 0 0.6rem;
}

.archive-item {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 0.25rem;
}

.cal-th {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tertiary);
  text-align: center;
  padding: 0 0 0.4rem;
}

.cal-empty {
  padding: 0.2rem 0;
}

.cal-day {
  text-align: center;
  padding: 0.2rem 0;
}

.cal-dim {
  font-size: 0.8125rem;
  color: var(--oatmeal-300);
}

.cal-active {
  font-size: 0.8125rem;
}

.cal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.cal-link:hover {
  background: var(--link);
  color: #fff;
}

.about-content .story {
  border-bottom: none;
  padding: 0.4rem 0;
}

.story-line {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  font-weight: 400;
}

.story-line strong {
  font-weight: 600;
}

.story-link {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--link);
  transition: color 0.12s, text-decoration-color 0.12s;
}

.story-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* States */
.state-message {
  max-width: var(--max-width);
  margin: 4rem auto;
  text-align: center;
  color: var(--secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.state-message h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.state-message code {
  background: var(--bg-raised);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  border: 1px solid var(--border);
}

/* Subscribe */
.subscribe-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid var(--border);
}

.subscribe-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.subscribe-row {
  display: flex;
  gap: 0.5rem;
}

.subscribe-input {
  flex: 1;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s;
}

.subscribe-input:focus {
  border-color: var(--link);
}

.subscribe-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  background: var(--link);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.12s;
  white-space: nowrap;
}

.subscribe-btn:hover {
  opacity: 0.88;
}

.subscribe-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.subscribe-msg {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  min-height: 1.2em;
}

.subscribe-msg--success { color: #2a7a4b; }
.subscribe-msg--error   { color: #b91c1c; }

/* Footer */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--tertiary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--tertiary);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.12s;
}

.footer-nav a:hover {
  color: var(--link);
}

@media (max-width: 480px) {
  html { font-size: 18px; }
}
