/* 拾光笔记 — 水墨靛蓝 */
:root {
  --ink: #1c2434;
  --ink-soft: #3d4a5c;
  --muted: #6b7380;
  --paper: #f4f1ea;
  --paper-card: #fffcf7;
  --line: #e4ddd0;
  --indigo: #3d4fd6;
  --indigo-deep: #2a3488;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --nav-h: 4rem;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(28, 36, 52, 0.06);
  --shadow-hover: 0 16px 40px rgba(45, 64, 180, 0.12);
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC",
    "Source Han Serif SC", "Noto Serif SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max: 720px;
  --wide: 1040px;
  --toc-w: 240px;
}

[data-section="pythons"] { --sec: #3b82f6; --sec-bg: #e8f1ff; }
[data-section="docker"] { --sec: #0ea5e9; --sec-bg: #e0f6ff; }
[data-section="heart"] { --sec: #c45c7a; --sec-bg: #fdecef; }
[data-section="golang"] { --sec: #14b8a6; --sec-bg: #e5faf6; }
[data-section="tools"] { --sec: #6366f1; --sec-bg: #ecebff; }
[data-section="note"] { --sec: #d97706; --sec-bg: #fff3dd; }
[data-section="design"] { --sec: #0f766e; --sec-bg: #e6f6f3; }
[data-section="ros"] { --sec: #7c3aed; --sec-bg: #f1e9ff; }

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(61, 79, 214, 0.08), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(201, 162, 39, 0.08), transparent 50%),
    var(--paper);
}

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover { color: var(--indigo-deep); }

img { max-width: 100%; height: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(228, 221, 208, 0.8);
}

.nav-inner {
  max-width: var(--wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand:hover { color: var(--indigo); text-decoration: none; }

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(18, 22, 42, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu > li { position: relative; }

.nav-menu a,
.nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.nav-menu a:hover,
.nav-dropdown > button:hover {
  color: var(--indigo);
  background: rgba(61, 79, 214, 0.08);
  text-decoration: none;
}

.nav-menu a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  box-shadow: 0 6px 16px rgba(61, 79, 214, 0.28);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown.open > .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  width: 100%;
  border-radius: 10px;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1rem 1rem;
    background: rgba(255, 252, 247, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-menu.open { display: flex; }

  .nav-menu a,
  .nav-dropdown > button {
    width: 100%;
    justify-content: flex-start;
    padding: 0.75rem 0.9rem;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0.4rem 1rem;
  }

  .nav-dropdown.open > .nav-dropdown-menu { display: block; }
}

/* Layout */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.2rem 1.25rem 4rem;
}

.site-main.wide { max-width: var(--wide); }

/* Home hero */
.hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 2.4rem;
  padding: 3rem 2.2rem 2.4rem;
  color: #f6f1e4;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(16, 18, 48, 0.55), rgba(16, 22, 64, 0.72)),
    url("../media/bg-triangles.svg") center / cover;
  box-shadow: 0 24px 50px rgba(24, 28, 72, 0.22);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero h1 {
  position: relative;
  margin: 0 0 0.8rem;
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.hero-lead {
  margin: 0 0 0.5rem;
  color: rgba(246, 241, 228, 0.82);
  font-size: 1.05rem;
}

.hero-stat {
  margin: 0 0 1.4rem;
  color: rgba(232, 212, 139, 0.9);
  font-size: 0.9rem;
}

.jump-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 0.86rem;
}

.jump-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.chip-mark,
.card-mark {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
}

.chip-n {
  opacity: 0.7;
  font-size: 0.75rem;
}

/* Section */
.section-block {
  margin-bottom: 2.2rem;
  scroll-margin-top: 5.2rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.section-head h2 a { color: var(--ink); }

.section-head h2 a:hover { color: var(--indigo); text-decoration: none; }

.section-more {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-hero,
.article-hero {
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.page-title {
  margin: 0 0 0.45rem;
  font-family: var(--font);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.page-meta,
.section-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta-sep { margin: 0 0.45rem; opacity: 0.5; }

.page-summary {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  color: var(--ink-soft);
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sec, var(--gold));
  border-radius: 0 14px 14px 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Cards */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.page-home .article-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.article-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.card-link {
  display: flex;
  gap: 0.85rem;
  padding: 1.05rem 1.1rem 1.1rem;
  color: inherit;
}

.card-link:hover { color: inherit; text-decoration: none; }

.article-card .card-mark {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  color: var(--sec, var(--indigo));
  background: var(--sec-bg, #ecebff);
}

.card-body { min-width: 0; }

.article-list .title {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.article-card:hover .title { color: var(--indigo); }

.article-list .date {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.article-list .summary {
  display: -webkit-box;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Article */
.article-content {
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--ink);
  font-family: var(--font);
  scroll-margin-top: 5.2rem;
}

.article-content h2 {
  margin: 2.1rem 0 0.8rem;
  padding-bottom: 0.4rem;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.article-content h3 { margin: 1.6rem 0 0.55rem; font-size: 1.18rem; }
.article-content h4 { margin: 1.3rem 0 0.45rem; font-size: 1.05rem; }
.article-content p { margin: 0.9rem 0; }
.article-content ul,
.article-content ol { padding-left: 1.35rem; }

.article-content blockquote {
  margin: 1.2rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  color: var(--ink-soft);
  border-left: 3px solid var(--gold);
  background: transparent;
  font-family: var(--font);
}

.article-content table {
  display: block;
  width: 100%;
  margin: 1.1rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  background: var(--paper-card);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.article-content th,
.article-content td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.article-content th {
  background: #efe8d8;
  font-weight: 650;
}

.article-content hr {
  border: none;
  height: 1px;
  margin: 2.2rem 0;
  background: var(--line);
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: #ece6d8;
  color: #6b2d3c;
}

.article-content pre {
  margin: 1.15rem 0;
  padding: 1.05rem 1.15rem;
  overflow-x: auto;
  border-radius: 14px;
  background: #1b2230;
  color: #e7edf5;
  box-shadow: var(--shadow);
}

.article-content pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.6;
}

.article-content ruby rt {
  font-size: 0.62em;
  color: var(--muted);
}

.toc {
  margin: 0 0 1.8rem;
  padding: 0.85rem 0.95rem 0.95rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
}

.toc-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
}

.toc-toggle {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.toc-toggle:hover { color: var(--indigo); border-color: var(--indigo); }

.toc-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.toc-tree,
.toc-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-children {
  padding: 0.15rem 0 0.25rem 0.7rem;
  border-left: 1px solid var(--line);
  margin-left: 0.45rem;
}

.toc-item { margin: 0.12rem 0; }

.toc-row {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
}

.toc-fold {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.12rem;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 0.7rem;
}

.toc-fold[hidden] {
  visibility: hidden;
  display: inline-block;
  pointer-events: none;
}

.toc-item.is-folded > .toc-children { display: none; }

.toc a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.12rem 0.2rem;
  border-radius: 6px;
}

.toc a:hover { color: var(--indigo); text-decoration: none; background: var(--sec-bg, #efe8d8); }

.toc a.is-active {
  color: var(--indigo);
  font-weight: 650;
  background: var(--sec-bg, #efe8d8);
}

.toc.is-collapsed .toc-body { display: none; }
.toc.is-collapsed { padding-bottom: 0.75rem; }

@media (min-width: 1080px) {
  .page-article.has-toc .site-main {
    max-width: 1180px;
    display: grid;
    grid-template-columns: var(--toc-w) minmax(0, var(--max));
    justify-content: center;
    column-gap: 2rem;
    align-items: start;
  }

  .page-article.has-toc .site-main > :not(.toc) {
    grid-column: 2;
  }

  .page-article.has-toc .toc {
    grid-column: 1;
    grid-row: 1 / 80;
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
    align-self: start;
    margin: 0;
    max-height: calc(100vh - var(--nav-h) - 2rem);
    display: flex;
    flex-direction: column;
    z-index: 5;
  }

  .page-article.has-toc .toc-body {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 0.15rem;
  }

  .page-article.has-toc.toc-slim .site-main {
    grid-template-columns: 3rem minmax(0, var(--max));
  }

  .page-article.has-toc.toc-slim .toc {
    padding: 0.7rem 0.35rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    align-items: center;
  }

  .page-article.has-toc.toc-slim .toc-head {
    margin: 0;
    flex-direction: column;
    gap: 0.6rem;
  }

  .page-article.has-toc.toc-slim .toc-toggle {
    writing-mode: horizontal-tb;
  }
}

@media (max-width: 1079px) {
  .page-article.has-toc .toc {
    position: sticky;
    top: var(--nav-h);
    z-index: 15;
    max-height: none;
  }

  .page-article.has-toc .toc-body {
    max-height: min(42vh, 22rem);
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2.2rem 1.25rem;
  color: rgba(246, 241, 228, 0.75);
  background:
    linear-gradient(180deg, #1a1f38, #12162a);
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font);
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  color: #f6f1e4;
}

.footer-couple {
  margin: 0 0 0.9rem;
  color: var(--gold-soft);
  font-family: var(--font);
  letter-spacing: 0.12em;
}

.footer-beian {
  margin: 0;
  font-size: 0.82rem;
}

.footer-beian a { color: rgba(246, 241, 228, 0.7); }
.footer-beian a:hover { color: var(--gold-soft); }
.footer-beian img {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}
.footer-beian .dot { margin: 0 0.4rem; opacity: 0.45; }

.empty-hint { color: var(--muted); }

/* Design-doc diagrams */
.diagram {
  margin: 1.4rem 0 1.6rem;
  padding: 1rem 1rem 0.85rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.diagram figcaption {
  margin: 0.85rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.legend-kicker {
  margin: 0 0 0.7rem;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.diag-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.15rem;
  margin: 0.9rem 0 0;
  padding: 0.8rem 0.1rem 0.15rem;
  border-top: 1px dashed var(--line);
}

.diag-key-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.3;
}

.diag-key-item i { font-style: normal; }

.diag-key-item > svg {
  display: block;
  flex-shrink: 0;
}

.dk-box,
.dk-dot,
.dk-final,
.dk-circ,
.dk-store,
.dk-note,
.dk-life,
.dk-arrow,
.dk-self {
  display: inline-block;
  box-sizing: border-box;
  flex-shrink: 0;
}

.dk-box {
  width: 1.45rem;
  height: 0.82rem;
  border: 1.5px solid #6b7380;
  border-radius: 3px;
  background: #f4f1ea;
}

.dk-box.is-own { background: #e6f6f3; border-color: #0f766e; }
.dk-box.is-app { background: #e8f1ff; border-color: #3b82f6; }
.dk-box.is-ai { background: #e6f6f3; border-color: #14b8a6; }
.dk-box.is-evt { background: #f1e9ff; border-color: #7c3aed; }
.dk-box.is-dom { background: #fff3dd; border-color: #d97706; }
.dk-box.is-infra { background: #f3f4f6; border-color: #9ca3af; }
.dk-box.is-dash { border-style: dashed; }
.dk-box.is-layer { width: 2.15rem; }
.dk-box.is-round { border-radius: 999px; width: 1.65rem; }
.dk-box.is-square { border-radius: 1px; }
.dk-box.is-zone {
  width: 1.7rem;
  height: 1rem;
  background: #fff;
  border-color: #c9a227;
  border-style: dashed;
}

.dk-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #1c2434;
}

.dk-final {
  width: 0.72rem;
  height: 0.72rem;
  border: 1.5px solid #6b7380;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fffcf7;
  background: #f3f4f6;
}

.dk-circ {
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid #0f766e;
  border-radius: 50%;
  background: #e6f6f3;
}

.dk-store {
  width: 1.7rem;
  height: 0.7rem;
  border: solid #3b82f6;
  border-width: 1.5px 0 1.5px 1.5px;
  background: transparent;
}

.dk-note {
  width: 0.85rem;
  height: 0.85rem;
  background:
    linear-gradient(225deg, transparent 38%, #fde68a 38%) top right / 0.38rem 0.38rem no-repeat,
    #fef9c3;
  border: 1.4px solid #d97706;
}

.dk-life {
  width: 0;
  height: 0.95rem;
  border-left: 1.5px dashed #c4b8a4;
}

.dk-arrow {
  position: relative;
  width: 1.45rem;
  height: 0;
  border-top: 1.6px solid #4b5563;
}

.dk-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4.5px;
  border: 4px solid transparent;
  border-left: 6px solid #4b5563;
}

.dk-arrow.is-teal { border-top-color: #0f766e; }
.dk-arrow.is-teal::after { border-left-color: #0f766e; }
.dk-arrow.is-blue { border-top-color: #3d4fd6; }
.dk-arrow.is-blue::after { border-left-color: #3d4fd6; }
.dk-arrow.is-rose { border-top-color: #c45c7a; }
.dk-arrow.is-rose::after { border-left-color: #c45c7a; }
.dk-arrow.is-amber { border-top-color: #d97706; }
.dk-arrow.is-amber::after { border-left-color: #d97706; }
.dk-arrow.is-dash { border-top-style: dashed; }
.dk-arrow.is-fail { border-top-style: dashed; border-top-color: #c45c7a; }
.dk-arrow.is-fail::after {
  border: none;
  width: 7px;
  height: 7px;
  top: -4.5px;
  right: -2px;
  background:
    linear-gradient(45deg, transparent 42%, #c45c7a 42%, #c45c7a 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #c45c7a 42%, #c45c7a 58%, transparent 58%);
}

.dk-self {
  width: 0.7rem;
  height: 0.7rem;
  border: 1.5px solid #d97706;
  border-left: none;
  border-radius: 0 4px 4px 0;
}

.diagram .diag-key + figcaption {
  border-top: none;
  padding-top: 0.45rem;
}

.arch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.arch-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
}

.arch-box {
  min-width: 7.2rem;
  padding: 0.55rem 0.75rem;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.86rem;
  line-height: 1.35;
}

.arch-box small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.arch-box.is-new {
  border-color: #0f766e;
  background: #e6f6f3;
}

.arch-box.is-ext {
  background: #f4f1ea;
  color: var(--ink-soft);
}

.arch-arrow {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--font-sans);
}

.diag-key svg {
  width: auto;
  height: auto;
  max-width: none;
  margin: 0;
}

.sample-doc {
  padding: 0.2rem 0 0.4rem;
}

.sample-doc > .eyebrow {
  color: #0f766e;
}

.layers {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.layer {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.layer h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.layer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.layer-tag {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.layer-iface { background: #e8f1ff; border-color: #93c5fd; }
.layer-app { background: #e6f6f3; border-color: #5eead4; }
.layer-dom { background: #fff3dd; border-color: #fbbf24; }
.layer-infra { background: #f3f4f6; border-color: #d1d5db; }

.layer-rule {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.deploy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.deploy-zone {
  padding: 0.7rem 0.75rem 0.8rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}

.deploy-zone-title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.deploy-zone .arch-row { justify-content: flex-start; }

.deploy-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .hero { padding: 2.2rem 1.25rem 1.8rem; border-radius: 20px; }
  .page-home .article-list { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 0.25rem; }
}
