﻿/*
Theme Name: TTVP AI 2026
Theme URI: https://thuthuatvanphong.net
Author: thuthuatvanphong.net
Author URI: https://thuthuatvanphong.net
Description: AI-first office productivity learning theme focused on performance, semantic SEO, and tutorial readability.
Version: 1.2.6
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: ttvp-ai-2026
*/

:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-muted: #eef4fc;
  --text: #0f1f3a;
  --text-soft: #4f617f;
  --line: #d6e1ef;
  --line-strong: #c5d6eb;
  --brand: #156ff7;
  --brand-strong: #0f58c8;
  --brand-soft: #e9f1ff;
  --green: #129a66;
  --warning: #efb93c;
  --shadow-sm: 0 6px 18px rgba(18, 35, 70, 0.07);
  --shadow-md: 0 16px 38px rgba(15, 33, 66, 0.1);
  --shadow-lg: 0 30px 66px rgba(13, 30, 61, 0.12);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --container: min(1220px, calc(100% - 2rem));
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.68;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 100% -120px, #dce9ff 0%, transparent 62%),
    radial-gradient(900px 420px at -10% 10%, #e8f8ef 0%, transparent 60%),
    var(--bg);
}

body.dark-mode {
  --bg: #0a1322;
  --surface: #101d33;
  --surface-muted: #14243e;
  --text: #e6eefb;
  --text-soft: #9db0ca;
  --line: #223550;
  --line-strong: #294261;
  --brand: #4d93ff;
  --brand-strong: #6aa8ff;
  --brand-soft: #132b4f;
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 32px 76px rgba(0, 0, 0, 0.45);
}

::selection {
  background: color-mix(in srgb, var(--brand) 24%, transparent);
}

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

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

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

.container {
  width: var(--container);
  margin-inline: auto;
}

.layout-section {
  margin-block: 1.35rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-strong);
}

.meta {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-head--tight {
  margin-bottom: 0.65rem;
}

.section-head h1,
.section-head h2,
.section-head h3 {
  margin: 0;
  line-height: 1.24;
  letter-spacing: -0.024em;
}

.section-head h2 {
  font-size: clamp(1.24rem, 2.2vw, 1.55rem);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(155deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 35%, transparent);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-muted);
  border-color: var(--line);
  color: var(--text);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.33rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 83%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line-strong);
}

.site-header__inner {
  width: var(--container);
  margin-inline: auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-brand {
  min-width: 268px;
}

.site-brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: var(--text);
}

.site-brand__badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.81rem;
  font-weight: 700;
  background: linear-gradient(145deg, #1877f8, #149a66);
  box-shadow: 0 10px 24px rgba(18, 111, 247, 0.27);
}

.site-brand__text {
  display: grid;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-brand__sub {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-soft);
}

.primary-menu {
  flex: 1;
}

.primary-menu ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem;
  list-style: none;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.76rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text-soft);
}

.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a,
.primary-menu a:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 0.56rem;
}

.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 250px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.search-pill input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
}

.search-pill input::placeholder {
  color: color-mix(in srgb, var(--text-soft) 84%, transparent);
}

.btn-icon,
.mobile-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 65%, transparent);
}

.mobile-menu-btn {
  display: none;
}

.avatar-dot {
  width: 35px;
  height: 35px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 35% 35%, #fff 0%, #dce9ff 36%, #97b0dc 100%);
}

.home-hero {
  display: grid;
  grid-template-columns: 1.72fr 1fr;
  gap: 1rem;
}

.featured-hero {
  padding: 1.18rem;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand-soft) 72%, #fff), color-mix(in srgb, #d6f5e8 55%, #fff));
  box-shadow: var(--shadow-md);
}

