:root {
  --bg: #f2f5ef;
  --surface: #fffef9;
  --surface-2: #e8eee4;
  --ink: #15211b;
  --ink-soft: #33443a;
  --muted: #5f6f64;
  --line: #dde5d8;
  --line-strong: #c3cfc0;
  --accent: #1e6b4f;
  --accent-ink: #14503a;
  --accent-soft: #dcebe1;
  --warm: #b96a37;
  --focus: #1f5fd0;

  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono",
    monospace;

  --wrap: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(21, 33, 27, 0.05);
  --shadow: 0 2px 4px rgba(21, 33, 27, 0.04),
    0 24px 48px -32px rgba(21, 33, 27, 0.4);
  --header-h: 68px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f1612;
  --surface: #161f1a;
  --surface-2: #1d2922;
  --ink: #e9efe8;
  --ink-soft: #c9d5cc;
  --muted: #93a398;
  --line: #26342c;
  --line-strong: #3a4b41;
  --accent: #74c29c;
  --accent-ink: #9ad9b9;
  --accent-soft: #1b2c23;
  --warm: #e0a06f;
  --focus: #7aa7ff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
    0 24px 48px -32px rgba(0, 0, 0, 0.9);

  color-scheme: dark;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

img {
  height: auto;
}

a {
  color: var(--accent-ink);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 0.18em;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus-visible {
  transform: none;
  color: var(--bg);
}

.wrap {
  width: min(100% - 2.6rem, var(--wrap));
  margin-inline: auto;
}

main {
  flex: 1 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
}

.lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  line-height: 1.8;
}

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

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: #f4fbf6;
}

[data-theme="dark"] .btn--accent {
  --btn-fg: #0d1711;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-ink);
}

.text-link::after {
  content: "→";
  transition: transform 0.18s ease;
}

.text-link:hover::after {
  transform: translateX(3px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -20px rgba(0, 0, 0, 0.5);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.site-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

.hero {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
}

.hero h1 {
  max-width: 18ch;
  margin-top: 1rem;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 650;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  box-shadow: inset 0 -0.28em 0 color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero .lede {
  margin-top: 1.25rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100%, 39rem);
  margin-top: 2rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.search-form svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 1rem;
}

.search-form input::placeholder {
  color: var(--muted);
}

.search-form .btn {
  flex: none;
  padding-inline: 1.25rem;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding: 0;
  list-style: none;
}

.quick-tags a {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  transition: all 0.16s ease;
}

.quick-tags a:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero--compact {
  padding-block: clamp(2rem, 4vw, 3rem) 1rem;
}

.hero--compact h1 {
  margin-top: 0.55rem;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
}

.hero--compact .lede {
  margin-top: 0.75rem;
}

.hero--compact .search-form {
  margin-top: 1.4rem;
}

.hero--compact .hero-meta {
  margin-top: 1rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  padding: 0.6rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.link-card:hover {
  color: inherit;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.link-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--mark) 14%, var(--surface));
  color: var(--mark);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark) 24%, transparent);
}

[data-theme="dark"] .link-icon {
  background: color-mix(in srgb, var(--mark) 20%, var(--surface));
  color: color-mix(in srgb, var(--mark) 76%, white);
}

