/*
Theme Name: anywei
Description: Paper, ink and seal. Shell of the former weitzu.com Next.js site; page bodies are imported HTML.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: anywei
*/

/* Generated from src/app/globals.css by scripts/export-wp-manifest.mjs — edit the source, not this file. */

/* 纸 · 墨 · 朱 —— 东方极简。无 Web 字体，系统字体栈即开即显。 */
:root {
  --paper: #f6f3ec;
  --paper-2: #efeadf;
  --ink: #1c1a17;
  --ink-2: #57524a;
  --line: #ddd6c8;
  --seal: #b8392b;
  --seal-ink: #fff;
  --code-bg: #ebe5d8;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141311;
    --paper-2: #1d1b18;
    --ink: #ebe6dc;
    --ink-2: #a39d92;
    --line: #34302a;
    --seal: #d9574a;
    --code-bg: #24211d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 var(--sans);
}
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--seal); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.45rem; margin: 0 0 0.8rem; }
h3 { font-size: 1.1rem; margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-2); font-weight: 400; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46em; }

/* header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.brand:hover { color: var(--ink); }
.mark { width: 32px; height: 32px; flex: none; }
.mark rect { fill: var(--seal); }
.mark path { fill: none; stroke: var(--seal-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.site-header nav { display: flex; gap: 20px; font-size: 0.95rem; }
.site-header nav a { text-decoration: none; color: var(--ink-2); }
.site-header nav a:hover { color: var(--seal); }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 1px 11px; font-size: 0.85rem; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.lang-switch:hover { color: var(--seal); border-color: var(--seal); }
.site-header nav { margin-left: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 12px; z-index: 20; border-radius: var(--radius); }
.skip:focus { left: 8px; }

/* hero */
.hero { padding: 72px 20px 40px; }
.eyebrow { letter-spacing: 0.3em; font-size: 0.78rem; color: var(--seal); margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.4rem); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--ink-2); margin: 24px 0; }
.hero-stats b { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); margin-right: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.btn { display: inline-block; padding: 9px 20px; border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none; font-size: 0.95rem; }
.btn:hover { border-color: var(--seal); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--seal); color: #fff; }

.section { padding-top: 36px; padding-bottom: 36px; }
.section-tagline { color: var(--ink-2); margin-top: -6px; }
.page { padding-top: 48px; padding-bottom: 48px; }

/* layers */
.layers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.layer { padding: 22px; border-right: 1px solid var(--line); position: relative; }
.layer:last-child { border-right: 0; }
.layer-num { font-family: var(--serif); color: var(--seal); font-size: 0.9rem; }
.layer h3 a { text-decoration: none; }
.layer p { font-size: 0.93rem; color: var(--ink-2); margin: 8px 0; }
.layer-items { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.layer-items a { color: var(--ink); font-size: 0.9rem; }
@media (max-width: 760px) {
  .layer { border-right: 0; border-bottom: 1px solid var(--line); }
  .layer:last-child { border-bottom: 0; }
}

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.card h3 a { text-decoration: none; }
.card-repo { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); margin: 2px 0 0; }
.card-summary { font-size: 0.93rem; margin: 10px 0 12px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--ink-2); margin: 0; align-items: center; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; font-size: 0.78rem; color: var(--ink-2); }
.tag-accent { border-color: var(--seal); color: var(--seal); }

/* works */
.works { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.works li { border-top: 1px solid var(--line); padding: 14px 0; }
.works a { display: flex; justify-content: space-between; gap: 12px; text-decoration: none; }
.works a span { color: var(--ink-2); font-family: var(--mono); font-size: 0.82rem; }
.works p { margin: 4px 0 0; font-size: 0.9rem; color: var(--ink-2); }

/* projects index */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.toc a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 14px; font-size: 0.9rem; }
section[id] { scroll-margin-top: 80px; }

/* skills */
.skill-list { list-style: none; padding: 0; margin: 28px 0 0; }
.skill-list li { border-top: 1px solid var(--line); padding: 22px 0; }
.skill-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.skill-head h2 { font-size: 1.2rem; margin: 0; }
.skill-head h2 a { text-decoration: none; }
.cmd { background: var(--code-bg); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 8px 0 0; }
.cmd code { background: none; padding: 0; font-size: 0.85rem; }

/* project detail */
.crumbs { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 18px; }
.project-head { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 28px; }
.install { margin-top: 16px; max-width: 760px; }
.install p { margin: 0; font-size: 0.85rem; }
.source-note { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; font-size: 0.85rem; }

