:root {
  color-scheme: light;
  --page: #eef1f4;
  --paper: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --ink: #121619;
  --muted: #5f666c;
  --line: rgba(21, 27, 31, 0.1);
  --primary: #11161a;
  --green: #5f8b5f;
  --clay: #aa776c;
  --cream: #f7f1ea;
  --chip: rgba(247, 241, 234, 0.78);
  --shadow: 0 22px 60px rgba(30, 39, 47, 0.11);
  --soft-shadow: 0 14px 34px rgba(30, 39, 47, 0.08);
  --radius: 18px;
  --card-radius: 12px;
  --max: 1240px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #101416;
  --paper: rgba(24, 28, 30, 0.88);
  --glass: rgba(32, 38, 40, 0.72);
  --glass-strong: rgba(36, 42, 44, 0.9);
  --ink: #f7f2eb;
  --muted: #b8c0c4;
  --line: rgba(255, 255, 255, 0.14);
  --primary: #f7f2eb;
  --green: #9bcf9a;
  --clay: #dfaa9e;
  --cream: #202322;
  --chip: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(95, 139, 95, 0.14), transparent 28rem),
    radial-gradient(circle at 85% 5%, rgba(170, 119, 108, 0.13), transparent 26rem),
    var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  min-height: 100dvh;
  padding: 18px;
  position: relative;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 72%, white);
  outline-offset: 3px;
}

.ambient-bg {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.ambient-field {
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.7;
  position: absolute;
}

.field-a {
  background: radial-gradient(circle, rgba(95, 139, 95, 0.22), transparent 70%);
  height: 440px;
  left: -120px;
  top: 80px;
  width: 440px;
}

.field-b {
  background: radial-gradient(circle, rgba(190, 206, 196, 0.32), transparent 68%);
  height: 520px;
  right: -150px;
  top: 40px;
  width: 520px;
}

.field-c {
  background: radial-gradient(circle, rgba(170, 119, 108, 0.16), transparent 68%);
  bottom: 5%;
  height: 500px;
  left: 26%;
  width: 500px;
}

.skip-link {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  left: 18px;
  padding: 10px 14px;
  position: fixed;
  top: 14px;
  transform: translateY(-150%);
  z-index: 30;
}

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

.site-shell,
.content-section,
.workspace-strip,
.notes-section {
  margin: 0 auto;
  max-width: var(--max);
}

.site-shell {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.site-header {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.nav {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  min-height: 104px;
  padding: 0 40px;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  justify-self: start;
}

.brand-mark {
  align-items: center;
  color: var(--green);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 30px;
  justify-content: center;
}

.nav-links a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  min-height: 44px;
  padding: 13px 0;
  position: relative;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  background: var(--ink);
  bottom: 9px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

.nav-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-self: end;
}

.icon-button,
.pill-button,
.primary-button,
.secondary-button,
.text-button,
.category-button,
.search-box button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.icon-button {
  background: transparent;
  color: var(--ink);
  width: 44px;
}

.pill-button,
.primary-button,
.search-box button {
  background: var(--primary);
  color: var(--page);
  padding: 12px 22px;
}

.secondary-button,
.text-button {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 20px;
}

.icon-button:hover,
.pill-button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.category-button:hover,
.search-box button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  min-height: 540px;
}

.hero-copy {
  align-self: center;
  padding: 48px 40px;
}

.eyebrow {
  color: var(--clay);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

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

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 76px);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin-bottom: 24px;
  max-width: 620px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  letter-spacing: -0.035em;
  line-height: 1.13;
  margin: 0 0 12px;
}

.hero-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 34px;
}

.topic-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-row::before {
  color: var(--ink);
  content: "Trending Topics";
  flex: 0 0 100%;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.topic-chip {
  align-items: center;
  background: var(--chip);
  border: 1px solid color-mix(in srgb, var(--line) 52%, transparent);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  padding: 8px 17px;
}

.hero-media {
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.hero-media > img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero-media::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), transparent 36%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.featured-card {
  align-items: center;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 16px;
  bottom: 72px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 118px;
  max-width: 360px;
  padding: 24px;
  position: absolute;
  right: 36px;
  z-index: 1;
}

.featured-card .eyebrow {
  font-size: 10px;
  margin-bottom: 14px;
}

.featured-card h2 {
  font-size: 25px;
}

.featured-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.featured-card img {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  object-fit: cover;
  width: 118px;
}

.inline-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--clay);
  color: var(--ink);
  display: inline-flex;
  font-weight: 760;
  gap: 8px;
  min-height: 44px;
  padding: 4px 0;
}

