:root {
  --ink: #0b120f;
  --ink-soft: #101a15;
  --workbench: #16221a;
  --workbench-2: #1c2a20;
  --paper: #e9dfc9;
  --paper-dim: #b7b09e;
  --gold: #e2ad4c;
  --gold-bright: #f1bd5b;
  --ember: #e86f34;
  --leaf: #8dbb70;
  --rule: rgba(199, 211, 190, 0.15);
  --rule-warm: rgba(226, 173, 76, 0.28);
  --shadow: rgba(0, 0, 0, 0.42);
  --sans: "Segoe UI", "Noto Sans", "Noto Sans SC", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% -10%, rgba(226, 173, 76, 0.09), transparent 34%),
    radial-gradient(circle at 5% 55%, rgba(141, 187, 112, 0.055), transparent 31%),
    var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.23;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.011) 1px, transparent 1px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

a { color: var(--gold-bright); }
a:hover { color: #ffd177; }

.topbar {
  min-height: 78px;
  border-bottom: 1px solid var(--rule);
  background: rgba(11, 18, 15, 0.88);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  width: min(1180px, calc(100% - 64px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}

.brand img {
  width: 43px;
  height: 43px;
  padding: 3px;
  border: 1px solid var(--rule-warm);
  border-radius: 12px 12px 9px 12px;
  background: var(--ink-soft);
  box-shadow: 0 7px 22px var(--shadow);
  transform: rotate(-1.5deg);
}

.brand-copy { display: grid; line-height: 1.05; }
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}
.brand-note {
  margin-top: 5px;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.topnav a {
  color: var(--paper-dim);
  text-decoration: none;
}
.topnav a:hover,
.topnav a[aria-current="page"] { color: var(--gold-bright); }

.language-link {
  padding: 7px 10px;
  border: 1px solid var(--rule-warm);
  border-radius: 4px;
  background: rgba(226, 173, 76, 0.055);
}

.notes-shell {
  width: min(980px, calc(100% - 64px));
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  padding: 84px 0 112px;
}

.list-header {
  max-width: 800px;
  margin-bottom: 52px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--leaf);
  box-shadow: 10px 4px 0 -0.4px rgba(141, 187, 112, 0.45);
}

h1, h2, h3 {
  text-wrap: balance;
  line-height: 1.25;
}

.list-header h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 8vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.list-header .intro {
  max-width: 700px;
  margin: 0;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 1.16rem;
  font-style: italic;
  line-height: 1.65;
}

.note-card {
  position: relative;
  display: block;
  padding: 38px 42px 36px;
  overflow: visible;
  border: 1px solid var(--rule-warm);
  border-radius: 7px 10px 6px 8px;
  color: var(--paper);
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.025), transparent 35%),
    var(--workbench);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32), 9px 10px 0 rgba(141, 187, 112, 0.018);
  text-decoration: none;
  transform: rotate(0.12deg);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.note-card::before {
  content: "";
  position: absolute;
  top: -11px;
  right: 12%;
  width: 105px;
  height: 25px;
  border-inline: 1px solid rgba(226, 173, 76, 0.14);
  background: rgba(226, 173, 76, 0.14);
  transform: rotate(1.4deg);
}

.note-card:hover {
  border-color: rgba(241, 189, 91, 0.52);
  color: var(--paper);
  background: var(--workbench-2);
  transform: translate(-2px, -2px) rotate(0deg);
}

