:root {
  --cjk-sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Hiragino Sans CNS", "Heiti TC", sans-serif;
  --cjk-serif: "Songti TC", "Noto Serif TC", "PMingLiU", "Hiragino Mincho ProN", serif;
  --prose: 1.02rem;
  --amber: #f1b061;
}

body {
  font-family: "Archive Mono", var(--cjk-sans), monospace;
}

.brand strong,
.primary-nav a,
.primary-action,
.entry-id,
.record-code,
.mechanical-footer a strong,
.mechanical-footer p strong,
.record-grid > h2,
.source-register > h2,
.principles > h2,
.principle-grid article > span {
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
}

h1 {
  max-width: 22em;
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: clamp(1.9rem, 4.2vw, 3.05rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.005em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
  line-break: strict;
}

.lede {
  max-width: 34em;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.85;
}

.eyebrow,
.panel-label,
.status-strip,
.tree-shortcuts a,
.care-note {
  letter-spacing: 0.02em;
}

.eyebrow {
  display: block;
}

.archive-panel li a,
.tree-shortcuts a,
.tree-shortcuts a span,
.status-list dt,
.status-list dd strong,
.status-list dd span,
.last-update span,
.last-update time,
.care-note,
.care-note small,
.panel-label,
.status-strip,
.entry-topic,
.entry-row time,
.entry-action,
.index-card p,
.source-register p,
.principle-grid p,
.archive-photo figcaption,
.mechanical-footer a span,
.mechanical-footer p span {
  font-size: 0.78rem;
  line-height: 1.6;
  text-transform: none;
}

.entry-title strong,
.index-card h3,
.source-register h3,
.principle-grid h3 {
  font-size: 0.97rem;
  line-height: 1.5;
  text-transform: none;
}

.entry-title small {
  font-size: 0.8rem;
  line-height: 1.6;
}

.primary-nav a {
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.primary-action {
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.record-grid > h2,
.source-register > h2,
.principles > h2 {
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brand span {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

:root {
  --cyr-mono: "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Liberation Mono",
    "Noto Sans Mono", monospace;
}

[lang="uk"] body,
.lang-uk body {
  font-family: "Archive Mono", var(--cyr-mono);
}

[lang="uk"] h1,
[lang="uk"] .prose h2,
[lang="uk"] .prose h3,
[lang="uk"] .qa > h2,
[lang="uk"] .filed-group > h2,
[lang="uk"] .record-grid > h2,
[lang="uk"] .primary-nav a,
[lang="uk"] .primary-action,
[lang="uk"] .code-copy,
[lang="uk"] .mechanical-footer a strong {
  font-family: "Archive Mono", var(--cyr-mono);
  font-weight: 600;
}

[lang="uk"] h1 {
  max-width: 18em;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
}

[lang="uk"] .prose,
[lang="uk"] .qa dd {
  font-size: 1rem;
  line-height: 1.85;
}

[lang="uk"] .prose h2 {
  font-size: 1.22rem;
}

[lang="uk"] .prose p,
[lang="uk"] .qa dd,
[lang="uk"] .lede {
  overflow-wrap: break-word;
  hyphens: auto;
}

[lang="uk"] h1,
[lang="uk"] h2,
[lang="uk"] h3 {
  overflow-wrap: break-word;
  hyphens: manual;
}

@media (max-width: 760px) {
  [lang="uk"] h1 {
    font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  }
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--soft-line);
  list-style: none;
  font-size: 0.78rem;
  line-height: 1.6;
}

.lang-switch > span:first-child {
  color: #6c695d;
}

.lang-switch a {
  border-bottom: 1px solid var(--soft-line);
}

.lang-switch a:hover {
  color: var(--rust);
}

.lang-switch [aria-current="true"] {
  color: var(--rust);
  font-weight: 600;
  border-bottom: 0;
}

.code-plate {
  margin: 30px 0 0;
  border: 1px solid #45463b;
  background: rgba(226, 218, 200, 0.5);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.code-plate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  color: #e8e1d1;
  background: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
}

.code-plate-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 16px 16px;
}

.code-value {
  display: block;
  color: var(--ink);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: clamp(2rem, 5.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
}

.code-value-label {
  display: block;
  margin-bottom: 9px;
  color: #666257;
  font-size: 0.76rem;
}

.code-copy {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid #753018;
  color: #fff6e9;
  background: var(--rust);
  box-shadow: 0 3px 0 #74301a;
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.code-copy:hover {
  background: #8f3617;
}

.code-copy[data-copied="true"] {
  border-color: #0d2c23;
  background: var(--green);
  box-shadow: 0 3px 0 #0d2c23;
}

.code-note {
  margin: 0;
  padding: 0 16px 16px;
  color: #5c594f;
  font-size: 0.78rem;
  line-height: 1.7;
}

.code-note sup {
  color: var(--rust);
}

.desk-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-left: 4px solid var(--green);
  background: rgba(239, 234, 220, 0.5);
}

.desk-pick > span {
  color: var(--rust);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}

.desk-pick h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.5;
}

.desk-pick h3 a {
  border-bottom: 1px solid var(--rust);
}

.desk-pick p {
  margin: 0;
  color: #5c594f;
  font-size: 0.85rem;
  line-height: 1.75;
}

.dossier-label {
  margin-bottom: 10px;
}

.dossier-research .dossier-sheet {
  min-height: 720px;
}

.dossier-article .dossier-sheet {
  min-height: 0;
}

.dossier-wide {
  grid-column: 2 / -1;
}

.crumbs {
  margin: 0 0 20px;
  color: #666257;
  font-size: 0.76rem;
  line-height: 1.7;
}

.crumbs a {
  border-bottom: 1px solid var(--soft-line);
}

.crumbs a:hover {
  color: var(--rust);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 22px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  color: #5f5c51;
  font-size: 0.77rem;
  line-height: 1.7;
}

.toc {
  margin: 30px 0 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--soft-line);
  background: rgba(200, 189, 163, 0.28);
}

.toc > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 26px;
}

.toc li {
  margin-bottom: 7px;
  font-size: 0.85rem;
  line-height: 1.6;
  break-inside: avoid;
}

.toc a:hover {
  color: var(--rust);
}

.prose {
  max-width: 40em;
  margin-top: 34px;
  font-size: var(--prose);
  line-height: 1.95;
}

.prose h2 {
  margin: 48px 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.45;
  scroll-margin-top: 16px;
}

.prose h3 {
  margin: 32px 0 12px;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.6;
}

.prose p {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 10px;
}

.prose a {
  border-bottom: 1px solid var(--rust);
}

.prose a:hover {
  color: var(--rust);
}

.prose strong {
  font-weight: 600;
}

.prose hr {
  margin: 34px 0;
  border: 0;
  border-top: 3px dashed var(--rust);
  width: min(60%, 280px);
}

.screen-quote {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--rust);
  background: var(--coal);
  color: #d9d3c4;
  font-size: 0.95rem;
  line-height: 1.8;
}

