/* ============================================================
   Tectoria — Editorial Design System
   A premium publisher's toolkit for words.
   ============================================================ */

:root {
  /* Palette */
  --ink: #16222f;
  --ink-2: #2e3f52;
  --ink-3: #5a6b7e;
  --black: #0d0d0f;
  --paper: #f7f4ed;
  --paper-2: #efeade;
  --card: #ffffff;
  --line: #e2dccd;
  --line-2: #d3cbb6;
  --accent: #a63d2f;
  --accent-deep: #8a3125;
  --accent-soft: #f6e7e3;
  --gold: #ab842c;
  --gold-soft: #f4ecd8;
  --teal: #2c6e63;
  --teal-soft: #e2efeb;
  --ok: #2e7d4f;
  --warn: #b07c1f;
  --err: #b3402a;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Rhythm */
  --container: 1200px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(22, 34, 47, 0.05), 0 2px 8px rgba(22, 34, 47, 0.04);
  --shadow-md: 0 2px 4px rgba(22, 34, 47, 0.06), 0 8px 24px rgba(22, 34, 47, 0.07);
  --shadow-lg: 0 4px 8px rgba(22, 34, 47, 0.07), 0 16px 48px rgba(22, 34, 47, 0.11);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #ecd9d2; color: var(--ink); }

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

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

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ Utility bar ============ */
.utility-bar {
  background: var(--ink);
  color: #c8d2dc;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.utility-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px; gap: 16px;
}
.utility-inner .util-note { display: flex; align-items: center; gap: 8px; }
.utility-inner .util-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6fbf8f;
  box-shadow: 0 0 0 3px rgba(111,191,143,0.18); flex: none;
}
.utility-inner nav { display: flex; gap: 18px; }
.utility-inner nav a { color: #c8d2dc; }
.utility-inner nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--black);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.site-header .brand, .site-header .brand:hover { color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--ink-3); margin-top: 2px; font-weight: 600;
}

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-drop > button {
  font-family: var(--sans); font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,0.82);
  padding: 9px 14px; border-radius: 8px; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
}
.main-nav > a:hover, .nav-drop > button:hover { color: #fff; background: rgba(255,255,255,0.1); }
.main-nav > a.active, .nav-drop.open > button { color: #e8b45a; }
.nav-drop { position: relative; }
.nav-caret { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; opacity: 0.85; transition: transform 0.2s ease; }
.nav-drop.open .nav-caret { transform: rotate(180deg); }

.mega-menu, .drop-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 100;
}
.nav-drop.open .mega-menu, .nav-drop.open .drop-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-menu { width: 760px; padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mega-col h4, .drop-head {
  font-family: var(--sans); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 10px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
}
.mega-col h4 a { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); text-transform: none; }
.mega-col ul { list-style: none; }
.mega-col li a {
  display: block; padding: 5px 8px; margin: 0 -8px; border-radius: 6px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.4;
}
.mega-col li a:hover { background: var(--paper); color: var(--accent); }
.mega-col li a .hot {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); margin-left: 6px; vertical-align: 1px;
}
.drop-panel { width: 320px; padding: 18px; }
.drop-panel ul { list-style: none; }
.drop-panel li a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2);
}
.drop-panel li a:hover { background: var(--paper); color: var(--accent); }
.drop-panel li a .cnt { font-size: 11px; color: var(--ink-3); background: var(--paper-2); padding: 1px 8px; border-radius: 99px; }
.drop-panel .drop-foot { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.drop-panel .drop-foot a { font-size: 13px; font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.site-header .icon-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.site-header .icon-btn:hover { color: #e8b45a; border-color: rgba(255,255,255,0.42); background: rgba(255,255,255,0.14); box-shadow: none; }
.icon-btn svg { width: 17px; height: 17px; }
.menu-toggle { display: none; }

/* Search bar */
.search-bar { display: none; border-top: 1px solid var(--line); background: var(--card); }
.search-bar.open { display: block; }
.search-inner { max-width: 720px; margin: 0 auto; padding: 18px 24px; position: relative; }
.search-input-wrap { position: relative; }
.search-input-wrap svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-3); pointer-events: none;
}
#siteSearchInput {
  width: 100%; padding: 13px 16px 13px 44px; font-size: 15px; font-family: var(--sans);
  border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--paper);
  color: var(--ink);
}
#siteSearchInput:focus { outline: none; border-color: var(--accent); background: var(--card); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 24px; right: 24px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 420px; overflow-y: auto; z-index: 120; display: none;
}
.search-results.open { display: block; }
.search-results .sr-item { display: block; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.search-results .sr-item:last-child { border-bottom: 0; }
.search-results .sr-item:hover, .search-results .sr-item.sel { background: var(--paper); }
.search-results .sr-kind {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); display: block; margin-bottom: 1px;
}
.search-results .sr-title { font-size: 14.5px; font-weight: 600; }
.search-results .sr-desc { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.search-results .sr-empty { padding: 18px 16px; font-size: 14px; color: var(--ink-3); }

/* Mobile nav */
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--card); max-height: 70vh; overflow-y: auto; }
.mobile-nav.open { display: block; }
.mobile-nav .mn-section { padding: 12px 24px; border-bottom: 1px solid var(--line); }
.mobile-nav .mn-section > a, .mobile-nav .mn-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3); display: block; padding: 6px 0;
}
.mobile-nav .mn-section > a { color: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.mobile-nav a.mn-link { display: block; padding: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.mobile-nav a.mn-link:hover { color: var(--accent); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; line-height: 1;
  padding: 12px 22px; border-radius: 9px; border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.16s ease; text-align: center;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 2px rgba(166,61,47,0.3); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(166,61,47,0.28); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #1d2c3d; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 7px; }
.btn-link { background: none; border: 0; color: var(--accent); padding: 0; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-link:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.arrow-link {
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.arrow-link:hover { gap: 9px; color: var(--accent-deep); }
.arrow-link .arr { transition: all 0.15s; font-family: var(--serif); }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(166,61,47,0.07), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(171,132,44,0.08), transparent 55%),
    linear-gradient(180deg, #fbf9f4 0%, var(--paper) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(22,34,47,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,34,47,0.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(700px 420px at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(700px 420px at 70% 30%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center; padding: 72px 0 80px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent); margin-bottom: 20px;
}
.hero-eyebrow::before, .hero-eyebrow::after { content: ""; height: 1px; width: 28px; background: var(--line-2); }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08; letter-spacing: -0.015em; color: var(--black); margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 540px; margin-bottom: 30px; }
.hero-search { max-width: 540px; margin-bottom: 22px; position: relative; }
.hero-search input {
  width: 100%; padding: 16px 130px 16px 48px; font-size: 15.5px; font-family: var(--sans);
  border: 1px solid var(--black); border-radius: 12px; background: var(--card);
  box-shadow: none; color: var(--ink);
}
.hero-search input:focus { outline: none; border-color: var(--accent); }
.hero-search .hs-icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.hero-search .btn { position: absolute; right: 7px; top: 7px; bottom: 7px; padding: 0 20px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-chips .chips-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.8px; font-weight: 500; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2);
  padding: 5px 13px; border-radius: 99px; transition: all 0.15s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

/* Hero visual: mock stat card */
.hero-visual { position: relative; }
.hero-card {
  background: var(--card); border: 1px solid var(--black); border-radius: var(--radius-lg);
  box-shadow: none; padding: 26px 28px; position: relative;
  transform: none;
}
.hero-card::before {
  content: none; position: absolute; inset: -14px -14px auto auto; width: 120px; height: 120px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius-lg); z-index: -1;
  transform: rotate(4deg);
}
.hc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hc-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.hc-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); background: var(--teal-soft); padding: 4px 10px; border-radius: 99px; }
.hc-sample {
  font-family: var(--serif); font-size: 15px; line-height: 1.75; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 18px; font-style: italic;
}
.hc-sample mark { background: #f3dfb7; color: inherit; padding: 0 2px; border-radius: 2px; }
.hc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hc-stat { text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 6px; }
.hc-stat b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.hc-stat span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 600; }
.hero-floater {
  position: absolute; background: var(--black); color: #e8edf2; border-radius: 10px;
  padding: 10px 15px; font-size: 12.5px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 9px; font-weight: 500;
}
.hero-floater .hf-ico { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: none; }
.hero-floater.f1 { top: -22px; right: -6px; transform: rotate(-2deg); }
.hero-floater.f1 .hf-ico { background: var(--accent); }
.hero-floater.f2 { bottom: -20px; left: -22px; transform: rotate(1.5deg); }
.hero-floater.f2 .hf-ico { background: var(--gold); }
.hero-floater svg { width: 14px; height: 14px; color: #fff; }

/* ============ Feature strip ============ */
.stats-strip { background: var(--black); color: #fff; border-bottom: 3px double rgba(255,255,255,0.15); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-cell { padding: 26px 20px; text-align: center; border-right: 1px solid rgba(255,255,255,0.09); }
.stat-cell:last-child { border-right: 0; }
.stat-cell .feature-icon { display: block; width: 24px; height: 24px; margin: 0 auto 13px; color: #e8b45a; }
.stat-cell h2 { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: #fff; }
.stat-cell p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: #b5c0ca; }

/* ============ Sections ============ */
.section { padding: 72px 0; }
.section.tinted { background: linear-gradient(180deg, #fbf9f5, var(--paper-2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.dark { background: var(--ink); color: #e8edf2; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--accent); margin-bottom: 12px;
}
.section.dark .eyebrow { color: #e8b45a; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 12px;
}
.section-head p { color: var(--ink-3); font-size: 16px; }
.section.dark .section-head p { color: #a9b7c4; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head-row .section-head { margin-bottom: 0; }

/* ============ Cards: tools ============ */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tool-card {
  background: var(--card); border: 1px solid var(--black); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
  transition: all 0.18s ease; position: relative; overflow: hidden;
  color: var(--ink); box-shadow: var(--shadow-sm);
}
.tool-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--black); color: var(--ink); }
.tool-card:hover::after { transform: scaleX(1); }
.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tc-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.tc-icon svg { width: 20px; height: 20px; }
.tc-icon.v-teal { background: var(--teal-soft); color: var(--teal); }
.tc-icon.v-gold { background: var(--gold-soft); color: var(--gold); }
.tc-icon.v-ink { background: #e7ebef; color: var(--ink-2); }
.tc-name { font-family: var(--serif); font-size: 18.5px; font-weight: 600; line-height: 1.25; }
.tc-desc { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; flex: 1; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.tc-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); }
.tc-open { font-size: 12.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.tool-card:hover .tc-open { gap: 7px; }

.pill-badge {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 99px; flex: none;
}
.pill-badge.popular { background: var(--gold-soft); color: var(--gold); }
.pill-badge.new { background: var(--teal-soft); color: var(--teal); }

/* ============ Cards: categories ============ */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: var(--card); border: 1px solid var(--black); border-radius: var(--radius-lg);
  padding: 28px 24px; color: var(--ink); position: relative; overflow: hidden;
  transition: all 0.18s ease; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ink); }
.cat-card .cc-num {
  position: absolute; top: 12px; right: 18px; font-family: var(--serif); font-style: italic;
  font-size: 52px; color: var(--paper-2); font-weight: 600; line-height: 1; user-select: none;
}
.cat-card:hover .cc-num { color: var(--accent-soft); }
.cc-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #e8b45a; }
.cc-icon svg { width: 22px; height: 22px; }
.cat-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.25; }
.cat-card p { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; flex: 1; }
.cc-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tools span { font-size: 11.5px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); padding: 3px 9px; border-radius: 99px; }
.cc-link { font-size: 13.5px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 5px; align-items: center; }
.cat-card:hover .cc-link { gap: 8px; }

/* ============ Cards: articles ============ */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  background: var(--card); border: 1px solid var(--black); border-radius: var(--radius-lg);
  overflow: hidden; color: var(--ink); display: flex; flex-direction: column;
  transition: all 0.18s ease; box-shadow: var(--shadow-sm);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--ink); }