.note-card time,
.article-meta {
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-card h2 {
  max-width: 820px;
  margin: 12px 0 15px;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 520;
  letter-spacing: -0.02em;
}

.note-card h2 code,
.article-header h1 code {
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 0.74em;
  font-weight: 500;
}

.note-card p {
  max-width: 760px;
  margin: 0 0 21px;
  color: var(--paper-dim);
  line-height: 1.7;
}

.note-card .read-more {
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.article-shell {
  width: min(800px, calc(100% - 64px));
  margin: 0 auto;
  padding: 62px 0 116px;
}

.back-link {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.article-header {
  position: relative;
  margin-bottom: 48px;
  padding: 0 0 39px;
  border-bottom: 1px solid var(--rule);
}

.article-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 86px;
  height: 2px;
  background: var(--ember);
  transform: rotate(-0.5deg);
}

.article-header h1 {
  margin: 12px 0 20px;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 6vw, 4.3rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.08;
}

.article-body { color: #d9d3c3; }
.article-body > p:first-child {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.18rem;
  font-style: italic;
}
.article-body p { margin: 0 0 23px; }

.article-body h2 {
  margin: 70px 0 22px;
  padding: 14px 0 0 18px;
  border-top: 1px solid var(--rule);
  border-left: 2px solid var(--ember);
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.72rem;
  font-weight: 520;
  letter-spacing: -0.015em;
}

.article-body code,
.privacy-shell code {
  padding: 0.12em 0.34em;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: #f0c878;
  background: #080d0a;
  font-family: var(--mono);
  font-size: 0.88em;
}

.article-body pre {
  margin: 28px 0;
  padding: 23px;
  overflow-x: auto;
  border: 1px solid var(--rule-warm);
  border-radius: 5px 8px 5px 7px;
  background: #080d0a;
  box-shadow: inset 3px 0 0 rgba(141, 187, 112, 0.28);
  line-height: 1.65;
}

.article-body pre code {
  padding: 0;
  border: 0;
  color: #dbe7df;
  background: transparent;
  font-size: 0.86rem;
}

.article-body blockquote {
  margin: 31px 0;
  padding: 18px 22px;
  border-left: 2px solid var(--gold);
  color: var(--paper);
  background: rgba(22, 34, 26, 0.76);
  font-family: var(--serif);
  font-style: italic;
}
.article-body blockquote p { margin: 0; }
.article-body ul { margin: 0 0 28px; padding-left: 1.35em; }
.article-body li { margin: 9px 0; padding-left: 0.3em; }
.article-body li::marker { color: var(--leaf); }

.article-cta {
  position: relative;
  margin-top: 62px;
  padding: 31px;
  border: 1px solid var(--rule-warm);
  border-radius: 6px 9px 5px 8px;
  background: linear-gradient(135deg, rgba(28, 42, 32, 0.95), rgba(33, 26, 18, 0.95));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.article-cta::before {
  content: "workbench note";
  position: absolute;
  top: -10px;
  right: 22px;
  padding: 2px 8px;
  color: var(--ink);
  background: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(1deg);
}
html[lang="zh-Hans"] .article-cta::before { content: "工坊便签"; }
.article-cta p { margin: 0 0 18px; }

.cta-button {
  display: inline-flex;
  padding: 10px 18px;
  border: 1px solid #f5c56c;
  border-radius: 5px;
  color: #201506;
  background: var(--gold-bright);
  box-shadow: 4px 4px 0 rgba(232, 111, 52, 0.23);
  font-weight: 750;
  text-decoration: none;
}
.cta-button:hover { color: #201506; background: #ffd177; }

.privacy-shell {
  width: min(800px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 116px;
}

.privacy-header {
  margin-bottom: 42px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}
.privacy-header h1 {
  margin: 0 0 13px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}
.privacy-header .sub {
  margin: 0;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
}
.updated {
  margin-top: 18px;
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}
.lang-nav {
  display: flex;
  gap: 9px;
  margin: 0 0 48px;
}
.lang-nav a {
  padding: 7px 11px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
}
.lang-nav a:hover { border-color: var(--rule-warm); color: var(--gold-bright); }

.privacy-section {
  margin: 0 0 74px;
  scroll-margin-top: 30px;
}
.privacy-section h2 {
  margin: 0 0 29px;
  padding: 13px 0 12px 18px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid var(--ember);
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 520;
}
.privacy-section h3 {
  margin: 43px 0 13px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
}
.privacy-section p { margin: 0 0 18px; }
.privacy-section ul { margin: 0 0 20px; padding-left: 1.35em; }
.privacy-section li { margin: 9px 0; }
.privacy-section li::marker { color: var(--leaf); }
.provider-links { color: var(--paper-dim); }

.site-footer {
  padding: 31px 20px 45px;
  border-top: 1px solid var(--rule);
  color: #7f8d82;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}
.site-footer a { color: var(--paper-dim); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar, .topbar-inner { min-height: 72px; }
  .topbar-inner { width: min(100% - 28px, 1180px); }
  .brand img { width: 40px; height: 40px; }
  .brand-note, .topnav .home-link { display: none; }
  .topnav { gap: 12px; }
  .notes-shell, .article-shell, .privacy-shell { width: min(100% - 32px, 980px); }
  .notes-shell { padding: 54px 0 82px; }
  .article-shell { padding: 39px 0 88px; }
  .privacy-shell { padding: 50px 0 88px; }
  .list-header { margin-bottom: 42px; }
  .list-header h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .note-card { padding: 29px 23px 27px; }
  .article-header h1 { font-size: clamp(2.35rem, 11vw, 3.35rem); }
  .article-body h2 { margin-top: 54px; padding-left: 14px; font-size: 1.48rem; }
  .article-body pre { margin-inline: -4px; padding: 18px; }
  .article-cta { padding: 25px 22px; }
  .privacy-header h1 { font-size: clamp(2.75rem, 14vw, 4.4rem); }
  .privacy-section h2 { font-size: 1.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}