.screen-quote em {
  color: var(--amber);
  font-style: normal;
}

.answer-first {
  margin: 0 0 26px;
  padding: 18px 20px;
  border: 1px solid #45463b;
  background: rgba(226, 218, 200, 0.55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  line-height: 1.85;
}

.answer-first > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.8rem;
}

.answer-first p:last-child {
  margin-bottom: 0;
}

.stop-note {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px dashed #8a4a20;
  background: rgba(185, 77, 34, 0.08);
  font-size: 0.95rem;
  line-height: 1.85;
}

.stop-note > strong {
  color: #8f3617;
}

.prose table {
  width: 100%;
  margin: 0 0 24px;
  border-collapse: collapse;
  font-size: 0.87rem;
  line-height: 1.7;
}

.prose th,
.prose td {
  padding: 11px 12px;
  border: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: #e8e1d1;
  background: var(--green);
  font-weight: 600;
}

.prose tbody tr:nth-child(2n) td {
  background: rgba(200, 189, 163, 0.2);
}

.table-scroll {
  margin: 0 0 24px;
  overflow-x: auto;
}

.table-scroll table {
  margin-bottom: 0;
  min-width: 34em;
}

.article-cover {
  margin: 30px 0 0;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #3f4139;
}

.article-cover figcaption {
  padding-top: 10px;
  color: #666257;
  font-size: 0.76rem;
  line-height: 1.6;
}

