:root {
  --bg: #ffffff;
  --surface: #f3f4f6;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --accent: #047857;
  --accent-2: #0f766e;
  --on-accent: #ffffff;
  --link: #047857;
  --grad-accent: linear-gradient(135deg, #059669 0%, #047857 45%, #0f766e 100%);
  --menu-w: 220px;
  --bar-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1b2027;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #374151;
    --accent: #34d399;
    --accent-2: #2dd4bf;
    --on-accent: #052e1c;
    --link: #6ee7b7;
    --grad-accent: linear-gradient(135deg, #6ee7b7 0%, #34d399 45%, #2dd4bf 100%);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 520px at 105% -8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%),
    radial-gradient(900px 480px at -8% 108%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 .75rem;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 94%, var(--accent)));
  border-bottom: 1px solid var(--border);
  z-index: 30;
}
#topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 25%, var(--accent-2) 60%, transparent);
  opacity: .55;
  pointer-events: none;
}
.bar-left, .bar-right { display: flex; align-items: center; gap: .5rem; }
.bar-left { flex: 0 0 auto; }
.bar-right { position: relative; flex: 0 0 auto; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  max-width: 560px;
  margin: 0 auto;
}
.search input {
  flex: 1;
  min-width: 0;
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.search button {
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 0 999px 999px 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: .35rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.dropdown[hidden] { display: none; }
.dropdown a {
  display: block;
  padding: .55rem .75rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.dropdown a:hover { background: var(--surface); }

#menu {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  bottom: 0;
  width: var(--menu-w);
  padding: 1rem .75rem;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 88%, var(--accent)));
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .2s ease;
  z-index: 20;
}
body.menu-open #menu { transform: none; }
#menu a {
  display: block;
  padding: .6rem .75rem;
  margin-bottom: .25rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
#menu a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
#menu a.active { background: var(--grad-accent); color: var(--on-accent); }

#backdrop {
  position: fixed;
  inset: var(--bar-h) 0 0 0;
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 10;
}
body.menu-open #backdrop { opacity: 1; pointer-events: auto; }

