/* INPUT: 用户指定的 ianneo.xyz 极简文字单栏参考。
 * OUTPUT: 三个静态页面的响应式、明暗主题及键盘焦点样式。
 * POS: public；共享视觉层。
 * PROTOCOL: 页面结构变更时同步移动端与无脚本核验。 */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  /* 只给基本拉丁字符用，中文引号、破折号交给系统中文字体 */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2122;
}
:root {
  color-scheme: light;
  --background: #ffffff;
  --ink: #242426;
  --body: #626269;
  --subtle: #6f6f76;
  --surface: #f4f4f5;
  --rule: #e6e6e9;
  --underline: #c9c9ce;
  --focus: #354f9b;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #181819; --ink: #f1f1f2; --body: #b5b5bd; --subtle: #a1a1aa;
  --surface: #262628; --rule: #343437; --underline: #55555b; --focus: #a8bbff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #181819; --ink: #f1f1f2; --body: #b5b5bd; --subtle: #a1a1aa;
    --surface: #262628; --rule: #343437; --underline: #55555b; --focus: #a8bbff;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--background); text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--body);
  background: var(--background);
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 28px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--ink);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 5px;
  transition: text-decoration-color .15s;
}
a:hover { text-decoration-color: currentColor; }
.main p a { white-space: nowrap; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
::selection { color: var(--ink); background: var(--surface); }

.page { width: min(100% - 48px, 550px); margin: 0 auto; padding: clamp(40px, 12vh, 120px) 0 40px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 44px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; text-decoration: none; }
.brand-logo { position: relative; display: block; flex: 0 0 24px; width: 24px; height: 24px; overflow: hidden; }
/* 现有 32px 裁切参数整体按 0.75 缩放：50→37.5，-11→-8.25，-9→-6.75 */
.brand-logo img { position: absolute; width: 37.5px; height: 37.5px; max-width: none; left: -8.25px; top: -6.75px; }
[data-theme="dark"] .brand-logo img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .brand-logo img { filter: brightness(0) invert(1); } }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -13px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--subtle); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover { color: var(--ink); background: var(--surface); }
.sun { display: none; }
[data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: block; }

.main { margin-top: 46px; }
h1, h2 { margin: 0; color: var(--ink); font-size: 15px; line-height: 28px; letter-spacing: 0; text-wrap: balance; }
h1 { font-weight: 400; margin-bottom: 28px; }
h2 { font-weight: 500; }
p { margin: 0 0 28px; text-wrap: pretty; }
.main > :last-child, section > :last-child { margin-bottom: 0; }

.doc-head { margin-bottom: 28px; }
.doc-head h1 { margin: 0; }
.doc-head p { margin: 0; font-size: 13px; line-height: 22px; color: var(--subtle); }
section + section { margin-top: 28px; }
.facts { display: grid; grid-template-columns: 5em 1fr; column-gap: 16px; margin: 0; }
.facts dt { color: var(--subtle); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }

.footer { margin-top: 56px; padding-top: 20px; border-top: 1px dashed var(--rule); color: var(--subtle); font-size: 13px; line-height: 22px; }
.footer a { color: var(--subtle); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline 1px var(--underline); }
.footer a[aria-current="page"] { color: var(--ink); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.icp-link { display: inline-block; margin-top: 6px; font-size: 12px; }

.skip-link { position: absolute; top: -80px; left: 18px; padding: 6px 14px; background: var(--ink); color: var(--background); text-decoration: none; z-index: 10; }
.skip-link:focus { top: 14px; }

@media (max-width: 600px) {
  .page { padding-top: 24px; padding-bottom: 32px; }
  .main { margin-top: 36px; }
  .footer { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