.qa {
  max-width: 40em;
  margin-top: 46px;
}

.qa > h2 {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.qa dt {
  margin-top: 20px;
  font-size: 0.99rem;
  font-weight: 600;
  line-height: 1.7;
}

.qa dd {
  margin: 9px 0 0;
  font-size: 0.95rem;
  line-height: 1.9;
}

.basis {
  max-width: 40em;
  margin-top: 40px;
  padding: 15px 17px;
  border: 1px solid var(--soft-line);
  color: #5c594f;
  font-size: 0.84rem;
  line-height: 1.85;
}

.basis a {
  border-bottom: 1px solid var(--soft-line);
}

.related {
  max-width: 40em;
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.related > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related li {
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: 0.9rem;
  line-height: 1.7;
}

.related li a:hover {
  color: var(--rust);
}

.related li span {
  display: block;
  margin-top: 4px;
  color: #6c695d;
  font-size: 0.8rem;
}

.filed-list {
  margin-top: 36px;
}

.filed-group {
  margin-bottom: 38px;
}

.filed-group > h2 {
  margin: 0 0 6px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.filed-group > p {
  margin: 0 0 6px;
  color: #5c594f;
  font-size: 0.85rem;
  line-height: 1.8;
}

.filed-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 8px 16px 0;
  border-bottom: 1px solid var(--soft-line);
}

.filed-row:hover {
  background: rgba(200, 189, 163, 0.26);
}

.filed-row > span {
  color: var(--rust);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: 1.35rem;
  line-height: 1.3;
}

.filed-row h3 {
  margin: 0;
  font-size: 0.99rem;
  font-weight: 600;
  line-height: 1.55;
}

.filed-row p {
  margin: 7px 0 0;
  color: #5c594f;
  font-size: 0.84rem;
  line-height: 1.75;
}

.filed-row .filed-meta {
  display: block;
  margin-top: 8px;
  color: #6c695d;
  font-size: 0.76rem;
}

.tool-panel {
  margin-top: 32px;
  border: 1px solid #24261e;
  background: var(--coal);
  color: #ded8c9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.tool-panel-head {
  padding: 10px 16px;
  border-bottom: 1px solid #2f3128;
  color: #8a8d80;
  font-size: 0.78rem;
}

.tool-body {
  padding: 20px 18px;
}

.tool-field {
  display: block;
  margin-bottom: 16px;
}

.tool-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  line-height: 1.6;
}

.tool-field input,
.tool-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #4a4c40;
  color: #f0eadc;
  background: #1b1e18;
  font-family: "Archive Mono", var(--cjk-sans), monospace;
  font-size: 0.95rem;
}

.tool-field input:focus,
.tool-field select:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.tool-choices {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.tool-choice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #3d3f35;
  background: #1b1e18;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.7;
}

.tool-choice:hover {
  border-color: var(--green-bright);
}

.tool-choice input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: var(--rust);
}

.tool-choice > span {
  flex: 1 1 auto;
  min-width: 0;
}

.tool-result {
  margin-top: 4px;
  padding: 20px 18px;
  border: 1px solid #3d3f35;
  background: #16191300;
  background-color: #191c16;
}

.tool-result-main {
  display: block;
  margin-bottom: 12px;
  color: var(--amber);
  font-family: "Archive Display", var(--cjk-sans), Impact, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.3;
}