#content {
  margin-top: var(--bar-h);
  padding: 2rem 2.5rem;
  max-width: 800px;
  transition: opacity .15s;
}
#content:focus { outline: none; }
:where(#content) a:not([class]) { color: var(--link); text-underline-offset: 2px; }
#content.loading { opacity: 0; }
#content h2 { margin-top: 0; }

@media (max-width: 560px) {
  .site-name { display: none; }
  #content { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  #menu, #content, #backdrop { transition: none; }
}

.dropdown button {
  display: block;
  width: 100%;
  padding: .55rem .75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dropdown button:hover { background: var(--surface); }
.menu-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.plan {
  flex: none;
  padding: 0 .4rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: .75rem;
  font-weight: 600;
}
.plan-paid { background: var(--grad-accent); color: var(--on-accent); }

.auth-form { display: grid; gap: 1rem; max-width: 360px; }
.auth-form label { display: grid; gap: .35rem; font-weight: 500; }
.auth-form small { color: var(--muted); font-weight: 400; }
.auth-form input {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 2.75rem; }
.auth-form .pw-toggle {
  position: absolute; top: 50%; right: .3rem; transform: translateY(-50%);
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; box-shadow: none;
}
.auth-form .pw-toggle:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.auth-form .pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-form .pw-toggle[aria-pressed="true"] { color: var(--accent); }
.auth-form button {
  justify-self: start;
  padding: .55rem 1.25rem;
  border: 0;
  border-radius: 6px;
  background: var(--grad-accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}
.auth-form button:hover:not(:disabled) { filter: brightness(1.08); }
.auth-form button:disabled { opacity: .6; cursor: wait; }
.form-error { min-height: 1.25em; margin: 0; color: #dc2626; }

body.dev-mode .site-name::after {
  content: "DEV MODE";
  margin-left: .5rem;
  padding: .1rem .4rem;
  border-radius: 4px;
  background: #f59e0b;
  color: #111;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  vertical-align: middle;
}
.dropdown .dev-switch { color: #b45309; font-weight: 600; }

#content:has(> #community) { max-width: 1100px; }
.cm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cm-intro { margin: .25rem 0 0; max-width: 60ch; color: var(--muted); }

.cm-btn {
  padding: .45rem .8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.cm-btn:hover:not(:disabled) { border-color: var(--accent); }
.cm-btn:disabled { opacity: .6; cursor: wait; }
.cm-btn-primary {
  border-color: transparent;
  background: var(--grad-accent);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cm-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.cm-btn-danger { color: #dc2626; }
.cm-btn-danger:hover:not(:disabled) { border-color: #dc2626; }
.cm-btn-link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; }

.cm-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin: 1.25rem 0 0;
  padding: .85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 10px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--bg)), color-mix(in srgb, var(--accent-2) 5%, var(--bg)));
}
.cm-notice[hidden] { display: none; }
.cm-notice p { margin: 0; flex: 1 1 320px; }

.cm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.25rem 0 .5rem; }
.cm-filters input[type=search], .cm-filters select {
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
}
.cm-filters input[type=search] { flex: 1 1 240px; min-width: 0; }
.cm-mine { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }
.cm-mine[hidden] { display: none; }
.cm-status { min-height: 1.4em; margin: .25rem 0 .75rem; color: var(--muted); font-size: .875rem; }

.cm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cm-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 95%, var(--accent)));
}
.cm-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.cm-card-top { display: flex; align-items: center; gap: .4rem; }
.cm-badge {
  padding: .05rem .45rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: .72rem;
  font-weight: 600;
}
.cm-badge-conveyor { background: color-mix(in srgb, #c8955a 25%, transparent); }
.cm-badge-traffic { background: color-mix(in srgb, #22c55e 22%, transparent); }
.cm-badge-mine { background: var(--grad-accent); color: var(--on-accent); }
.cm-date { margin-left: auto; color: var(--muted); font-size: .75rem; }
.cm-title { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.cm-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: .9rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.cm-meta { margin: 0; color: var(--muted); font-size: .8rem; }
.cm-author { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.cm-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .25rem; }
.cm-shot {
  display: block; width: 100%; height: 150px; padding: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: zoom-in;
}
.cm-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.cm-shot:hover, .cm-shot:focus-visible { border-color: var(--accent); }
.cm-shot-none {
  display: grid; place-items: center; height: 150px; border: 1px dashed var(--border); border-radius: 8px;
  color: var(--muted); font-size: .8rem;
}
.cm-shot-dialog { width: min(1240px, calc(100vw - 2rem)); }
.cm-shot-full { max-height: 75vh; margin: .75rem 0; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.cm-shot-full img { display: block; width: 100%; height: auto; }
.cm-locked { opacity: .85; }
a.cm-btn { text-decoration: none; }
.cm-more { display: flex; justify-content: center; margin: 1.25rem 0; }
.cm-more [hidden] { display: none; }

.cm-dialog {
  width: min(520px, calc(100vw - 2rem));
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 95%, var(--accent)));
  color: var(--text);
}
.cm-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.cm-dialog-head { display: flex; align-items: center; justify-content: space-between; }
.cm-dialog-head h3 { margin: 0; }
.cm-form { max-width: none; grid-template-columns: minmax(0, 1fr); }
.cm-form label { min-width: 0; }
.cm-form select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.auth-form .cm-dialog-head button { justify-self: auto; padding: .2rem .6rem; background: var(--bg); color: var(--text); font-weight: 400; border: 1px solid var(--border); }
.cm-form select, .cm-form textarea {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.cm-form textarea { resize: vertical; }

.avatar-initial {
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  color: var(--text);
  font-weight: 700;
}
.user-btn-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dropdown { min-width: 230px; }
.menu-info { justify-content: flex-start; }
.menu-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; font-size: .9rem; }
.menu-who { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.menu-who strong { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-legal { margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--border); }
#menu .menu-legal a { padding: .3rem .75rem; margin: 0; color: var(--muted); font-size: .8rem; }

.auth-form label.check { display: flex; align-items: flex-start; gap: .55rem; font-weight: 400; font-size: .9rem; }
.auth-form label.check input { margin-top: .2rem; padding: 0; }

#content:has(> .settings) { max-width: 720px; }
.settings-gate { color: var(--muted); }
.settings-body { display: grid; gap: 1rem; }
.settings-body[hidden], .settings-gate[hidden] { display: none; }
.settings-card {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 96%, var(--accent)));
}
.settings-card h3 { margin: 0 0 .75rem; font-size: 1.05rem; }
.settings-card .auth-form { max-width: 420px; }
.settings-danger { border-color: color-mix(in srgb, #dc2626 45%, var(--border)); }
.settings-danger p { margin-top: 0; color: var(--muted); }
.auth-form button.btn-danger-solid { background: #dc2626; }
.form-ok { color: #16a34a; }
.pf-name-suggestions, .name-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9rem; }
.pf-name-suggestions[hidden], .name-suggestions[hidden] { display: none; }
.auth-form button.name-chip {
  padding: .25rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  box-shadow: none;
}
.auth-form button.name-chip:hover { border-color: var(--accent); filter: none; }
.form-status { min-height: 1.2em; margin: .35rem 0 0; color: var(--muted); font-size: .875rem; }
.muted-text { color: var(--muted); font-size: .875rem; }
.btn-line { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-line [hidden] { display: none; }

.avatar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.avatar-lg { flex: none; width: 96px; height: 96px; }
.avatar-lg-img { display: grid; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 2.2rem; border: 1px solid var(--border); }
.avatar-actions { display: grid; gap: .5rem; flex: 1 1 260px; }
.avatar-actions small { color: var(--muted); }

.sub-plan { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.sub-plan h3 { margin: 0; }
.sub-badge { font-size: .8rem; padding: .1rem .5rem; }
.sub-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: .75rem 0; }
.sub-facts dt { color: var(--muted); }
.sub-facts dd { margin: 0; font-weight: 500; }
.sub-warning { padding: .6rem .8rem; border-radius: 8px; background: color-mix(in srgb, #f59e0b 18%, transparent); }
.sub-features { margin: 0 0 1rem; padding-left: 1.2rem; line-height: 1.7; }
.sub-foot { margin-top: .25rem; }

.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.cm-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; font-size: .7rem; }
.cm-badge-review { background: color-mix(in srgb, #f59e0b 30%, transparent); }
.cm-report {
  margin-left: auto;
  padding: .3rem .4rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.cm-report:hover { color: #dc2626; text-decoration: underline; }
.cm-report-target { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.cm-reasons { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; }
.cm-reasons legend { margin-bottom: .5rem; padding: 0; font-weight: 500; }
.auth-form .cm-reasons label { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.cm-form small { color: var(--muted); }

.legal { line-height: 1.6; }
.legal h3 { margin-top: 1.75rem; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.legal-meta { color: var(--muted); font-size: .875rem; }
.legal-toc { padding: .75rem 1rem; border-radius: 8px; background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--surface) 90%, var(--accent))); font-size: .9rem; line-height: 1.9; }
.legal-dl dt { margin-top: .75rem; font-weight: 600; }
.legal-dl dd { margin: .15rem 0 0; }

.sp-form { display: flex; gap: .5rem; margin: 0 0 .5rem; }
.sp-form input {
  flex: 1;
  min-width: 0;
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.sp-summary { min-height: 1.3em; margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.sp-group { margin: 0 0 1.75rem; }
.sp-group[hidden], .sp-empty[hidden] { display: none; }
.sp-group h3 { margin: 0 0 .6rem; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sp-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.sp mark { padding: 0 .1em; border-radius: 3px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; }

.sp-ref {
  display: flex;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 95%, var(--accent)));
}
.sp-glyph {
  flex: none;
  display: grid; place-items: center;
  min-width: 3.1rem; height: 2.4rem;
  padding: 0 .4rem;
  border-radius: 8px;
  background: var(--grad-accent);
  color: var(--on-accent);
  font: 700 .9rem ui-monospace, Menlo, monospace;
  white-space: pre;
}
.sp-ref-body { min-width: 0; }
.sp-ref-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .55rem; }
.sp-ref-head strong { font-size: 1.02rem; }
.sp-ref-title { color: var(--text); }
.sp-kind { padding: 0 .45rem; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 600; }
.sp-pro { padding: 0 .4rem; border-radius: 4px; background: var(--grad-accent); color: var(--on-accent); font-size: .68rem; font-weight: 700; }
.sp-ref p { margin: .35rem 0 .4rem; font-size: .92rem; line-height: 1.5; }
.sp-try { color: var(--link); font-size: .85rem; font-weight: 600; text-decoration: none; }
.sp-try:hover { text-decoration: underline; }

.sp-page {
  display: grid;
  gap: .15rem;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}
.sp-page:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.sp-page > span { color: var(--muted); font-size: .9rem; }
.sp-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sp-post-meta { font-size: .8rem !important; }
.sp-more { margin: .6rem 0 0; font-size: .9rem; }
.sp-more a { color: var(--link); font-weight: 600; }

.sp-empty { padding: 1.25rem; border: 1px dashed var(--border); border-radius: 10px; }
.sp-empty p { margin: 0 0 .6rem; }
.sp-suggest { display: flex; flex-wrap: wrap; gap: .4rem; }
.sp-chip {
  padding: .25rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: .85rem;
  text-decoration: none;
}
.sp-chip:hover { border-color: var(--accent); color: var(--accent); }

.about { line-height: 1.65; }
.about-lead { margin-top: -.25rem; color: var(--muted); font-size: 1.15rem; }
.about h3 { margin-top: 2rem; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem; margin: 1rem 0; }
.about-card {
  display: grid;
  align-content: start;
  gap: .45rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 7%, var(--bg)), var(--bg) 60%);
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
  transition: transform .2s ease, border-color .2s ease;
}
.about-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.about-card > span:last-child { color: var(--muted); font-size: .93rem; }
.about-card .feature-icon { width: 38px; height: 38px; }
.about kbd { padding: 0 .35em; border: 1px solid var(--border); border-radius: 4px; font-size: .85em; }
.about-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin: 2.25rem 0 1rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--bg)), color-mix(in srgb, var(--accent-2) 6%, var(--bg)));
}
.about-cta p { flex: 1 1 260px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .about-card { transition: none; } }

.learn, .lesson { line-height: 1.7; }
.learn h3 { margin: 2rem 0 .6rem; }
.learn-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.learn-list a {
  display: grid;
  gap: .2rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.5;
}
.learn-list a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.learn-list span { color: var(--muted); font-size: .92rem; }
.lesson-crumbs { margin: 0 0 .5rem; color: var(--muted); font-size: .875rem; }
.lesson-crumbs a { color: var(--muted) !important; }
.lesson h3 { margin-top: 2rem; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.lesson code, .learn code { padding: .05em .3em; border-radius: 4px; background: var(--surface); font-size: .9em; }
.lesson pre.ladder {
  overflow-x: auto;
  margin: 1rem 0;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: .85rem;
  line-height: 1.45;
}
.lesson pre.ladder code { padding: 0; background: none; font-size: inherit; }
.lesson figcaption { margin: -.5rem 0 1rem; color: var(--muted); font-size: .875rem; }
.lesson table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .93rem; }
.lesson th, .lesson td { padding: .45rem .6rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.lesson th { background: var(--surface); }
.lesson-tip {
  margin: 1.25rem 0;
  padding: .8rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg));
}
.lesson-tip p { margin: 0; }
.lesson-try { margin: 1.5rem 0; padding: 1rem 1.2rem; border: 1px dashed var(--border); border-radius: 10px; }
.lesson-try h3 { margin-top: 0; }
.lesson-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; margin: 2.5rem 0 1rem; }
.lesson-nav a {
  display: grid;
  gap: .15rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
}
.lesson-nav a:hover { border-color: var(--accent); }
.lesson-nav small { color: var(--muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.lesson-next { text-align: right; }
.sp-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: .25rem 0 0; }

.ad-slot[hidden] { display: none; }
.ad-slot {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-slot .ad-label {
  justify-self: start;
  margin: 0 0 .2rem .4rem;
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ad-banner {
  width: min(970px, calc(100% - 2rem));
  min-height: 90px;
  margin: 1.5rem auto;
  padding: .4rem;
}
.ad-sidebar { min-height: 250px; margin-top: 1rem; padding: .4rem; }
body:has(#ladder-ide) .ad-banner { display: none; }

.site-footer {
  margin-top: 2.5rem;
  padding: 1.75rem 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem 3.5rem; }
.footer-col { display: flex; flex-direction: column; gap: .4rem; }
.footer-col strong { color: var(--text); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-col a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--link); text-decoration: underline; }
.footer-copy { margin: 1.5rem 0 0; font-size: .8rem; }
body:has(#ladder-ide) .site-footer { display: none; }
@media (max-width: 560px) { .site-footer { padding: 1.5rem 1.25rem; } }
.menu-copy { margin: .75rem .75rem 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.ad-house { display: grid; gap: .4rem; justify-items: center; padding: .75rem; }
.ad-house strong { color: var(--text); font-size: .9rem; }
.ad-house a { color: var(--link); font-weight: 600; }
