/*
  Suki Desu Theme
  Edit this file like a WordPress theme: tokens first, then base, layout,
  components and page sections. Keep visual changes in tokens when possible.
*/

@layer tokens, base, layout, components, pages, utilities;

@layer tokens {
  :root {
    color-scheme: light;

    --color-bg: oklch(95.5% 0.027 355);
    --color-bg-soft: oklch(98% 0.018 20);
    --color-surface: oklch(99% 0.009 10);
    --color-surface-2: oklch(96.5% 0.025 2);
    --color-text: oklch(18% 0.025 350);
    --color-text-soft: oklch(44% 0.035 355);
    --color-line: oklch(86% 0.035 4);
    --color-line-strong: oklch(74% 0.055 5);
    --color-brand: oklch(54% 0.18 22);
    --color-brand-strong: oklch(42% 0.16 18);
    --color-brand-soft: oklch(92.5% 0.055 5);
    --color-ink: oklch(16% 0.03 350);
    --color-shadow: oklch(45% 0.055 5 / 13%);
    --color-focus: oklch(70% 0.16 8);

    --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
    --font-jp: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;

    --container: 1280px;
    --radius-panel: 8px;
    --radius-control: 6px;
    --border: 1px solid var(--color-line);
    --border-strong: 1px solid var(--color-line-strong);
    --shadow-panel: 0 20px 70px var(--color-shadow);
    --shadow-interactive: 0 14px 34px color-mix(in oklch, var(--color-shadow) 78%, transparent);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 1.75rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    --text-xs: 0.78rem;
    --text-sm: 0.9rem;
    --text-base: 1rem;
    --text-md: 1.08rem;
    --text-lg: 1.22rem;
    --text-xl: 1.65rem;
    --text-2xl: 2.25rem;
    --text-hero: clamp(2.65rem, 5.4vw, 4.9rem);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --color-bg: oklch(17% 0.035 345);
      --color-bg-soft: oklch(20% 0.04 350);
      --color-surface: oklch(23.5% 0.035 350);
      --color-surface-2: oklch(28% 0.045 355);
      --color-text: oklch(94% 0.018 10);
      --color-text-soft: oklch(75% 0.035 5);
      --color-line: oklch(36% 0.045 355);
      --color-line-strong: oklch(45% 0.06 0);
      --color-brand: oklch(68% 0.16 10);
      --color-brand-strong: oklch(77% 0.13 12);
      --color-brand-soft: oklch(31% 0.07 355);
      --color-ink: oklch(97% 0.015 15);
      --color-shadow: oklch(8% 0.025 345 / 40%);
      --color-focus: oklch(74% 0.14 12);
    }
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
    --color-bg: oklch(17% 0.035 345);
    --color-bg-soft: oklch(20% 0.04 350);
    --color-surface: oklch(23.5% 0.035 350);
    --color-surface-2: oklch(28% 0.045 355);
    --color-text: oklch(94% 0.018 10);
    --color-text-soft: oklch(75% 0.035 5);
    --color-line: oklch(36% 0.045 355);
    --color-line-strong: oklch(45% 0.06 0);
    --color-brand: oklch(68% 0.16 10);
    --color-brand-strong: oklch(77% 0.13 12);
    --color-brand-soft: oklch(31% 0.07 355);
    --color-ink: oklch(97% 0.015 15);
    --color-shadow: oklch(8% 0.025 345 / 40%);
    --color-focus: oklch(74% 0.14 12);
  }
}

@layer base {
  * {
    box-sizing: border-box;
  }

  html {
    min-width: 320px;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 16px;
    font-kerning: normal;
    scroll-padding-top: 96px;
    -webkit-tap-highlight-color: color-mix(in oklch, var(--color-brand) 22%, transparent);
  }

  body {
    margin: 0;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 78% 16%, color-mix(in oklch, var(--color-brand-soft) 48%, transparent), transparent 28rem),
      linear-gradient(180deg, var(--color-bg-soft), var(--color-bg));
    color: var(--color-text);
    text-rendering: optimizeLegibility;
  }

  a {
    color: inherit;
    text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
  }

  a:hover {
    color: var(--color-brand-strong);
  }

  :where(
    button,
    summary,
    .main-nav a,
    .hero-actions a,
    .panel-heading > a,
    .language-menu-list a,
    .tag-list a,
    .share-rail a,
    .author-social,
    .breadcrumbs a,
    .site-footer a
  ) {
    -webkit-user-select: none;
    user-select: none;
  }

  button,
  select,
  input {
    font: inherit;
  }

  button,
  select,
  a {
    cursor: pointer;
    touch-action: manipulation;
  }

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

  h1,
  h2,
  h3 {
    margin: 0;
    color: var(--color-ink);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.98;
    text-wrap: balance;
    scroll-margin-top: 104px;
  }

  h1 {
    font-size: var(--text-hero);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
    line-height: 1.08;
  }

  p {
    text-wrap: pretty;
  }
}

@layer layout {
  .site-main {
    padding: var(--space-6) var(--space-4) var(--space-12);
  }

  .theme-container {
    width: min(var(--container), calc(100vw - 2rem));
    margin-inline: auto;
  }

  .surface-panel,
  .hero-panel {
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-surface);
    box-shadow: var(--shadow-panel);
  }

  .surface-panel + .surface-panel,
  .hero-panel + .surface-panel {
    margin-top: var(--space-5);
  }
}