.content-section,
.workspace-strip,
.notes-section {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
  padding: 36px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-controls {
  align-items: center;
  display: flex;
  gap: 12px;
}

.sort-control {
  align-items: center;
  display: flex;
  gap: 8px;
}

.sort-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input,
textarea {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.article-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-card {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 24px rgba(30, 39, 47, 0.06);
  overflow: hidden;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.article-card:hover {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
  box-shadow: var(--soft-shadow);
  transform: translateY(-3px);
}

.article-image {
  display: block;
  overflow: hidden;
}

.article-image img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 260ms ease;
  width: 100%;
}

.article-card:hover .article-image img {
  transform: scale(1.035);
}

.article-body {
  padding: 22px 18px 18px;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.article-kicker span {
  color: var(--clay);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-body p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.article-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px;
  margin-bottom: 16px;
}

.avatar {
  align-items: center;
  background: color-mix(in srgb, var(--green) 24%, var(--paper));
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-weight: 850;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.card-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.text-button {
  font-size: 14px;
  min-height: 44px;
  padding: 8px 12px;
}

.text-button.active {
  background: var(--primary);
  color: var(--page);
}

.workspace-strip {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.15fr 0.95fr 1fr;
}

.workspace-card,
.suggestion-card,
.note-item,
.empty-notes,
.empty-state {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: 0 12px 28px rgba(30, 39, 47, 0.06);
}

.workspace-card {
  padding: 24px;
}

.workspace-card h2 {
  font-size: 27px;
  margin-bottom: 18px;
}

.search-form,
.note-form {
  display: grid;
  gap: 12px;
}

.search-box {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.search-box svg {
  color: var(--muted);
}

.helper {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  min-height: 21px;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-button {
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  padding: 8px 14px;
}

.category-button strong {
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  min-width: 28px;
  padding: 2px 7px;
}

.category-button.active {
  background: var(--primary);
  color: var(--page);
}

.category-button.active strong {
  background: rgba(255, 255, 255, 0.16);
  color: currentColor;
}

.note-form label {
  color: var(--ink);
  display: grid;
  font-size: 14px;
  font-weight: 760;
  gap: 7px;
}

.suggestion-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.suggestion-card {
  padding: 20px;
}

.suggestion-card span {
  color: var(--clay);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suggestion-card h3 {
  font-size: 22px;
  margin-top: 10px;
}

.suggestion-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.note-count {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: var(--page);
  display: inline-flex;
  font-weight: 850;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  padding: 0 14px;
}

.notes-list {
  display: grid;
  gap: 12px;
}

.note-item,
.empty-notes,
.empty-state {
  padding: 18px;
}

.note-item span,
.empty-notes span,
.empty-state span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.note-item p {
  margin: 8px 0;
}

.note-item time {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 24px auto 12px;
  max-width: var(--max);
  padding: 0 4px;
}

@media (max-width: 1120px) {
  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-strip,
  .suggestion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body {
    padding: 12px;
  }

  .nav {
    grid-template-columns: 1fr auto;
    min-height: 76px;
    padding: 0 18px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .pill-button {
    padding-inline: 14px;
  }

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

  .hero-copy {
    padding: 34px 22px 28px;
  }

  .hero-media {
    min-height: 390px;
  }

  .featured-card {
    bottom: 18px;
    left: 18px;
    max-width: none;
    right: 18px;
  }

  .content-section,
  .workspace-strip,
  .notes-section {
    padding: 24px;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 44px;
  }

  .brand strong {
    font-size: 24px;
  }

  .brand small {
    display: none;
  }

  .hero-actions,
  .section-heading,
  .section-controls,
  .card-actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .article-grid,
  .workspace-strip,
  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .search-box svg {
    display: none;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-card img {
    aspect-ratio: 16 / 9;
    width: 100%;
  }

  .content-section,
  .workspace-strip,
  .notes-section {
    padding: 20px;
  }
}

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