.ac-img { aspect-ratio: 16 / 8.4; background: var(--paper-2); position: relative; overflow: hidden; }
.ac-img img, .ac-img svg { width: 100%; height: 100%; object-fit: cover; }
.ac-cat {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  background: rgba(255,255,255,0.94); color: var(--accent); padding: 4px 11px; border-radius: 99px;
  box-shadow: var(--shadow-sm);
}
.ac-body { padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.ac-body h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.article-card:hover .ac-body h3 { color: var(--accent); }
.ac-excerpt { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); padding-top: 10px; border-top: 1px dashed var(--line); }
.ac-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

/* ============ Spotlight ============ */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.spot-card {
  border-radius: var(--radius-lg); padding: 34px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px; min-height: 260px; justify-content: flex-end;
  color: #fff; isolation: isolate;
}
.spot-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(500px 260px at 85% 15%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(135deg, #1d2c3d 0%, var(--ink) 70%);
}
.spot-card.v-accent::before {
  background:
    radial-gradient(500px 260px at 85% 15%, rgba(255,255,255,0.16), transparent 60%),
    linear-gradient(135deg, #b3493a 0%, var(--accent-deep) 75%);
}
.spot-card .sp-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: #e8b45a; }
.spot-card.v-accent .sp-kicker { color: #f3d3a8; }
.spot-card h3 { font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1.2; }
.spot-card p { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,0.82); max-width: 440px; }
.spot-card .btn { align-self: flex-start; background: #fff; color: var(--ink); border-color: #fff; }
.spot-card .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--accent); }
.spot-glyph {
  position: absolute; top: 18px; right: 24px; font-family: var(--serif); font-style: italic;
  font-size: 110px; line-height: 1; color: rgba(255,255,255,0.09); user-select: none; font-weight: 600;
}

/* ============ Tips band ============ */
.tips-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.tips-list { list-style: none; counter-reset: tips; }
.tips-list li {
  counter-increment: tips; padding: 18px 0 18px 56px; position: relative;
  border-bottom: 1px solid var(--line);
}
.tips-list li:first-child { border-top: 1px solid var(--line); }
.tips-list li::before {
  content: counter(tips, decimal-leading-zero); position: absolute; left: 0; top: 17px;
  font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); font-weight: 600;
}
.tips-list b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.tips-list p { font-size: 14px; color: var(--ink-3); line-height: 1.6; }