.tool-result p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.85;
}

.tool-result p:last-child {
  margin-bottom: 0;
}

.tool-result ul {
  margin: 0 0 12px;
  padding-left: 1.4em;
  font-size: 0.92rem;
  line-height: 1.85;
}

.tool-result a {
  color: var(--green-bright);
  border-bottom: 1px solid currentColor;
}

.tool-caveat {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--rust);
  background: rgba(185, 77, 34, 0.12);
  font-size: 0.85rem;
  line-height: 1.8;
}

.tool-guide {
  max-width: 40em;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.tool-guide > summary {
  padding: 14px 2px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.tool-guide h3 {
  margin: 26px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
}

.tool-guide p,
.tool-guide li {
  font-size: 0.95rem;
  line-height: 1.9;
}

.tool-guide p {
  margin: 0 0 15px;
}

.tool-guide ul {
  margin: 0 0 16px;
  padding-left: 1.5em;
}

.tool-guide a {
  border-bottom: 1px solid var(--rust);
}

.site-foot {
  margin: 0 12px 12px;
  padding: 18px 16px;
  border: 1px solid #4c4b3f;
  background: rgba(210, 201, 182, 0.55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.site-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  line-height: 1.7;
}

.site-foot-links a {
  border-bottom: 1px solid var(--soft-line);
}

.site-foot-links a:hover {
  color: var(--rust);
}

.site-foot p {
  margin: 0 0 8px;
  color: #5c594f;
  font-size: 0.8rem;
  line-height: 1.8;
}

.site-foot p:last-child {
  margin-bottom: 0;
}

.site-foot p a {
  border-bottom: 1px solid var(--soft-line);
}

@media (max-width: 760px) {
  .dossier {
    order: 1;
  }

  .archive-panel {
    order: 2;
  }

  .source-panel {
    order: 3;
  }

  .dossier-research .dossier-sheet {
    padding-top: 16px;
  }

  .dossier-research .rule {
    display: none;
  }

  .dossier-research .lede {
    margin-bottom: 0;
  }

  .lang-switch {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .rule {
    width: min(70%, 260px);
    margin: 14px 0;
  }

  .code-plate-body {
    padding: 14px 14px 12px;
  }

  .code-note {
    padding: 0 14px 14px;
  }

  .code-plate {
    margin-top: 22px;
  }

  .archive-photo figcaption {
    font-size: 0.76rem;
  }

  h1 {
    font-size: clamp(1.65rem, 6.6vw, 2.2rem);
  }

  .lede {
    font-size: 0.93rem;
  }

  .prose,
  .qa,
  .basis,
  .related,
  .tool-guide {
    max-width: none;
  }

  .prose {
    font-size: 0.98rem;
    line-height: 1.9;
  }

  .prose h2 {
    margin-top: 38px;
    font-size: 1.18rem;
  }

  .toc ol {
    columns: 1;
  }

  .code-plate-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-copy {
    width: 100%;
  }

  .desk-pick {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .filed-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .site-foot {
    margin: 0 8px 8px;
  }

  .entry-topic {
    display: block;
    color: var(--green);
    font-weight: 600;
  }
}

@media (max-width: 390px) {
  .prose table {
    font-size: 0.82rem;
  }

  .code-value {
    letter-spacing: 0.06em;
  }
}

body,
.console-shell,
.primary-nav,
.archive-panel,
.source-panel,
.dossier-sheet,
.recent-panel {
  background-image: url(/assets/equipment-grain.webp);
}

.primary-action {
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.primary-action:hover {
  background: #c8552a;
  box-shadow: 0 4px #74301a;
  transform: translateY(-1px);
}
.primary-action:active {
  box-shadow: 0 0 var(--rust);
  transform: translateY(3px);
}

.primary-nav a:not([aria-current="page"]):hover {
  background: rgba(18, 62, 49, .1);
  color: var(--green);
}

.tree-shortcuts a {
  transition: background-color .14s ease, padding-left .14s ease;
}
.tree-shortcuts a:hover {
  padding-left: 9px;
  background: rgba(18, 62, 49, .07);
}

.desk-pick {
  transition: border-left-color .16s ease, background-color .16s ease;
}
.desk-pick:hover {
  border-left-color: var(--rust);
  background: rgba(239, 234, 220, .78);
}

.entry-row {
  transition: background-color .14s ease;
}
.entry-row:hover {
  background: rgba(247, 243, 232, .6);
}
.filed-row {
  transition: background-color .14s ease;
}
.toc a {
  transition: color .12s ease;
}

.code-copy {
  transition: transform .1s ease, background-color .12s ease;
}
.code-copy:active {
  transform: translateY(1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}
.primary-action:focus-visible,
.code-copy:focus-visible {
  outline-offset: 3px;
}

@media (min-width: 1000px) {
  .console-shell {
    overflow: clip;
  }
  .archive-panel,
  .source-panel {
    position: sticky;
    top: 10px;
    align-self: start;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-action,
  .tree-shortcuts a,
  .desk-pick,
  .entry-row,
  .filed-row,
  .toc a,
  .code-copy {
    transition: none;
  }
  .primary-action:hover,
  .primary-action:active,
  .code-copy:active {
    transform: none;
  }
  .tree-shortcuts a:hover {
    padding-left: 4px;
  }
}

@media (min-width: 1240px) {
  .console-shell {
    max-width: 1320px;
  }
  .console-main {
    grid-template-columns: 264px minmax(0, 1fr) 232px;
    gap: 12px;
    padding: 0 14px 12px;
  }
  .prose,
  .qa,
  .basis,
  .related,
  .tool-guide {
    max-width: 42em;
  }
}

@media (min-width: 1560px) {
  .console-shell {
    max-width: 1480px;
  }
  .console-main {
    grid-template-columns: 284px minmax(0, 1fr) 252px;
  }
  .dossier-sheet {
    padding-right: clamp(24px, 4.4vw, 72px);
    padding-left: clamp(24px, 4.4vw, 72px);
  }
  .prose,
  .qa,
  .basis,
  .related,
  .tool-guide {
    max-width: 44em;
  }
}

.lang-switch {
  position: relative;
  justify-content: flex-end;
  align-items: center;
  gap: 0 8px;
  font-size: 0.82rem;
}

.lang-switch > span:first-child {
  color: #6c695d;
  font-size: 0.76rem;
}

.lang-switch a {
  border-bottom: 1px solid var(--soft-line);
}

.lang-switch a:hover {
  color: var(--rust);
}

.lang-switch [aria-current="true"] {
  color: var(--rust);
  font-weight: 600;
  border-bottom: 0;
}

.lang-switch--menu {
  gap: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:hover,
.lang-toggle[aria-expanded="true"] {
  color: #f0eadc;
  border-color: var(--green);
  background: var(--green);
}

.lang-caret {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.lang-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  width: max-content;
  min-width: 130px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #efeadc;
  box-shadow: 0 6px 18px rgba(23, 24, 17, 0.22);
  list-style: none;
}

.lang-menu li {
  margin: 0;
}

.lang-menu a,
.lang-menu [aria-current="true"] {
  display: block;
  padding: 7px 14px;
  border: 0;
  white-space: nowrap;
}

.lang-menu [aria-current="true"] {
  color: #6c695d;
  font-weight: 600;
  cursor: default;
}

.lang-menu a {
  color: var(--ink);
}

.lang-menu a:hover,
.lang-menu a:focus-visible {
  color: #f0eadc;
  background: var(--rust);
}

@media (max-width: 760px) {
  .lang-switch {
    justify-content: flex-start;
  }
  .lang-menu {
    right: auto;
    left: 0;
  }
}