.link-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.link-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-domain {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group {
  padding-block: 1.1rem 0;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.group-head h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.group-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.group-head .text-link {
  margin-left: auto;
  font-size: 0.8rem;
}

.cat-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.cat-jump a {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.16s ease;
}

.cat-jump a:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
}

.section {
  padding-block: clamp(2.4rem, 5vw, 4rem);
}

.section--tight {
  padding-block: 1.4rem;
}

[data-directory] {
  padding-bottom: 2.2rem;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: 1.9rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.section-head p {
  color: var(--muted);
  font-size: 0.92rem;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.section-link {
  margin-top: 1.5rem;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.cat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.cat-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 600;
}

.cat-tile h3 {
  font-size: 1rem;
  font-weight: 600;
}

.cat-tile p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.cat-count {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.latest-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.latest-list li {
  border-bottom: 1px solid var(--line);
}

.latest-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
  padding: 0.95rem 0.25rem;
  color: inherit;
  text-decoration: none;
}

.latest-list a:hover {
  color: var(--accent-ink);
}

.latest-list time {
  flex: none;
  width: 5.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.latest-list strong {
  font-weight: 600;
}

.latest-list .latest-desc {
  flex: 1;
  min-width: 12rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.cta {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  padding: clamp(1.8rem, 4.5vw, 3rem);
  background: var(--ink);
  color: var(--bg);
  border-radius: calc(var(--radius) + 6px);
}

.cta-inner::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.cta-inner p {
  margin-top: 0.65rem;
  max-width: 46ch;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 0.92rem;
}

.cta-inner .btn {
  position: relative;
  z-index: 1;
  --btn-bg: var(--accent);
  --btn-fg: #f4fbf6;
}

[data-theme="dark"] .cta-inner .btn {
  --btn-fg: #0d1711;
}

.page-head {
  padding-block: clamp(2.2rem, 5vw, 3.4rem) clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin-top: 0.6rem;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 650;
  text-wrap: balance;
}

.page-head p {
  margin-top: 0.9rem;
  max-width: 62ch;
  color: var(--ink-soft);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem 1.1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.result-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.search-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem 0.35rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.search-inline svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}

.search-inline input {
  width: 12rem;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
}

.search-inline .clear-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  cursor: pointer;
  display: none;
}

.search-inline .clear-btn.is-visible {
  display: block;
}

.where {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: center;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.where a {
  color: inherit;
}

.empty-state {
  padding: 3rem 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: 1rem;
}

.prose {
  max-width: 72ch;
  padding-block: clamp(2rem, 4vw, 3rem);
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.2rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1.1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 0.25rem;
}

.timeline h3 {
  font-size: 0.98rem;
  font-weight: 600;
}

.timeline p {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.submit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.submit-notes {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.submit-notes li {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.submit-notes strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.form-card {
  padding: clamp(1.3rem, 3vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.field + .field {
  margin-top: 1.05rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.field .hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field [aria-invalid="true"] {
  border-color: #b03427;
}

.error-msg {
  display: none;
  margin-top: 0.3rem;
  color: #b03427;
  font-size: 0.78rem;
}

[data-theme="dark"] .error-msg {
  color: #f08a7a;
}

.error-msg.is-visible {
  display: block;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1.3rem;
}

.form-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.form-status.is-error {
  color: #b03427;
}

.site-footer {
  margin-top: auto;
  padding-block: 2.6rem 1.8rem;
  background: var(--ink);
  color: color-mix(in srgb, var(--bg) 76%, transparent);
}

.site-footer a {
  color: var(--bg);
  text-decoration-color: color-mix(in srgb, var(--bg) 35%, transparent);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.7fr));
  gap: 2.2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
}

.footer-brand .brand {
  margin: 0 0 0.8rem;
  color: var(--bg);
}

.footer-brand .brand:hover {
  color: var(--bg);
}

.footer-brand .brand-text small {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.footer-brand p {
  max-width: 34ch;
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-col h2 {
  margin-bottom: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.3rem;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@property --nav-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes nav-spin {
  to {
    --nav-angle: 360deg;
  }
}

.link-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 0.7rem;
}

.link-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 17px;
  background:
    radial-gradient(120% 140% at 50% 0%, #1d222a 0%, #101216 55%, #0a0b0e 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -12px 24px -16px rgba(0, 0, 0, 0.9),
    0 10px 24px -18px rgba(0, 0, 0, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 34px -20px rgba(0, 0, 0, 0.95);
}

.link-card:active {
  transform: translateY(0) scale(0.985);
}

.link-card .link-icon {
  background: color-mix(in srgb, var(--mark) 24%, #0c0e12);
  color: color-mix(in srgb, var(--mark) 62%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mark) 38%, transparent);
}

.link-card .link-name {
  color: #f4f6f8;
}

.link-card .link-domain {
  color: #93a0ab;
}

[data-theme="dark"] .link-card {
  background:
    radial-gradient(120% 140% at 50% 0%, #1a1e25 0%, #0e1013 55%, #08090b 100%);
}

@media (prefers-reduced-motion: reduce) {
}

@media (max-width: 960px) {
  .section-head,
  .submit-grid,
  .cta-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head {
    align-items: start;
  }

  .cta-inner {
    gap: 1.4rem;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  :root {
    --header-h: 62px;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    padding: 0.7rem 1.3rem 1.1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
  }

  .site-nav a {
    padding: 0.72rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .hero h1 {
    max-width: none;
  }

  .search-form {
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 0.55rem;
  }

  .search-form input {
    width: calc(100% - 2.2rem);
  }

  .search-form .btn {
    width: 100%;
  }

  .toolbar {
    align-items: flex-start;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .search-inline {
    flex: 1;
  }

  .search-inline input {
    width: 100%;
  }

  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
}

@media (max-width: 540px) {
  .wrap {
    width: min(100% - 1.8rem, var(--wrap));
  }

  .brand-text small {
    display: none;
  }

  .latest-list time {
    width: auto;
  }

  .latest-list .latest-desc {
    flex-basis: 100%;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  .site-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 781px) {
  .site-nav {
    display: block !important;
  }
}

@media print {
  .site-header,
  .to-top,
  .cta,
  .site-footer,
  .search-form {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}

.link-grid {

  grid-template-columns: repeat(auto-fill, 240px);
  justify-content: start;
  gap: 1.1rem;
}

.link-card {
  width: 240px;
  height: 120px;
  padding: 0 1rem;
  justify-content: center;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 14px 28px -22px rgba(0, 0, 0, 0.9);
}

.link-card .link-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 0.76rem;
}

.link-card .link-name {
  font-size: 1.02rem;
}

.link-card .link-domain {
  font-size: 0.72rem;
}

.link-card .link-text {
  gap: 0.1rem;
}

@media (max-width: 560px) {
  .link-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .link-card {
    width: 100%;
    height: 120px;
  }
}

:root {
  --wrap: 1280px;
}

.link-grid {
  grid-template-columns: repeat(auto-fill, 240px);
  justify-content: start;
  gap: 1.1rem;
}

.link-card .link-domain {
  display: none;
}

.link-card .link-name {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.link-card .link-text {
  gap: 0;
}

.link-card {
  gap: 0.8rem;
}

.link-card {
  justify-content: center;
  gap: 0;
  padding: 0 1.25rem;
}

.link-card .link-icon {
  display: none;
}

.link-card .link-text {
  align-items: center;
  text-align: center;
  gap: 0;
}

.link-card .link-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.link-card {
  border: 2px solid transparent;
  background-color: #000;
  background-image:
    linear-gradient(#000, #000),
    conic-gradient(
      from var(--nav-angle),
      #ff6b1a,
      #ffb347,
      #3b82f6,
      #22d3ee,
      #ff6b1a
    );
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  animation: nav-spin 9s linear infinite;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px -20px rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .link-card {
  background-color: #000;
  background-image:
    radial-gradient(120% 140% at 50% 0%, #1a1e25 0%, #0e1013 55%, #08090b 100%),
    conic-gradient(
      from var(--nav-angle),
      #ff6b1a,
      #ffb347,
      #3b82f6,
      #22d3ee,
      #ff6b1a
    );
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
}

.link-card:hover {
  animation-duration: 3s;
}

.link-card:focus-visible {
  animation-duration: 3s;
}

@media (prefers-reduced-motion: reduce) {
  .link-card {
    animation: none !important;
  }
}

.link-card {
  border: 2px solid #000;
  background-color: #000;
  background-image: none;
  animation: none;
}

[data-theme="dark"] .link-card {
  border-color: #000;
  background-image: radial-gradient(
    120% 140% at 50% 0%,
    #1a1e25 0%,
    #0e1013 55%,
    #08090b 100%
  );
}

.link-card:hover,
.link-card:focus-visible {
  animation: none;
}

.link-card,
[data-theme="dark"] .link-card {
  box-shadow: none;
  filter: none;
  text-shadow: none;
}

.submit-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 620px;
  margin-inline: auto;
}

.page-head h1:first-child {
  margin-top: 0;
}