/* ============ Values ============ */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card {
  background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-lg); padding: 30px 26px; display: flex; flex-direction: column; gap: 12px;
}
.value-card .vc-icon { width: 44px; height: 44px; border-radius: 11px; background: rgba(232,180,90,0.14); color: #e8b45a; display: flex; align-items: center; justify-content: center; }
.value-card .vc-icon svg { width: 21px; height: 21px; }
.value-card h3 { font-family: var(--serif); font-size: 19.5px; font-weight: 600; }
.value-card p { font-size: 14px; color: #a9b7c4; line-height: 1.65; }
.value-card a { font-size: 13.5px; font-weight: 600; color: #e8b45a; }
.value-card a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ A-Z strip ============ */
.az-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 32px; }
.az-item { display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; }
.az-item:hover { background: var(--card); box-shadow: var(--shadow-sm); color: var(--accent); }
.az-item .az-letter { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--gold); width: 16px; flex: none; font-weight: 600; }
.az-item .az-cat { margin-left: auto; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ============ CTA band ============ */
.cta-band { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%); color: #fff; border-radius: var(--radius-lg); padding: 52px 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.cta-band::before { content: "¶"; position: absolute; right: 40px; top: -38px; font-family: var(--serif); font-size: 220px; color: rgba(255,255,255,0.08); line-height: 1; }
.cta-band h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); font-weight: 500; line-height: 1.2; margin-bottom: 8px; max-width: 560px; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 15.5px; max-width: 560px; }
.cta-band .btn { background: #fff; color: var(--accent-deep); border-color: #fff; flex: none; }
.cta-band .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* ============ Breadcrumbs ============ */
.breadcrumbs { font-size: 12.8px; color: var(--ink-3); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--line-2); }
.breadcrumbs li[aria-current] { color: var(--ink-2); font-weight: 500; }