@layer components {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .skip-link {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 30;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-control);
    background: var(--color-brand);
    color: oklch(98% 0.01 15);
    transform: translateY(-160%);
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    border-bottom: var(--border);
    background: color-mix(in oklch, var(--color-surface) 96%, var(--color-bg));
    scrollbar-width: none;
  }

  .site-header::-webkit-scrollbar {
    display: none;
  }

  .header-inner {
    width: max-content;
    min-width: 100%;
    min-height: 64px;
    margin-inline: 0;
    padding-inline: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-5);
    overflow: visible;
  }

  @media (min-width: 1280px) {
    .header-inner {
      padding-inline: calc((100vw - var(--container)) / 2);
    }
  }

  .brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
  }

  .brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
  }

  .brand span {
    display: grid;
    line-height: 1.05;
  }

  .brand strong {
    font-size: var(--text-base);
    font-weight: 900;
  }

  .brand small {
    color: var(--color-text-soft);
    font-size: var(--text-xs);
  }

  .main-nav {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-1);
    overflow: visible;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

    .main-nav a,
    .nav-menu summary,
    .hero-actions a,
    .panel-heading > a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }

  .nav-menu {
    position: relative;
    flex: 0 0 auto;
    z-index: 35;
  }

  .nav-menu summary {
    gap: var(--space-2);
    padding: 0 var(--space-4);
    cursor: pointer;
    list-style: none;
  }

  .nav-menu summary::-webkit-details-marker {
    display: none;
  }

  .nav-menu summary::after {
    content: "";
    width: 0.43rem;
    height: 0.43rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
    transition: transform 170ms var(--ease-out);
  }

  :where(
    .main-nav a,
    .nav-menu summary,
    .nav-menu-list a,
    .hero-actions a,
    .panel-heading > a,
    .language-menu summary,
    .theme-toggle,
    .search-row button,
    .topic-rail,
    .post-teaser,
    .post-teaser h3 a,
    .tag-list a,
    .article-toc a,
    .share-rail a,
    .share-rail button,
    .author-social,
    .breadcrumbs a,
    .footer-search button,
    .site-footer a
  ) {
    transition:
      transform 170ms var(--ease-out),
      border-color 170ms var(--ease-out),
      background 170ms var(--ease-out),
      background-color 170ms var(--ease-out),
      color 170ms var(--ease-out),
      box-shadow 170ms var(--ease-out),
      opacity 170ms var(--ease-out);
  }

  .main-nav a,
  .nav-menu summary {
    padding: 0 var(--space-4);
  }

  .main-nav a[aria-current="page"],
  .nav-menu summary[data-active="true"] {
    border-color: color-mix(in oklch, var(--color-brand) 34%, var(--color-line));
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
  }

  .main-nav a:hover,
  .nav-menu summary:hover,
  .nav-menu[open] summary {
    border: var(--border);
    background: var(--color-surface-2);
  }

  .main-nav a:hover,
  .nav-menu summary:hover,
  .nav-menu[open] summary {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px color-mix(in oklch, var(--color-shadow) 52%, transparent);
  }

  .nav-menu[open] summary::after,
  .nav-menu summary:hover::after {
    transform: translateY(0.05rem) rotate(225deg);
  }

  .nav-menu-list {
    position: fixed;
    top: var(--floating-menu-top, 4.5rem);
    left: min(var(--floating-menu-left, 1rem), calc(100vw - 13rem));
    z-index: 100;
    width: 12.5rem;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: var(--border-strong);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    box-shadow: 0 22px 60px var(--color-shadow);
    list-style: none;
  }

  .nav-menu-list a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 var(--space-4);
    border-bottom: var(--border);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 850;
    text-decoration: none;
  }

  .nav-menu-list li:last-child a {
    border-bottom: 0;
  }

  .nav-menu-list a:hover,
  .nav-menu-list a[aria-current="page"] {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
  }

  .header-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
  }

  .language-menu summary,
  .theme-toggle {
    min-height: 40px;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-text);
  }

  .language-menu {
    position: relative;
    z-index: 40;
  }

  .language-menu summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 9.5rem;
    padding: 0 var(--space-4);
    font-weight: 800;
    list-style: none;
  }

  .language-menu summary::-webkit-details-marker {
    display: none;
  }

  .language-menu summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
    transition: transform 170ms var(--ease-out);
  }

  .language-menu[open] summary {
    border-color: color-mix(in oklch, var(--color-brand) 45%, var(--color-line));
    background: var(--color-surface-2);
  }

  .language-menu summary:hover,
  .theme-toggle:hover {
    border-color: color-mix(in oklch, var(--color-brand) 45%, var(--color-line));
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in oklch, var(--color-shadow) 55%, transparent);
  }

  .language-menu[open] summary::after,
  .language-menu summary:hover::after {
    transform: translateY(0.05rem) rotate(225deg);
  }

  .language-menu-list {
    position: fixed;
    top: var(--floating-menu-top, 4.5rem);
    left: min(var(--floating-menu-left, 1rem), calc(100vw - 14.25rem));
    z-index: 100;
    width: 13.75rem;
    max-height: min(70vh, 28rem);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    border: var(--border-strong);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    box-shadow: 0 22px 60px var(--color-shadow);
    list-style: none;
  }

  .language-menu-list a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 48px;
    padding: 0 var(--space-4);
    border-bottom: var(--border);
    color: var(--color-text);
    font-weight: 800;
    text-decoration: none;
    transition:
      padding-left 170ms var(--ease-out),
      background 170ms var(--ease-out),
      color 170ms var(--ease-out);
  }

  .language-menu-list li:last-child a {
    border-bottom: 0;
  }

  .language-menu-list a:hover,
  .language-menu-list a[aria-current="true"] {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
  }

  .language-menu-list a:hover {
    padding-left: calc(var(--space-4) + 0.18rem);
  }

  .theme-toggle {
    display: inline-grid;
    width: 40px;
    place-items: center;
    padding: 0;
  }

  .theme-toggle:hover .theme-icon {
    transform: rotate(12deg) scale(1.06);
  }

  .theme-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transition: transform 170ms var(--ease-out);
  }

  .theme-icon-moon {
    display: none;
  }

  .eyebrow,
  .section-kicker,
  .post-meta {
    margin: 0;
    color: var(--color-brand-strong);
    font-size: var(--text-xs);
    font-weight: 900;
    letter-spacing: 0.04em;
  }

  .panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-6);
    margin-bottom: var(--space-5);
  }

  .panel-heading > a {
    padding: 0 var(--space-4);
  }

  .panel-heading > a:hover,
  .hero-actions a:hover {
    border-color: color-mix(in oklch, var(--color-brand) 42%, var(--color-line));
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
  }

  .search-form label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 700;
  }

  .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2);
  }

  .search-row input,
  .search-row button {
    min-height: 46px;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-text);
  }

  .search-row input {
    min-width: 0;
    padding: 0 var(--space-4);
  }

  .search-row:focus-within input {
    border-color: color-mix(in oklch, var(--color-brand) 46%, var(--color-line));
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--color-brand) 18%, transparent);
  }

  .search-row button,
  .primary-action {
    border-color: color-mix(in oklch, var(--color-brand) 70%, var(--color-line));
    padding: 0 var(--space-5);
    background: var(--color-brand);
    color: oklch(98% 0.01 15);
    font-weight: 900;
  }

  .search-row button:hover,
  .primary-action:hover {
    border-color: color-mix(in oklch, var(--color-brand-strong) 78%, var(--color-line));
    background: var(--color-brand-strong);
    color: oklch(98% 0.01 15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
  }

  .search-row button:active,
  .primary-action:active,
  .hero-actions a:active,
  .panel-heading > a:active,
  .theme-toggle:active,
  .language-menu summary:active,
  .topic-rail:active,
  .post-teaser:active,
  .tag-list a:active,
  .share-rail :where(a, button):active,
  .author-social:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .empty-state {
    padding: var(--space-6);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface-2);
  }

  .empty-state p,
  .hero-lead,
  .post-teaser p,
  .static-page p,
  .article-subtitle,
  .article-aside p,
  .site-footer p {
    color: var(--color-text-soft);
    line-height: 1.68;
  }
}