.featured-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.featured-hero h1 {
  margin: 0.45rem 0 0.74rem;
  font-size: clamp(1.72rem, 3.2vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.038em;
}

.hero-lead {
  margin: 0;
  color: var(--text-soft);
  max-width: 58ch;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.keycaps {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0.37rem 0.65rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, #fff);
  background: #fff;
  color: #0e2142;
  box-shadow: 0 5px 14px rgba(12, 28, 58, 0.1);
  font-size: 0.79rem;
  font-weight: 700;
}

body.dark-mode .keycap {
  background: color-mix(in srgb, var(--surface) 86%, #fff 14%);
  color: var(--text);
}

.hero-tip-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.featured-hero__media {
  display: grid;
  align-content: end;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #fff);
  background: var(--surface);
  position: relative;
  min-height: 230px;
}

.featured-hero__media .tutorial-card__thumb {
  height: 100%;
  min-height: 230px;
}

.featured-hero__chip {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.71rem;
  font-weight: 700;
}

.hot-list {
  padding: 0.95rem;
}

.hot-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hot-list li + li {
  border-top: 1px solid var(--line);
}

.hot-list a {
  display: flex;
  gap: 0.58rem;
  align-items: flex-start;
  padding-block: 0.73rem;
  color: var(--text);
  font-weight: 620;
  font-size: 0.9rem;
}

.hot-list a small {
  display: block;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 500;
}

.hot-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 800;
  flex: 0 0 24px;
}

.quick-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.72rem;
}

.quick-cat {
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.quick-cat:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.quick-cat__top {
  display: flex;
  align-items: center;
  gap: 0.46rem;
}

.cat-badge {
  min-width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--brand-soft), #fff);
  border: 1px solid var(--line);
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.quick-cat small {
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 520;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.88rem;
}

.tutorial-card {
  overflow: hidden;
}

.tutorial-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.tutorial-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: linear-gradient(145deg, #d8e8ff, #f2f7ff);
}

.tutorial-card__body {
  padding: 0.95rem;
}

.tutorial-card h2,
.tutorial-card h3 {
  margin: 0.35rem 0 0.56rem;
  font-size: 1.01rem;
  line-height: 1.38;
  letter-spacing: -0.012em;
}

.tutorial-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.productivity-panel,
.template-panel,
.community-panel,
.hub-intro {
  padding: 1rem;
}

.productivity-panel > .meta {
  margin: 0 0 0.75rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.74rem;
}

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

.value-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 0.8rem;
  display: grid;
  gap: 0.22rem;
}

.value-box strong {
  font-size: 0.88rem;
}

.value-box small {
  color: var(--text-soft);
  font-size: 0.79rem;
}

.workflow-block,
.callout,
.quick-answer,
.ai-summary,
.key-takeaways {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-block: 1rem;
}

.workflow-block,
.callout {
  background: color-mix(in srgb, var(--surface-muted) 70%, #fff);
}

.quick-answer {
  background: var(--brand-soft);
}

.quick-answer p,
.ai-summary p,
.callout p {
  margin: 0.45rem 0 0;
}

.ai-summary {
  background: color-mix(in srgb, var(--surface-muted) 82%, #fff);
}

.key-takeaways {
  background: color-mix(in srgb, #def7ea 48%, var(--surface));
}

.key-takeaways ul {
  margin: 0.52rem 0 0;
  padding-left: 1.1rem;
}

.template-list {
  margin: 0 0 0.85rem;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.template-list a {
  color: var(--text);
}

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

.community-panel > p {
  margin: 0 0 0.88rem;
  color: var(--text-soft);
}

.hub-intro h1 {
  margin: 0.4rem 0 0.72rem;
  line-height: 1.2;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
}

.hub-intro p {
  margin: 0 0 0.78rem;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.post-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.14rem;
}

.post-main h1 {
  margin-top: 0.28rem;
  margin-bottom: 0.45rem;
  font-size: clamp(1.74rem, 3vw, 2.48rem);
  line-height: 1.2;
  letter-spacing: -0.036em;
}

.post-pill {
  margin-top: 0.6rem;
}

.post-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.84rem;
}

.post-share-row .meta {
  margin: 0;
}

.share-links {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.share-links a {
  width: 31px;
  height: 31px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.77rem;
  font-weight: 700;
}

.share-links a:hover {
  color: var(--brand-strong);
  border-color: var(--line-strong);
}

.post-cover {
  margin-bottom: 1rem;
}

.inline-outline {
  margin: 1rem 0;
  border: 1px solid #c8dbff;
  background: #eef4ff;
  border-radius: 12px;
  padding: 0.88rem 0.95rem;
}

body.dark-mode .inline-outline {
  border-color: #27456f;
  background: #142748;
}

.inline-outline strong {
  color: #1a4cb2;
  font-size: 0.93rem;
}

body.dark-mode .inline-outline strong {
  color: #9ec3ff;
}

.inline-outline ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.inline-outline li {
  color: #2558bb;
  font-size: 0.88rem;
  margin-bottom: 0.28rem;
}

body.dark-mode .inline-outline li {
  color: #bad5ff;
}

.entry-content p,
.entry-content li {
  color: var(--text);
}

.entry-content p {
  margin: 0 0 0.86rem;
}

.entry-content h2,
.entry-content h3 {
  scroll-margin-top: 95px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.entry-content h2 {
  font-size: clamp(1.34rem, 2.2vw, 1.7rem);
  margin-top: 1.6rem;
  margin-bottom: 0.66rem;
}

.entry-content h3 {
  font-size: clamp(1.14rem, 1.9vw, 1.32rem);
  margin-top: 1.2rem;
  margin-bottom: 0.56rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.18rem;
}

.entry-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 10px 10px 0;
  background: var(--surface-muted);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid var(--line);
  padding: 0.52rem 0.68rem;
}

.entry-content table th {
  background: var(--surface-muted);
  text-align: left;
}

.entry-content pre,
.entry-content code {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.entry-content pre {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem;
  overflow: auto;
  background: color-mix(in srgb, var(--surface-muted) 80%, #fff);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--brand-strong);
}

.faq-list {
  padding: 0.95rem;
}

.faq-list details {
  padding: 0.65rem 0;
}

.faq-list details + details {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--brand-strong);
}

.faq-list details[open] summary::after {
  content: "âˆ’";
}

.faq-list p {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
}

.entry-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.8rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
}

.sidebar-card h2 {
  margin: 0 0 0.52rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.toc-nav ul {
  margin: 0.35rem 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.26rem;
}

.toc-nav a {
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.toc-nav a:hover,
.toc-nav a.is-active {
  color: var(--brand-strong);
  font-weight: 700;
}

.sidebar-related {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.58rem;
}

.sidebar-related__item {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 0.55rem;
}

.sidebar-related__thumb {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.sidebar-related__title {
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 600;
}

.sidebar-related__item:hover .sidebar-related__title {
  color: var(--brand-strong);
}

.footer-main {
  margin-top: 2rem;
  padding: 1.1rem 0 5.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.footer-main p {
  margin: 0;
  font-size: 0.86rem;
}

.footer-pills {
  margin-bottom: 0.7rem;
}

.pagination-wrap {
  margin-top: 1rem;
}

.mobile-tabbar {
  display: none;
}

nav.navigation.pagination {
  font-size: 0.88rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-links .page-numbers {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.65rem;
}

.nav-links .page-numbers.current,
.nav-links .page-numbers:hover {
  color: var(--brand-strong);
  border-color: var(--line-strong);
  background: var(--brand-soft);
}

@media (max-width: 1200px) {
  .quick-cats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 1080px) {
  .home-hero,
  .post-layout,
  .two-col,
  .featured-hero__layout {
    grid-template-columns: 1fr;
  }

  .entry-sidebar {
    position: static;
  }

  .quick-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .site-brand {
    min-width: auto;
  }

  .primary-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  body {
    font-size: 17px;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .site-brand__sub,
  .search-pill,
  .avatar-dot {
    display: none;
  }

  .value-grid,
  .value-grid--mini {
    grid-template-columns: 1fr;
  }

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

  .tutorial-grid,
  .tutorial-grid--related {
    grid-template-columns: 1fr;
  }

  .post-main {
    padding: 1rem;
  }

  .post-share-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px);
    z-index: 70;
  }

  .mobile-tabbar a {
    padding: 0.64rem 0.18rem;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .mobile-tabbar a.is-active {
    color: var(--brand-strong);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1220px, calc(100% - 1.1rem));
  }

  .site-actions {
    gap: 0.38rem;
  }

  .btn-icon,
  .mobile-menu-btn {
    width: 35px;
    height: 35px;
  }

  .featured-hero {
    padding: 0.95rem;
  }

  .featured-hero h1 {
    font-size: clamp(1.48rem, 7vw, 2rem);
  }

  .keycap {
    min-width: 40px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  z-index: 100;
  background: var(--surface);
  color: var(--brand-strong);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.4rem 0.62rem;
  box-shadow: var(--shadow-md);
}

.mobile-tabbar a[data-mobile-save] {
  color: var(--brand-strong);
}

.mobile-tabbar a[data-mobile-save]:active {
  opacity: 0.84;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 72%, #fff);
  outline-offset: 2px;
}

.ttvp-pattern-card,
.ttvp-pattern-warning {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: var(--surface-muted);
}

.ttvp-pattern-card h4,
.ttvp-pattern-warning h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.ttvp-pattern-card p,
.ttvp-pattern-warning p {
  margin: 0 0 0.55rem;
}

.ttvp-pattern-warning {
  border-color: color-mix(in srgb, var(--warning) 60%, var(--line));
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
}

.reading-progress {
  height: 3px;
  background: color-mix(in srgb, var(--line) 78%, transparent);
  overflow: hidden;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--green));
  transition: width 0.12s linear;
}

.ai-recommendations h2 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-recommendations h2::before {
  content: "AI";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.67rem;
  font-weight: 800;
}

.ai-reco-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.58rem;
}

.ai-reco-list li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  padding: 0.58rem 0.62rem;
}

.ai-reco-list a {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 620;
  line-height: 1.4;
}

.ai-reco-list a:hover {
  color: var(--brand-strong);
}

.ai-reco-list small {
  display: block;
  margin-top: 0.24rem;
  color: var(--text-soft);
  font-size: 0.74rem;
}

@media (max-width: 860px) {
  .reading-progress {
    height: 2px;
  }
}

.home-hero {
  align-items: stretch;
}

.featured-hero,
.hot-list {
  height: 100%;
}

.featured-hero,
.post-main,
.sidebar-card,
.quick-cat,
.tutorial-card {
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.2s ease;
}

.sidebar-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.post-main {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(2px);
}

.ai-reco-list li:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--brand-soft) 44%, var(--surface));
}

@media (max-width: 860px) {
  .mobile-tabbar {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-tabbar a {
    min-height: 56px;
    display: grid;
    place-items: center;
  }
}

.hero-metrics {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #fff);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 600;
}

.hero-metrics strong {
  color: var(--brand-strong);
}

.section-note {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.popular-pills {
  margin-bottom: 0.72rem;
}

.popular-pills .pill {
  background: color-mix(in srgb, var(--brand-soft) 56%, var(--surface));
}

@media (max-width: 860px) {
  .hero-metrics {
    gap: 0.36rem;
  }

  .hero-metrics span {
    font-size: 0.7rem;
  }

  .section-note {
    display: none;
  }
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.site-brand {
  min-width: 0;
  padding-right: 0.35rem;
}

.primary-menu {
  min-width: 0;
}

.primary-menu ul {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
  padding-bottom: 2px;
}

.primary-menu ul::-webkit-scrollbar {
  display: none;
}

.primary-menu a {
  padding: 0.46rem 0.66rem;
  font-size: 0.8rem;
}

.search-pill {
  min-width: 300px;
}

.featured-hero__media .tutorial-card__thumb {
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

@media (max-width: 1320px) {
  .search-pill {
    min-width: 240px;
  }
}

/* 1.2.6 UI refinement layer */
.featured-hero__media {
  align-content: stretch;
  place-items: stretch;
  min-height: 270px;
  aspect-ratio: 4 / 3;
}

.featured-hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 90% at 20% 8%, color-mix(in srgb, var(--brand-soft) 78%, #fff), transparent 58%);
}

.featured-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 14%, rgba(8, 18, 32, 0.32) 100%);
}

.featured-hero__media .tutorial-card__thumb {
  position: relative;
  z-index: 1;
  display: block;
  object-position: center 82%;
  transform: scale(1.22);
  transform-origin: center 78%;
}

.featured-hero__chip,
.featured-hero__meta {
  position: absolute;
  z-index: 2;
}

.featured-hero__meta {
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.65rem;
  padding: 0.48rem 0.62rem;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, #fff);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  backdrop-filter: blur(5px);
  display: grid;
  gap: 0.1rem;
}

.featured-hero__meta strong {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.featured-hero__meta small {
  color: var(--text-soft);
  font-size: 0.73rem;
}

.featured-hero__chip {
  left: 0.7rem;
  top: 0.7rem;
  bottom: auto;
}

.briefing-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.86rem;
}

.briefing-card {
  padding: 1rem;
  display: grid;
  gap: 0.58rem;
  background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 88%, #fff), color-mix(in srgb, var(--surface-muted) 72%, #fff));
}

.briefing-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.briefing-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.briefing-card--wide {
  background:
    radial-gradient(420px 180px at 105% -20%, color-mix(in srgb, var(--brand-soft) 88%, #fff), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, #dff6ea 36%, #fff), color-mix(in srgb, var(--surface) 92%, #fff));
}

.post-hero-media {
  margin: 0.75rem 0 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.post-hero-media .tutorial-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 180px;
  object-fit: cover;
  object-position: center 30%;
}

.post-hero-media__meta {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.65rem;
  z-index: 2;
  margin: 0;
  padding: 0.44rem 0.6rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, #fff);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-soft);
}

.share-copy-btn {
  width: 31px;
  height: 31px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.share-copy-btn:hover {
  color: var(--brand-strong);
  border-color: var(--line-strong);
}

.mobile-tabbar__icon {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface-muted) 74%, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.mobile-tabbar a.is-active .mobile-tabbar__icon {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--brand-soft) 72%, #fff);
  color: var(--brand-strong);
}

@media (max-width: 1180px) {
  .briefing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .briefing-card--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .featured-hero__media {
    min-height: 230px;
    aspect-ratio: 16 / 10;
  }

  .featured-hero__meta {
    gap: 0.06rem;
  }

  .briefing-grid {
    grid-template-columns: 1fr;
  }

  .mobile-tabbar a {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.2rem;
    padding-top: 0.4rem;
    padding-bottom: 0.44rem;
  }

  .mobile-tabbar a span:last-child {
    font-size: 0.67rem;
    line-height: 1.05;
  }
}