/* ============ Page header (inner pages) ============ */
.page-head { padding: 40px 0 44px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbf9f4, var(--paper)); }
.page-head .ph-eyebrow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 12px; display: block; }
.page-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.012em; margin-bottom: 12px; max-width: 760px; }
.page-head .ph-sub { font-size: 16.5px; color: var(--ink-3); max-width: 720px; line-height: 1.6; }

/* ============ Tool page ============ */
.tool-head { display: flex; align-items: flex-start; gap: 20px; }
.tool-head .th-icon { width: 58px; height: 58px; border-radius: 14px; background: var(--ink); color: #e8b45a; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: var(--shadow-md); }
.tool-head .th-icon svg { width: 27px; height: 27px; }
.tool-head .th-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.tag-pill { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--card); border: 1px solid var(--line-2); padding: 3px 11px; border-radius: 99px; }
.tag-pill a { color: inherit; }
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.privacy-note { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--teal); font-weight: 600; background: var(--teal-soft); padding: 4px 12px; border-radius: 99px; }
.privacy-note svg { width: 13px; height: 13px; flex: none; }

.tool-section { padding: 40px 0 8px; }
.tool-shell {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.ts-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 13px 20px; background: var(--ink); color: #d5dde5;
  border-bottom: 1px solid #0d161f;
}
.ts-toolbar .ts-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; display: flex; align-items: center; gap: 8px; }
.ts-toolbar .ts-title .ts-dot { width: 8px; height: 8px; border-radius: 50%; background: #6fbf8f; }
.ts-toolbar .ts-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-btn {
  font-family: var(--sans); font-size: 12.8px; font-weight: 600; color: #d5dde5;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  padding: 7px 14px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.14s;
}
.ts-btn svg { width: 13px; height: 13px; }
.ts-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }
.ts-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ts-btn.primary:hover { background: #b84a3a; }
.ts-btn.done { background: var(--ok); border-color: var(--ok); color: #fff; }

.ts-body { display: grid; grid-template-columns: 1fr 1fr; }
.ts-body.single { grid-template-columns: 1fr; }
.ts-pane { display: flex; flex-direction: column; min-width: 0; }
.ts-pane + .ts-pane { border-left: 1px solid var(--line); }
.ts-pane-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--paper);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3);
}
.ts-pane-head .ts-count { font-weight: 600; letter-spacing: 0.02em; text-transform: none; font-size: 12px; color: var(--ink-3); }
.ts-pane textarea {
  width: 100%; min-height: 300px; border: 0; resize: vertical; padding: 18px 20px;
  font-family: var(--sans); font-size: 15.5px; line-height: 1.7; color: var(--ink); background: var(--card);
}
.ts-pane textarea:focus { outline: none; background: #fffdf9; }
.ts-pane textarea.mono { font-family: var(--mono); font-size: 13.5px; }
.ts-output {
  padding: 18px 20px; font-size: 15.5px; line-height: 1.7; min-height: 300px;
  overflow-wrap: break-word; white-space: pre-wrap; background: #fffdf9; flex: 1;
}
.ts-output.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.ts-output.html-out { white-space: normal; }
.ts-output .placeholder { color: var(--ink-3); font-style: italic; }
.ts-options {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 20px;
  border-top: 1px solid var(--line); background: var(--paper);
  align-items: center;
}
.ts-opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.ts-opt input[type="checkbox"], .ts-opt input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.ts-opt select, .ts-select {
  font-family: var(--sans); font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line-2);
  border-radius: 7px; background: var(--card); color: var(--ink); cursor: pointer;
}
.ts-opt input[type="text"], .ts-opt input[type="number"], .ts-input {
  font-family: var(--sans); font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line-2);
  border-radius: 7px; background: var(--card); color: var(--ink); min-width: 0;
}
.ts-opt input[type="number"] { width: 74px; }
.ts-opt-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-right: 2px; }