@layer pages {
  .hero-panel {
    position: relative;
    min-height: 372px;
    padding: var(--space-8);
    overflow: hidden;
  }

  .hero-panel::after {
    content: "";
    position: absolute;
    top: -54px;
    right: -44px;
    width: 196px;
    height: 196px;
    border: 1px solid color-mix(in oklch, var(--color-brand) 16%, transparent);
    border-radius: 999px;
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--space-5);
  }

  .hero-lead {
    margin: 0;
    font-size: var(--text-md);
  }

  .tag-hero {
    min-height: 0;
    padding-block: var(--space-7);
    background:
      radial-gradient(circle at 94% 16%, color-mix(in oklch, var(--color-brand-soft) 70%, transparent), transparent 12rem),
      var(--color-surface);
  }

  .search-hero {
    min-height: 0;
    padding: var(--space-8);
    padding-block: clamp(2rem, 4vw, 3rem);
  }

  .search-hero .hero-content {
    gap: var(--space-4);
  }

  .tag-hero h1,
  .search-hero h1 {
    font-size: clamp(2.35rem, 5vw, 4.65rem);
    line-height: 0.98;
  }

  .tag-eyebrow {
    width: max-content;
    max-width: 100%;
    padding: 0.48rem 0.72rem;
    border: 1px solid color-mix(in oklch, var(--color-brand) 20%, var(--color-line));
    border-radius: var(--radius-control);
    background: color-mix(in oklch, var(--color-brand-soft) 58%, var(--color-surface));
    color: var(--color-ink);
    letter-spacing: 0;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .hero-actions a {
    padding: 0 var(--space-5);
  }

  .hero-mark {
    position: absolute;
    right: var(--space-8);
    bottom: var(--space-8);
    color: color-mix(in oklch, var(--color-brand) 9%, transparent);
    font-family: var(--font-jp);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
  }

  .topic-rails,
  .post-section {
    padding: var(--space-6);
  }

  .rail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--space-4);
  }

  .topic-rail {
    display: grid;
    min-height: 138px;
    align-content: space-between;
    padding: var(--space-5);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-bg-soft);
    color: var(--color-text);
    text-decoration: none;
  }

  .topic-rail:hover {
    border-color: color-mix(in oklch, var(--color-brand) 45%, var(--color-line));
    background: var(--color-brand-soft);
    transform: translateY(-3px);
    box-shadow: var(--shadow-interactive);
  }

  .topic-rail:focus-visible {
    border-color: color-mix(in oklch, var(--color-brand) 52%, var(--color-line));
    background: var(--color-brand-soft);
  }

  .topic-rail:hover span {
    transform: scale(1.08);
  }

  .topic-rail span {
    color: var(--color-brand);
    font-family: var(--font-jp);
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 170ms var(--ease-out);
  }

  .topic-rail strong {
    font-size: var(--text-lg);
    font-weight: 900;
  }

  .topic-rail small {
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    line-height: 1.45;
  }

  .post-feed {
    display: grid;
    gap: var(--space-4);
  }

  .post-teaser {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-5);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-bg-soft);
  }

  .post-teaser:hover {
    border-color: color-mix(in oklch, var(--color-brand) 34%, var(--color-line));
    background: color-mix(in oklch, var(--color-surface) 82%, var(--color-brand-soft));
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
  }

  .post-teaser:focus-within {
    border-color: color-mix(in oklch, var(--color-brand) 42%, var(--color-line));
    background: color-mix(in oklch, var(--color-surface) 84%, var(--color-brand-soft));
    box-shadow: var(--shadow-interactive);
  }

  .post-teaser-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-control);
    background: var(--color-surface-2);
    text-decoration: none;
  }

  .post-teaser img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease-out;
  }

  .post-teaser-image:hover img {
    transform: scale(1.035);
  }

  .post-teaser-image:active img {
    transform: scale(1.015);
  }

  .post-teaser h3 a {
    text-decoration: none;
  }

  .post-teaser h3 a:hover {
    color: var(--color-brand-strong);
  }

  .post-teaser p {
    margin-bottom: 0;
  }

  .post-teaser p:not(.post-meta) {
    display: -webkit-box;
    overflow: hidden;
    color: var(--color-text-soft);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .archive-pagination,
  .tag-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: var(--border);
  }

  .archive-pagination a,
  .archive-pagination span,
  .archive-pagination strong,
  .tag-pagination a,
  .tag-pagination span {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
  }

  .archive-page-list {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
  }

  .archive-page-list a,
  .archive-page-list span,
  .archive-page-list strong {
    min-width: 2.75rem;
    padding-inline: var(--space-3);
  }

  .archive-pagination a:hover,
  .tag-pagination a:hover {
    border-color: color-mix(in oklch, var(--color-brand) 45%, var(--color-line));
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-interactive);
  }

  .archive-pagination span,
  .tag-pagination span {
    color: var(--color-text-soft);
    opacity: 0.62;
  }

  .archive-pagination .archive-page-gap {
    border-color: transparent;
    background: transparent;
  }

  .archive-pagination strong {
    border-color: color-mix(in oklch, var(--color-brand) 22%, var(--color-line));
    background: color-mix(in oklch, var(--color-brand-soft) 62%, var(--color-surface));
    color: var(--color-ink);
  }

  .article-page,
  .static-page {
    padding-top: var(--space-4);
  }

  .reading-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 35;
    height: 3px;
    background: transparent;
    pointer-events: none;
  }

  .reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--color-brand);
    transform: scaleX(0);
    transform-origin: left center;
  }

  @supports (animation-timeline: scroll()) {
    .reading-progress span {
      animation: reading-progress-fill linear both;
      animation-timeline: scroll();
    }
  }

  @keyframes reading-progress-fill {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }

  .article-header,
  .static-page {
    padding: var(--space-8);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-surface);
    box-shadow: var(--shadow-panel);
  }

  .static-page-rich {
    display: grid;
    gap: var(--space-6);
  }

  .static-page-lead {
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.65;
  }

  .static-page-split,
  .contact-layout {
    display: grid;
    gap: var(--space-6);
  }

  .static-page-flow,
  .static-page-side,
  .contact-form-panel {
    display: grid;
    gap: var(--space-5);
    align-content: start;
    min-width: 0;
  }

  .static-page-section {
    display: grid;
    gap: var(--space-3);
  }

  .static-page-section h2,
  .contact-form-panel h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.12;
  }

  .static-page-list {
    margin: 0;
    padding: 0 0 0 var(--space-5);
    color: var(--color-text-soft);
  }

  .static-page-list li + li {
    margin-top: var(--space-2);
  }

  .static-page-figure {
    margin: 0;
    overflow: hidden;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface-2);
  }

  .static-page-figure img {
    width: 100%;
    display: block;
    object-fit: cover;
  }

  .contact-page-figure img {
    aspect-ratio: 3 / 4;
    max-height: 34rem;
  }

  .static-page-stats {
    display: grid;
    gap: var(--space-3);
    margin: 0;
  }

  .static-page-stats div {
    padding: var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-bg-soft);
  }

  .static-page-stats dt {
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 800;
  }

  .static-page-stats dd {
    margin: var(--space-2) 0 0;
    color: var(--color-ink);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    font-weight: 950;
  }

  .contact-form-panel {
    padding: var(--space-5);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-bg-soft);
  }

  .breadcrumbs {
    margin: 0 0 var(--space-3);
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 780;
  }

  .breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .breadcrumbs li {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-2);
  }

  .breadcrumbs li + li::before {
    content: "/";
    color: color-mix(in oklch, var(--color-text-soft) 46%, transparent);
    font-weight: 900;
  }

  .breadcrumbs a {
    color: var(--color-brand-strong);
    text-decoration: none;
  }

  .breadcrumbs a:hover {
    color: var(--color-brand);
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
  }

  .breadcrumbs [aria-current="page"] {
    overflow: hidden;
    max-width: min(46rem, 82vw);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .article-header {
    position: relative;
    min-height: clamp(18rem, 36vw, 28rem);
    display: flex;
    align-items: end;
    overflow: hidden;
  }

  .article-header-image {
    border-color: color-mix(in oklch, var(--color-brand) 42%, var(--color-line));
    background: var(--color-ink);
    color: oklch(96% 0.012 15);
  }

  .article-header-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(90deg, oklch(12% 0.04 345 / 88%) 0%, oklch(16% 0.04 350 / 66%) 42%, transparent 100%),
      linear-gradient(0deg, oklch(11% 0.03 350 / 76%) 0%, transparent 54%);
    pointer-events: none;
  }

  .article-hero-media {
    position: absolute;
    inset: 0;
    margin: 0;
  }

  .article-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .article-hero-mark {
    position: absolute;
    right: var(--space-8);
    bottom: var(--space-8);
    color: color-mix(in oklch, var(--color-brand) 12%, transparent);
    font-family: var(--font-jp);
    font-size: clamp(5rem, 16vw, 12rem);
    font-weight: 900;
    line-height: 1;
  }

  .article-header-copy {
    position: relative;
    z-index: 2;
    display: grid;
    gap: var(--space-4);
  }

  .article-header h1 {
    font-size: clamp(2.05rem, 4vw, 3.85rem);
  }

  .article-header-image h1,
  .article-header-image .post-meta {
    color: oklch(97% 0.012 15);
  }

  .article-header-image .article-subtitle {
    color: oklch(88% 0.025 10);
  }

  .article-subtitle {
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--text-md);
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    margin-top: var(--space-5);
  }

    .article-content,
    .article-aside,
    .quiz-section,
    .author-box,
    .comments-section,
    .related-posts {
    padding: var(--space-6);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-surface);
  }

  .share-rail {
    display: grid;
    grid-template-columns: repeat(5, 42px);
    gap: var(--space-2);
    align-items: start;
    margin: 0;
  }

  .share-rail-title {
    grid-column: 1 / -1;
    margin: 0 0 var(--space-1);
    color: var(--color-text-soft);
    font-size: var(--text-lg);
    font-weight: 900;
  }

  .share-rail :where(a, button) {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-brand-strong);
    font-size: var(--text-xs);
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 12px 28px color-mix(in oklch, var(--color-shadow) 64%, transparent);
  }

  .share-rail button {
    padding: 0;
    appearance: none;
  }

  .share-rail svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .share-rail :where(a, button):hover {
    border-color: color-mix(in oklch, var(--color-brand) 55%, var(--color-line));
    background: var(--color-brand);
    color: oklch(98% 0.012 15);
    transform: translateY(-2px) scale(1.04);
    box-shadow: var(--shadow-interactive);
  }

  .article-content {
    font-size: var(--text-md);
    line-height: 1.78;
  }

  .article-content > *:first-child {
    margin-top: 0;
  }

  .article-content > *:last-child {
    margin-bottom: 0;
  }

  .article-content p {
    margin: 0 0 var(--space-5);
  }

  .adsbygoogle,
  .ad-slot,
  .google-auto-placed,
  .article-content :where(.ad-slot, .adsbygoogle, .google-auto-placed, ins.adsbygoogle) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: var(--space-2) auto !important;
    clear: both;
    text-align: center !important;
  }

  .article-page > .ad-slot {
    margin-block: var(--space-2) !important;
  }

  .article-content > .ad-slot {
    margin-block: var(--space-2) !important;
  }

  .article-content > .ad-slot + h2 {
    margin-top: var(--space-4);
  }

  .article-content > .ad-slot + h3 {
    margin-top: var(--space-3);
  }

  .article-content :where(.adsbygoogle iframe, .google-auto-placed iframe, iframe[id^="google_ads_iframe"]) {
    display: block;
    margin-inline: auto !important;
  }

  .article-content h2 {
    margin: var(--space-10) 0 var(--space-5);
    padding-top: var(--space-5);
    border-top: var(--border-strong);
    color: var(--color-ink);
    font-size: clamp(1.8rem, 3.1vw, 2.65rem);
    line-height: 1.04;
    text-wrap: auto;
  }

  .article-content h3 {
    margin: var(--space-8) 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
    line-height: 1.14;
    text-wrap: auto;
  }

  .article-content :where(ul, ol) {
    margin: 0 0 var(--space-6);
    padding-left: var(--space-6);
  }

  .article-content :where(ul, ol) li {
    margin: var(--space-2) 0;
    padding-left: var(--space-2);
  }

  .article-content ul li::marker {
    color: var(--color-brand);
  }

  .article-content ol li::marker {
    color: var(--color-brand-strong);
    font-weight: 900;
  }

  .article-content :where(figure, .wp-block-image, .wp-block-table) {
    margin: var(--space-8) 0;
  }

  .article-content > img {
    margin: var(--space-8) 0;
  }

  .article-content :where(figure:not(.wp-block-table):not(.wp-block-embed), .wp-block-image) {
    padding: var(--space-3);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-bg-soft);
  }

  .article-content :where(figure:not(.wp-block-table):not(.wp-block-embed), .wp-block-image) img,
  .article-content > img {
    width: 100%;
    height: min(450px, 58vw);
    border-radius: var(--radius-control);
    object-fit: cover;
  }

  .article-content :where(.wp-block-embed, .wp-block-video) {
    padding: var(--space-3);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-bg-soft);
  }

  .article-content :where(.wp-block-embed__wrapper) {
    width: 100%;
  }

  .article-content :where(iframe, video, embed, object) {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    border: 0;
    border-radius: var(--radius-control);
  }

  .article-content :where(.wp-block-embed iframe, .wp-block-embed__wrapper iframe, iframe[src*="youtube"], iframe[src*="youtu.be"], iframe[src*="vimeo"]) {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .lite-embed {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-control);
    background:
      radial-gradient(circle at 70% 20%, color-mix(in oklch, var(--color-brand) 22%, transparent), transparent 15rem),
      linear-gradient(135deg, var(--color-brand-soft), var(--color-surface-2));
    color: var(--color-surface);
    cursor: pointer;
  }

  .lite-embed img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95) brightness(0.72);
    transition: transform 220ms var(--ease-out), filter 220ms var(--ease-out);
  }

  .lite-embed::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, oklch(12% 0.03 350 / 58%));
  }

  .lite-embed-play {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--color-brand);
    box-shadow: 0 18px 44px color-mix(in oklch, var(--color-brand-strong) 38%, transparent);
  }

  .lite-embed-play svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: currentColor;
    transform: translateX(0.12rem);
  }

  .lite-embed-label {
    position: absolute;
    z-index: 1;
    inset: auto var(--space-4) var(--space-4);
    color: oklch(98% 0.01 10);
    font-size: var(--text-sm);
    font-weight: 900;
    text-align: center;
  }

  .lite-embed:hover img {
    filter: saturate(1.05) brightness(0.82);
    transform: scale(1.03);
  }

  .lite-embed:hover .lite-embed-play {
    background: var(--color-brand-strong);
    transform: scale(1.05);
  }

  .article-content figcaption {
    margin-top: var(--space-3);
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    line-height: 1.45;
  }

  .article-content :where(pre, .wp-block-code) {
    margin: var(--space-8) 0;
    padding: var(--space-5);
    overflow-x: auto;
    border: var(--border-strong);
    border-radius: var(--radius-panel);
    background: oklch(18% 0.018 55);
    color: oklch(94% 0.012 15);
    font-size: var(--text-sm);
    line-height: 1.65;
    white-space: pre;
  }

  .article-content code {
    padding: 0.12rem 0.32rem;
    border-radius: 4px;
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: 0.92em;
    font-weight: 750;
  }

  .article-content pre code {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }

  .article-content :where(.wp-block-table, table) {
    width: 100%;
    overflow-x: auto;
  }

  .article-content > table {
    margin: var(--space-8) 0 var(--space-6);
  }

  .article-content :where(.wp-block-table, table) + p {
    margin-top: var(--space-5);
  }

  .article-content .wp-block-table {
    display: block;
    padding: var(--space-3);
    border: var(--border);
    border-radius: var(--radius-panel);
    background: var(--color-bg-soft);
  }

  .article-content table {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--text-sm);
    line-height: 1.5;
  }

  .article-content :where(th, td) {
    min-width: 10rem;
    padding: var(--space-3) var(--space-4);
    border-right: var(--border);
    border-bottom: var(--border);
    background: var(--color-surface);
    text-align: left;
    vertical-align: top;
  }

  .article-content th {
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-weight: 900;
  }

  .article-content tr:first-child :where(th, td) {
    border-top: var(--border);
  }

  .article-content :where(th, td):first-child {
    border-left: var(--border);
  }

  .article-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-5);
    border: var(--border-strong);
    border-radius: var(--radius-panel);
    background: var(--color-surface-2);
    color: var(--color-text);
  }

  .article-content blockquote > :last-child {
    margin-bottom: 0;
  }

  .article-aside h2,
  .sources h2 {
    font-size: var(--text-lg);
  }

  .article-aside {
    display: grid;
    gap: var(--space-5);
    min-width: 0;
    overflow: hidden;
  }

  .article-aside-section {
    min-width: 0;
  }

  .article-aside-section + .article-aside-section {
    padding-top: var(--space-5);
    border-top: var(--border);
  }

  .article-aside-section h2 {
    margin-bottom: var(--space-3);
  }

  .article-aside :where(p, li, a) {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .article-stat-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
  }

  .reading-time {
    display: inline-flex;
    width: fit-content;
    min-height: 34px;
    align-items: center;
    margin: 0;
    padding: 0 var(--space-3);
    border-radius: var(--radius-control);
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: var(--text-sm);
    font-weight: 900;
  }

  .word-count {
    background: var(--color-surface-2);
    color: var(--color-text-soft);
  }

  .article-toc ol {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .article-toc a {
    display: block;
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
  }

  .article-toc a:hover {
    color: var(--color-brand-strong);
    transform: translateX(0.18rem);
  }

  .article-toc .toc-level-3 {
    padding-left: var(--space-4);
  }

  .article-toc .toc-level-3 a {
    font-size: var(--text-xs);
    font-weight: 800;
  }

  .sources ul {
    display: grid;
    gap: var(--space-2);
    margin: 0;
  }

  .sources a {
    color: var(--color-text);
    font-size: var(--text-sm);
    line-height: 1.35;
    text-decoration-color: color-mix(in oklch, var(--color-brand) 45%, var(--color-line));
    text-underline-offset: 0.16em;
  }

  .not-found-page {
    padding-top: var(--space-4);
  }

  .not-found-panel {
    display: grid;
    grid-template-columns: minmax(18rem, 0.92fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: min(620px, calc(100svh - 170px));
    padding: clamp(2rem, 5vw, 4.5rem);
    border: var(--border);
    border-radius: var(--radius-panel);
    background:
      radial-gradient(circle at 18% 20%, color-mix(in oklch, var(--color-brand-soft) 70%, transparent), transparent 18rem),
      linear-gradient(135deg, color-mix(in oklch, var(--color-surface) 92%, var(--color-brand-soft)), var(--color-bg-soft));
    box-shadow: var(--shadow-panel);
  }

  .not-found-art {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: clamp(0.15rem, 1vw, 0.7rem);
    align-items: center;
    justify-items: center;
    min-height: 18rem;
  }

  .not-found-code {
    color: var(--color-ink);
    font-size: clamp(9rem, 22vw, 18rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 0.8;
  }

  .not-found-brand {
    display: grid;
    width: clamp(6rem, 12vw, 9rem);
    aspect-ratio: 1;
    place-items: center;
    border: 4px solid color-mix(in oklch, var(--color-brand) 34%, var(--color-line));
    border-radius: 999px;
    background: var(--color-surface);
    box-shadow: 0 18px 46px color-mix(in oklch, var(--color-shadow) 88%, transparent);
    transform: translateY(1.4rem);
  }

  .not-found-brand img {
    width: 78%;
    height: 78%;
    object-fit: contain;
  }

  .not-found-copy {
    display: grid;
    gap: var(--space-5);
  }

  .not-found-copy h1 {
    font-size: clamp(2.4rem, 5.2vw, 4.8rem);
    line-height: 0.98;
  }

  .not-found-copy p:not(.eyebrow) {
    margin: 0;
    color: var(--color-text-soft);
    font-size: var(--text-lg);
    line-height: 1.55;
  }

  .sources ul,
  .tag-list {
    padding: 0;
    list-style: none;
  }

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0 0;
  }

  .tag-list li {
    display: flex;
  }

  .tag-list a {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-control);
    border: 1px solid transparent;
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-size: var(--text-sm);
    font-weight: 800;
    text-decoration: none;
  }

  .tag-list a:hover {
    border-color: color-mix(in oklch, var(--color-brand) 44%, var(--color-line));
    background: var(--color-brand);
    color: oklch(98% 0.012 15);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px color-mix(in oklch, var(--color-shadow) 55%, transparent);
  }

  .tag-list a:focus-visible {
    border-color: color-mix(in oklch, var(--color-brand) 52%, var(--color-line));
    background: var(--color-brand);
    color: oklch(98% 0.012 15);
  }

  .article-header-image .tag-list a {
    background: oklch(96% 0.014 78 / 15%);
    color: oklch(97% 0.012 15);
    box-shadow: inset 0 0 0 1px oklch(96% 0.014 78 / 22%);
  }

  .article-header-image .tag-list a:hover {
    background: oklch(96% 0.014 78 / 28%);
    color: oklch(99% 0.008 15);
  }

  .article-header-image .tag-list a:focus-visible {
    background: oklch(96% 0.014 78 / 28%);
    color: oklch(99% 0.008 15);
  }

  .quiz-section {
    margin-top: var(--space-5);
  }

  .author-box,
  .comments-section,
  .related-posts {
    margin-top: var(--space-5);
  }

  .author-box {
    display: grid;
    grid-template-columns: clamp(6.75rem, 10vw, 8rem) minmax(0, 1fr);
    gap: clamp(var(--space-6), 4vw, var(--space-10));
    align-items: start;
    background: color-mix(in oklch, var(--color-surface) 96%, var(--color-bg));
    box-shadow: 0 1.1rem 2.8rem color-mix(in oklch, var(--color-ink) 8%, transparent);
  }

  .author-box h2,
  .related-posts h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  }

  .author-box h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 1.9rem);
    line-height: 1.1;
  }

  .author-box p:last-child {
    margin: 0;
    color: var(--color-text-soft);
    line-height: 1.65;
  }

  .author-avatar {
    display: block;
    width: 100%;
    max-width: 8rem;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid color-mix(in oklch, var(--color-bg-soft) 88%, var(--color-surface));
    box-shadow: 0 0.65rem 1.6rem color-mix(in oklch, var(--color-ink) 12%, transparent);
  }

  .author-profile {
    display: grid;
    gap: var(--space-4);
    min-width: 0;
    padding-top: var(--space-1);
  }

  .author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
  }

  .author-social {
    display: inline-grid;
    min-width: 3.65rem;
    min-height: 2.05rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--color-brand);
    text-decoration: none;
    transition:
      transform 160ms ease,
      border-color 160ms ease,
      background 160ms ease;
  }

  .author-social:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 18px color-mix(in oklch, var(--color-shadow) 55%, transparent);
  }

  .author-social svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
  }

  .author-social-instagram {
    border-color: oklch(87% 0.05 350);
    background: oklch(94% 0.045 350);
    color: oklch(57% 0.23 10);
  }

  .author-social-linkedin {
    border-color: oklch(86% 0.04 245);
    background: oklch(94% 0.035 245);
    color: oklch(47% 0.15 250);
  }

  .related-grid {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-5);
  }

  .related-grid .post-teaser p:not(.post-meta) {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .comments-section {
    display: grid;
    gap: var(--space-5);
    background: color-mix(in oklch, var(--color-surface) 96%, var(--color-bg));
  }

  .comments-heading {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: end;
    justify-content: space-between;
  }

  .comments-heading h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  }

  .comments-count,
  .comment-policy,
  .comment-card time {
    margin: 0;
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    line-height: 1.5;
  }

  .comment-notice,
  .comment-empty {
    margin: 0;
    padding: var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-brand-soft);
    color: var(--color-brand-strong);
    font-weight: 800;
    line-height: 1.5;
  }

  .comment-notice-rejected,
  .comment-notice-rate_limited,
  .comment-notice-verification_failed {
    background: color-mix(in oklch, var(--color-surface-2) 78%, var(--color-brand-soft));
    color: var(--color-text);
  }

  .comment-list,
  .comment-replies {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .comment-replies {
    margin-top: var(--space-4);
    padding-left: var(--space-5);
    border-left: 3px solid color-mix(in oklch, var(--color-brand) 28%, var(--color-line));
  }

  .comment-card {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-bg-soft);
  }

  .comment-card-header {
    display: flex;
    gap: var(--space-3);
    align-items: center;
  }

  .comment-card h3,
  .comment-form h3 {
    font-size: var(--text-lg);
    line-height: 1.12;
  }

  .comment-card h3 {
    margin-bottom: var(--space-1);
  }

  .comment-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 2px solid color-mix(in oklch, var(--color-brand) 24%, var(--color-line));
    border-radius: 50%;
    background: var(--color-brand-soft);
    object-fit: cover;
  }

  .comment-avatar-fallback {
    display: inline-grid;
    place-items: center;
    color: var(--color-brand-strong);
    font-weight: 950;
  }

  .comment-card p {
    margin: 0;
    color: var(--color-text);
    line-height: 1.68;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .comment-reply summary {
    width: fit-content;
    color: var(--color-brand-strong);
    font-size: var(--text-sm);
    font-weight: 900;
  }

  .comment-reply[open] summary {
    margin-bottom: var(--space-3);
  }

  .comment-form-disclosure {
    display: grid;
    gap: var(--space-4);
  }

  .comment-form-disclosure > summary {
    width: fit-content;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: var(--border);
    border-radius: var(--radius-control);
    cursor: pointer;
    list-style: none;
  }

  .comment-form-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  .comment-form-disclosure > summary::marker {
    content: "";
  }

  .comment-form {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5);
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
  }

  .comment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .comment-form p {
    margin: 0;
  }

  .comment-form label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 800;
  }

  .comment-form :where(input, textarea) {
    width: 100%;
    min-height: 46px;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-bg-soft);
    color: var(--color-text);
    font: inherit;
  }

  .comment-form input {
    padding: 0 var(--space-4);
  }

  .comment-form textarea {
    min-height: 9rem;
    padding: var(--space-3) var(--space-4);
    resize: vertical;
  }

  .comment-form :where(input, textarea):focus {
    border-color: color-mix(in oklch, var(--color-brand) 46%, var(--color-line));
    outline: 0;
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--color-brand) 18%, transparent);
  }

  .comment-turnstile {
    width: fit-content;
    max-width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: var(--space-2);
    overflow: hidden;
    border: var(--border);
    border-radius: var(--radius-control);
    background: color-mix(in oklch, var(--color-bg-soft) 82%, var(--color-surface));
  }

  .comment-turnstile iframe {
    display: block;
    max-width: 100%;
  }

  .comment-turnstile-loading {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 800;
  }

  .comment-turnstile-loading::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid color-mix(in oklch, var(--color-brand) 18%, var(--color-line));
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
  }

  .comment-turnstile[data-turnstile-state] .comment-turnstile-loading {
    display: none;
  }

  .comment-turnstile[data-turnstile-state="error"] .comment-turnstile-loading {
    display: inline-flex;
    color: var(--color-brand-strong);
  }

  @keyframes spin {
    to {
      transform: rotate(1turn);
    }
  }

  .comment-form button {
    justify-self: start;
    min-height: 44px;
    border-radius: var(--radius-control);
  }

  .comment-honeypot {
    position: absolute;
    left: -100vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .quiz-question {
    margin: var(--space-4) 0;
    padding: var(--space-4);
    border: var(--border);
    border-radius: var(--radius-control);
  }

  .quiz-question label {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    min-height: 36px;
    cursor: pointer;
  }

  .site-footer {
    border-top: var(--border);
    background:
      linear-gradient(180deg, color-mix(in oklch, var(--color-surface) 90%, transparent), var(--color-surface-2)),
      radial-gradient(circle at 12% 20%, color-mix(in oklch, var(--color-brand-soft) 48%, transparent), transparent 20rem);
  }

  .footer-inner {
    width: min(var(--container), calc(100vw - 2rem));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(20rem, 1.05fr) minmax(0, 1.7fr);
    gap: var(--space-8);
    padding: var(--space-10) 0 var(--space-4);
  }

  .footer-brand {
    display: grid;
    align-content: start;
    gap: var(--space-5);
  }

  .footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    width: max-content;
    text-decoration: none;
  }

  .footer-logo img {
    width: 3.625rem;
    height: 3.625rem;
  }

  .footer-logo span {
    color: var(--color-ink);
    font-size: var(--text-xl);
    font-weight: 950;
    letter-spacing: 0;
  }

  .site-footer p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: var(--text-md);
    line-height: 1.65;
  }

  .footer-search {
    display: grid;
    gap: var(--space-2);
  }

  .footer-utility {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    align-items: end;
  }

  .footer-search label {
    color: var(--color-text-soft);
    font-size: var(--text-sm);
    font-weight: 800;
  }

  .footer-search div {
    display: flex;
    gap: var(--space-2);
  }

  .footer-search input {
    min-width: 0;
    flex: 1;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0.85rem 1rem;
  }

  .footer-search button {
    border: 0;
    border-radius: var(--radius-control);
    background: var(--color-brand);
    color: var(--color-surface);
    font-weight: 900;
    padding: 0.85rem 1.1rem;
  }

  .footer-search button:hover {
    background: var(--color-brand-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-interactive);
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .footer-nav div {
    display: grid;
    align-content: start;
    gap: var(--space-3);
  }

  .footer-nav strong {
    color: var(--color-ink);
    font-size: var(--text-sm);
    font-weight: 950;
  }

  .footer-nav a {
    color: var(--color-text-soft);
    font-weight: 750;
    text-decoration: none;
  }

  .footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
  }

  .footer-social a {
    display: inline-grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border: var(--border);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    color: var(--color-brand-strong);
    text-decoration: none;
  }

  .footer-social svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
  }

  .footer-social a:hover {
    border-color: var(--color-brand);
    background: var(--color-brand-soft);
    transform: translateY(-2px);
  }

  .footer-bottom {
    grid-column: 1 / -1;
    font-size: var(--text-sm);
    padding-top: var(--space-2);
  }

  .site-footer a:hover {
    color: var(--color-brand-strong);
    transform: translateY(-1px);
  }
}