.prose { max-width: 760px; overflow-wrap: anywhere; }
.prose h2 { margin-top: 2.2rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.prose h3 { margin-top: 1.6rem; }
.prose img { max-width: 100%; height: auto; }
.prose pre { background: var(--code-bg); padding: 14px; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1rem 0; padding: 0.2rem 1rem; border-left: 3px solid var(--seal); color: var(--ink-2); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.method { padding-left: 1.2rem; }
.method li { margin: 6px 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 40px; font-size: 0.9rem; }
.footer-inner p { margin: 4px 0; }
.site-footer p:first-child { font-family: var(--serif); letter-spacing: 0.15em; }

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; row-gap: 6px; }
  .lang-switch { margin-left: auto; }
  .site-header nav { order: 3; margin-left: 0; width: 100%; overflow-x: auto; gap: 16px; padding-bottom: 4px; white-space: nowrap; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .site-header nav { gap: 14px; font-size: 0.9rem; }
  .hero { padding-top: 40px; }
}

/* narrative pages: origin / system / works */
/* keep the reading column narrow but aligned with the header */
.narrative > * { max-width: 880px; }
.narrative > .eyebrow { margin-top: 0; }
.prose-text { max-width: 46em; }
.triad { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.triad li { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--paper-2); }
.triad-char { display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--seal); margin-bottom: 8px; }
.triad p { margin: 6px 0 0; font-size: 0.93rem; color: var(--ink-2); }
.qa div { border-top: 1px solid var(--line); padding: 14px 0; }
.qa dt { font-weight: 600; }
.qa dd { margin: 6px 0 0; color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin: 16px 0; }
.compare { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.compare th, .compare td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--serif); border-bottom: 2px solid var(--ink); }
.compare tbody th { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.loop, .flow, .steps { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.loop li, .flow li { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; background: var(--paper-2); font-size: 0.93rem; }
.loop li:not(:last-child)::after, .flow li:not(:last-child)::after { content: "→"; margin-left: 14px; color: var(--ink-2); }
.loop li:first-child, .loop li:last-child { border-color: var(--seal); }
.flow li.flow-gate { border-color: var(--seal); color: var(--seal); font-weight: 600; }
.flow-note { margin-top: -8px; }
.pull { margin: 14px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--seal); font-family: var(--serif); font-size: 1.1rem; }
.steps li { font-family: var(--serif); font-size: 1.15rem; padding: 8px 18px; border: 1px solid var(--ink); border-radius: var(--radius); }
.steps .layer-num { margin-right: 6px; }
.verse { margin: 12px 0; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); font-family: var(--serif); font-size: 1.2rem; line-height: 2; display: inline-block; }
.verse p { margin: 0; }
.link-list { padding-left: 1.1rem; }
.link-list li { margin: 6px 0; }
.principles { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.principles li { border-top: 2px solid var(--seal); padding-top: 10px; }
.principles p { margin: 4px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.role-title { margin: 28px 0 10px; font-size: 1.05rem; }
.roles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.roles li { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--paper-2); }
.roles b { font-family: var(--serif); font-size: 1.05rem; }
.roles p { margin: 4px 0 0; font-size: 0.88rem; color: var(--ink-2); }
.usage div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--line); padding: 10px 0; }
.usage dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .usage div { grid-template-columns: 1fr; gap: 4px; } }
.cases { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.case { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--paper-2); }
.case-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.case-head h2 { margin: 0; font-size: 1.3rem; }
.case-host { font-family: var(--mono); font-size: 0.85rem; }
.case dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 0; }
.case dt { color: var(--seal); font-size: 0.85rem; padding-top: 2px; }
.case dd { margin: 0; }
.case .mono { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); }
.case-links { margin: 14px 0 0; font-size: 0.9rem; }
@media (max-width: 560px) { .case dl { grid-template-columns: 1fr; } .case dt { padding-top: 8px; } }
.readme-note { font-size: 0.85rem; }
.site-header { position: sticky; }

/* classics */
.subtitle { margin-top: -6px; }
.chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 0.88rem; text-decoration: none; background: var(--paper); }
.chips a:hover { border-color: var(--seal); }
.toc-list { list-style: none; padding: 0; margin: 24px 0 0; }
.toc-list li { border-top: 1px solid var(--line); padding: 14px 0; }
.toc-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; text-decoration: none; }
.toc-list a b { font-family: var(--serif); font-size: 1.15rem; }
.toc-list .layer-num { min-width: 2.2em; }
.toc-list p { margin: 4px 0 0 calc(2.2em + 12px); color: var(--ink-2); font-size: 0.93rem; }
@media (max-width: 560px) { .toc-list p { margin-left: 0; } }
.apply { border: 1px solid var(--seal); border-left-width: 4px; border-radius: var(--radius); padding: 14px 18px; margin: 20px 0 8px; background: var(--paper-2); }
.apply b { color: var(--seal); font-size: 0.85rem; letter-spacing: 0.08em; }
.apply p { margin: 6px 0 0; }
.apply p.muted { font-size: 0.88rem; }
.classic-text[lang^="zh"] p { font-family: var(--serif); font-size: 1.12rem; line-height: 2; max-width: 40em; }
.verses { list-style: none; padding: 0; margin: 0; max-width: 46em; }
.verses li { display: grid; grid-template-columns: 3.2em 1fr; gap: 8px; padding: 6px 0; }
.verses p { margin: 0; }
.verse-n { color: var(--seal); font-family: var(--mono); font-size: 0.82rem; padding-top: 4px; text-align: right; }
.verse-line { display: block; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; font-size: 0.95rem; }
.pager a { text-decoration: none; }
.tao-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px; }
.tao-grid a { display: block; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); }
.tao-grid .layer-num { display: inline-block; min-width: 1.8em; font-family: var(--mono); font-size: 0.8rem; }
.verse.tao { display: block; max-width: 36em; font-size: 1.25rem; }