/* Stats panel under tools */
.ts-stats { border-top: 1px solid var(--line); background: var(--paper); padding: 16px 20px; }
.ts-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ts-stat { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; text-align: center; }
.ts-stat b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.ts-stat span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.ts-stat.accent b { color: var(--accent); }

/* Case converter style button grid */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.case-btn {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2); padding: 10px 12px;
  border-radius: 8px; cursor: pointer; transition: all 0.14s; text-align: left;
}
.case-btn small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.case-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-sm); }
.case-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.case-btn.active small { color: rgba(255,255,255,0.75); }

/* Issue lists (grammar/spelling/readability results) */
.issue-list { padding: 6px 0; }
.issue {
  display: flex; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.issue:last-child { border-bottom: 0; }
.issue .iss-sev {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none;
}
.issue .iss-sev.error { background: var(--err); box-shadow: 0 0 0 3px rgba(179,64,42,0.14); }
.issue .iss-sev.warning { background: var(--warn); box-shadow: 0 0 0 3px rgba(176,124,31,0.14); }
.issue .iss-sev.style { background: var(--teal); box-shadow: 0 0 0 3px rgba(44,110,99,0.12); }
.issue .iss-body { flex: 1; min-width: 0; }
.issue .iss-msg { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.issue .iss-ctx { font-size: 13px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.issue .iss-ctx .frag { font-family: var(--mono); font-size: 12px; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; color: var(--ink-2); }
.issue .iss-ctx .frag mark { background: #f3c9be; color: var(--err); padding: 0 2px; border-radius: 2px; }
.issue .iss-fix { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.issue .iss-fix .fix-to { font-size: 13px; color: var(--ok); font-weight: 600; }
.issue .iss-fix button { font-size: 12.3px; font-weight: 600; padding: 5px 12px; border-radius: 6px; cursor: pointer; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); transition: all 0.14s; }
.issue .iss-fix button:hover { border-color: var(--accent); color: var(--accent); }
.issue .iss-fix button.apply { background: var(--ok); border-color: var(--ok); color: #fff; }
.issue .iss-fix button.apply:hover { background: #276b43; color: #fff; }
.issue-summary { display: flex; gap: 14px; padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.issue-summary .isum { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.issue-summary .isum .dot { width: 10px; height: 10px; border-radius: 50%; }
.clean-banner { padding: 40px 20px; text-align: center; color: var(--teal); }
.clean-banner svg { width: 40px; height: 40px; margin: 0 auto 10px; }
.clean-banner b { font-family: var(--serif); font-size: 20px; display: block; margin-bottom: 4px; color: var(--ink); }
.clean-banner span { font-size: 14px; color: var(--ink-3); }

/* Score gauges (readability) */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 18px 20px; }
.score-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.score-card b { font-family: var(--serif); font-size: 32px; font-weight: 600; display: block; line-height: 1.1; }
.score-card span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); display: block; margin-top: 4px; }
.score-card small { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 6px; line-height: 1.45; }
.score-card .bar { height: 5px; border-radius: 99px; background: var(--paper-2); margin-top: 10px; overflow: hidden; }
.score-card .bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* Similarity meters */
.meter-row { display: grid; gap: 10px; padding: 16px 20px; }
.meter { display: grid; grid-template-columns: 190px 1fr 56px; gap: 12px; align-items: center; font-size: 13.5px; }
.meter .m-label { font-weight: 600; color: var(--ink-2); }
.meter .m-track { height: 9px; background: var(--paper-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter .m-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 99px; transition: width 0.4s ease; }
.meter .m-val { font-family: var(--serif); font-weight: 600; font-size: 17px; text-align: right; }
.shared-phrases { padding: 12px 20px 18px; }
.shared-phrases h5 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 8px; }
.shared-phrases .sp-chip { display: inline-block; font-family: var(--mono); font-size: 12px; background: var(--gold-soft); border: 1px solid #e6d5ab; color: #7a5c17; padding: 3px 10px; border-radius: 99px; margin: 0 6px 6px 0; }

/* Plagiarism highlight output */
.plag-output { padding: 18px 20px; font-size: 15px; line-height: 1.8; min-height: 220px; white-space: pre-wrap; overflow-wrap: break-word; background: #fffdf9; }
.plag-output .pl-hit { background: #f3c9be; border-bottom: 2px solid var(--err); padding: 1px 0; border-radius: 2px; cursor: help; }
.plag-output .pl-partial { background: #f6e3b8; border-bottom: 2px solid var(--warn); padding: 1px 0; border-radius: 2px; cursor: help; }

/* Keyword density table */
.kw-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kw-table th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-3); padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.kw-table td { padding: 8px 20px; border-bottom: 1px solid var(--line); }
.kw-table tr:last-child td { border-bottom: 0; }
.kw-table .kw-bar { display: inline-block; height: 6px; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 99px; vertical-align: middle; margin-right: 8px; }

/* Longest sentence list */
.long-list { padding: 8px 20px 16px; }
.long-list .ll-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; align-items: baseline; }
.long-list .ll-item:last-child { border-bottom: 0; }
.long-list .ll-num { font-family: var(--serif); font-weight: 600; color: var(--accent); width: 52px; flex: none; font-size: 15px; }
.long-list .ll-text { color: var(--ink-2); line-height: 1.55; }

/* ============ Prose (articles, legal, tool content) ============ */
.prose { font-size: 16.8px; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ink);
  line-height: 1.25; letter-spacing: -0.008em; margin-top: 2em; scroll-margin-top: 96px;
  padding-bottom: 0.35em; border-bottom: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0.2em; }
.prose h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-top: 1.7em; scroll-margin-top: 96px; }
.prose h4 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin-top: 1.5em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose em { font-style: italic; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(166,61,47,0.35); text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: 0.45em 0; }
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-weight: 600; font-family: var(--serif); }
.prose blockquote {
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  padding: 14px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-style: italic; font-size: 17.5px; color: var(--ink-2);
}
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--ink); }
.prose pre { background: var(--ink); color: #dce4ec; border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose hr { border: 0; border-top: 3px double var(--line-2); margin: 2.2em auto; width: 40%; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }

/* Tables in prose */
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--card); }
.prose table th {
  text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink); background: var(--paper-2);
  padding: 11px 16px; border-bottom: 2px solid var(--line-2);
}
.prose table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.prose table tr:last-child td { border-bottom: 0; }
.prose table tr:nth-child(even) td { background: #fcfaf6; }

/* Callout boxes */
.callout {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 18px 22px 18px 20px; margin: 1.6em 0; position: relative;
  background: var(--card); box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--ink-3);
}
.callout .co-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 7px; display: flex; align-items: center; gap: 8px;
}
.callout .co-title svg { width: 15px; height: 15px; flex: none; }
.callout p { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.callout p + p { margin-top: 0.6em; }
.callout.tip { border-left-color: var(--teal); background: linear-gradient(90deg, var(--teal-soft), var(--card) 30%); }
.callout.tip .co-title { color: var(--teal); }
.callout.note { border-left-color: var(--gold); background: linear-gradient(90deg, var(--gold-soft), var(--card) 30%); }
.callout.note .co-title { color: var(--gold); }
.callout.warning { border-left-color: var(--err); background: linear-gradient(90deg, var(--accent-soft), var(--card) 30%); }
.callout.warning .co-title { color: var(--err); }
.callout.example { border-left-color: var(--ink-2); }
.callout.example .co-title { color: var(--ink-2); }
.callout ul, .callout ol { padding-left: 1.3em; font-size: 15px; color: var(--ink-2); }
.callout code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }

/* ============ Article page ============ */
.article-hero-wrap { margin: 28px 0 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-md); }
.article-hero-wrap img, .article-hero-wrap svg { width: 100%; height: auto; display: block; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 13px; color: var(--ink-3); margin-top: 16px; }
.article-meta .am-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
.am-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #e8b45a; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; font-weight: 600; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 52px; padding: 44px 0 72px; align-items: start; }
.article-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.aside-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.aside-card h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.toc-list { list-style: none; }
.toc-list li { margin: 0; }
.toc-list a {
  display: block; padding: 6px 10px; margin: 0 -10px; font-size: 13.3px; color: var(--ink-3);
  border-left: 2px solid transparent; border-radius: 0 6px 6px 0; line-height: 1.45;
}
.toc-list a:hover { color: var(--accent); background: var(--paper); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.aside-tools { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.aside-tools a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 8px; font-size: 13.8px; font-weight: 500; color: var(--ink-2); }
.aside-tools a:hover { background: var(--paper); color: var(--accent); }
.aside-tools .at-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--gold); flex: none; transform: rotate(45deg); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.14s; text-decoration: none;
}
.share-btn:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
.share-btn svg { width: 16px; height: 16px; }

.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px 26px; margin-top: 44px; box-shadow: var(--shadow-sm);
}
.author-box .ab-avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: #e8b45a;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif);
  font-size: 24px; font-weight: 600; flex: none;
}
.author-box b { font-family: var(--serif); font-size: 17px; display: block; color: var(--ink); }
.author-box .ab-role { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 2px 0 7px; display: block; }
.author-box p { font-size: 14px; color: var(--ink-3); line-height: 1.6; }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.an-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: var(--ink); transition: all 0.15s; }
.an-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--ink); }
.an-card span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); display: block; margin-bottom: 5px; }
.an-card b { font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.35; display: block; }
.an-card:hover b { color: var(--accent); }
.an-card.next { text-align: right; }