@layer utilities {
  :focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-sun {
      display: none;
    }

    :root:not([data-theme="light"]) .theme-icon-moon {
      display: block;
    }
  }

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

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

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto;
      transition-duration: 0.01ms;
      animation-duration: 0.01ms;
      animation-iteration-count: 1;
    }
  }

  @media (min-width: 760px) {
    .post-feed,
    .related-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-inner {
      align-items: start;
    }
  }

  @media (min-width: 980px) {
    .article-grid {
      grid-template-columns: minmax(0, 1fr) 320px;
      align-items: start;
    }

    .article-aside {
      position: sticky;
      top: 92px;
    }

    .static-page-split {
      grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
      align-items: start;
    }

    .contact-layout {
      grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
      align-items: start;
    }

    .contact-form-panel {
      position: sticky;
      top: 92px;
    }
  }

  @media (max-width: 860px) {
    .header-inner {
      gap: var(--space-2) var(--space-4);
      padding-block: var(--space-2);
    }

    .main-nav {
      padding-inline: 0;
    }

    .main-nav a {
      padding: 0 var(--space-3);
    }

    .hero-panel,
    .article-header,
    .static-page,
    .article-content,
    .article-aside,
    .quiz-section,
    .author-box,
    .comments-section,
    .related-posts,
    .not-found-panel {
      padding: var(--space-5);
    }

    .not-found-panel {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-6);
    }

    .not-found-art {
      min-height: 12rem;
    }

    .panel-heading {
      align-items: start;
      flex-direction: column;
      gap: var(--space-3);
    }

    .breadcrumbs [aria-current="page"] {
      max-width: 68vw;
    }

    .footer-inner {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-7);
      padding-block: var(--space-8) var(--space-4);
    }

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

    .footer-utility {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-3);
      align-items: start;
    }

  }

  @media (max-width: 560px) {
    .article-page > .breadcrumbs {
      display: none;
    }

    .site-main {
      padding-inline: var(--space-3);
    }

    .theme-container,
    .footer-inner {
      width: calc(100vw - 1.25rem);
    }

    .footer-logo img {
      width: 3.25rem;
      height: 3.25rem;
    }

    .footer-logo span {
      font-size: var(--text-lg);
    }

    .footer-search div {
      flex-direction: column;
    }

    .footer-nav {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-5);
    }

    .footer-social {
      justify-content: flex-start;
    }

    .brand span {
      display: none;
    }

    .language-menu summary {
      min-width: 3rem;
      padding-inline: var(--space-3);
    }

    .language-menu summary span + span {
      display: none;
    }

    .language-menu summary::after {
      margin-left: var(--space-1);
    }

    .search-row {
      grid-template-columns: 1fr;
    }

    .comment-form-grid {
      grid-template-columns: 1fr;
    }

    .comment-replies {
      padding-left: var(--space-3);
    }

    .hero-mark {
      display: none;
    }

    .not-found-art {
      min-height: 8.5rem;
    }

    .not-found-code {
      font-size: clamp(5.6rem, 27vw, 8rem);
    }

    .not-found-brand {
      width: clamp(4.5rem, 20vw, 5.5rem);
      border-width: 3px;
      transform: translateY(0.65rem);
    }

    .author-box {
      grid-template-columns: 5.25rem minmax(0, 1fr);
      gap: var(--space-5);
      align-items: start;
    }

    .author-avatar {
      width: 5.25rem;
      border-width: 3px;
    }

    .author-social {
      min-width: 3.25rem;
    }
  }
}