/* ============ Related sections ============ */
.related-section { border-top: 1px solid var(--line); padding: 52px 0 64px; background: linear-gradient(180deg, #fbf9f5, var(--paper)); }
.related-section h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin-bottom: 26px; }

/* ============ Tool content layout ============ */
.tool-content-wrap { padding: 56px 0 72px; }
.tool-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 52px; align-items: start; }

/* ============ Articles index ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 32px; }
.filter-chip {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2); padding: 8px 17px;
  border-radius: 99px; cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ============ Search page ============ */
.search-page-input { position: relative; max-width: 640px; margin: 0 auto 36px; }
.search-page-input input { width: 100%; padding: 16px 20px 16px 50px; font-size: 16px; font-family: var(--sans); border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); color: var(--ink); }
.search-page-input input:focus { outline: none; border-color: var(--accent); }
.search-page-input svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--ink-3); }
.search-page-results { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.spr-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; color: var(--ink); transition: all 0.15s; }
.spr-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--ink); }
.spr-item .spr-kind { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.spr-item b { font-family: var(--serif); font-size: 18px; display: block; margin: 3px 0 4px; font-weight: 600; }
.spr-item p { font-size: 13.8px; color: var(--ink-3); line-height: 1.55; }

/* ============ Legal pages ============ */
.legal-wrap { max-width: 800px; margin: 0 auto; padding: 48px 24px 88px; }
.legal-updated { font-size: 13px; color: var(--ink-3); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 16px; display: inline-block; margin-bottom: 26px; }

/* ============ Footer ============ */
.site-footer { background: var(--black); color: #b7c2cd; margin-top: 0; border-top: 4px double var(--line-2); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; padding: 60px 0 44px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #7e8fa0; }
.footer-brand p { font-size: 13.5px; line-height: 1.65; color: #93a3b2; margin: 16px 0 18px; max-width: 280px; }
.footer-brand .fb-note { font-size: 12px; color: #6d7f90; display: flex; align-items: center; gap: 8px; }
.footer-brand .fb-note svg { width: 14px; height: 14px; color: #6fbf8f; flex: none; }
.footer-col h5 {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: #e8b45a; margin-bottom: 16px;
}
.footer-col h5:not(:first-child) { margin-top: 30px; }
.footer-col ul { list-style: none; }
.footer-col li { margin: 9px 0; }
.footer-col a {
  font-size: 13.8px;
  color: #b7c2cd;
  display: inline-block;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 0.25s ease, background-size 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
.footer-col a:hover { color: #fff; background-size: 100% 1px; }
@media (prefers-reduced-motion: reduce) {
  .footer-col a { transition: color 0.25s ease; }
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.09); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.8px; color: #7e8fa0;
}
.footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a { color: #93a3b2; }
.footer-bottom a:hover { color: #fff; }

/* ============ 404 ============ */
.err-page { text-align: center; padding: 100px 24px 120px; }
.err-page .err-code { font-family: var(--serif); font-size: 110px; font-weight: 600; color: var(--paper-2); line-height: 1; }
.err-page h1 { font-family: var(--serif); font-size: 34px; font-weight: 500; margin: 10px 0 14px; }
.err-page p { color: var(--ink-3); max-width: 460px; margin: 0 auto 28px; }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
  padding: 12px 22px; border-radius: 99px; box-shadow: var(--shadow-lg);
  opacity: 0; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.3, 1); z-index: 200;
  display: flex; align-items: center; gap: 9px; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast svg { width: 16px; height: 16px; color: #6fbf8f; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .mega-menu { width: 620px; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout, .tool-content-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-aside .aside-card { flex: 1; min-width: 260px; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .tips-wrap { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero-inner { grid-template-columns: 1fr; padding: 52px 0 64px; gap: 44px; }
  .hero-visual { max-width: 480px; }
  .spotlight { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: 0; }
  .stat-cell:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.09); }
  .ts-body { grid-template-columns: 1fr; }
  .ts-pane + .ts-pane { border-left: 0; border-top: 1px solid var(--line); }
  .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
}
@media (max-width: 640px) {
  .stat-cell { padding: 22px 10px; }
  .stat-cell h2 { font-size: 14px; }
  .stat-cell p { font-size: 12px; }
  body { font-size: 16px; }
  .utility-inner nav .util-hide-sm { display: none; }
  .section { padding: 52px 0; }
  .tool-grid, .tool-grid.cols-3 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .az-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .an-card.next { text-align: left; }
  .hero-search input { padding-right: 16px; padding-bottom: 56px; }
  .hero-search .btn { top: auto; left: 7px; right: 7px; bottom: 7px; }
  .hc-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-floater { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .legal-wrap { padding: 36px 20px 64px; }
  .meter { grid-template-columns: 120px 1fr 48px; }
  .prose h2 { font-size: 24px; }
}

/* ============ Print ============ */
@media print {
  .utility-bar, .site-header, .site-footer, .article-aside, .share-row,
  .related-section, .tool-section, .toast, .breadcrumbs { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .prose { max-width: 100%; }
  .article-layout, .tool-content-layout { grid-template-columns: 1fr; }
  a { color: inherit; text-decoration: underline; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
