/* =====================================================================
   namasivayam.in — Design v3
   One stylesheet for every page. Utilities used by the calculator
   widgets live in css/utilities.css (generated).
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --brand: #cf271e;
  --brand-600: #b21f17;
  --brand-50: #fdf0ef;
  --accent: #f59e0b;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --border: #e5e7eb;
  --ring: rgba(207, 39, 30, .35);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 8px 28px -12px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, .38);
  --radius: 16px;
  --header-h: 64px;
  --wrap: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Tamil", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
html.dark {
  --brand-50: rgba(207, 39, 30, .16);
  --ink: #f3f4f6;
  --ink-2: #d1d5db;
  --muted: #9ca3af;
  --bg: #0b0f17;
  --surface: #131a26;
  --surface-2: #1b2433;
  --border: #263044;
  --shadow: 0 8px 28px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; color: var(--ink); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
main { display: block; min-height: 60vh; }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: .15s ease; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px rgba(207, 39, 30, .8); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 12px; font-size: .88rem; border-radius: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--brand-50); color: var(--brand); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: .92rem; transition: .15s; }
.chip-link:hover { border-color: var(--brand); color: var(--brand); }
.chip-link.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-weight: 600; font-size: .82rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(207, 39, 30, .18); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: var(--shadow); }
.bar { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.logo img { width: 34px; height: 34px; border-radius: 10px; }
.logo b { color: var(--brand); }
.nav { display: none; margin-left: auto; align-items: center; gap: 2px; }
.nav > a, .dd > button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .95rem; color: var(--ink-2); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .dd > button:hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-active, .dd.is-active > button { color: var(--brand); background: var(--brand-50); }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .16s ease; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu, .dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: .93rem; }
.dd-menu a i { width: 18px; text-align: center; color: var(--brand); }
.dd-menu a:hover, .dd-menu a.is-active { background: var(--surface-2); color: var(--ink); }
.actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav + .actions { margin-left: 8px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: .15s; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }
.search-btn { width: auto; padding: 0 12px; gap: 8px; display: inline-flex; align-items: center; font-size: .88rem; color: var(--muted); }
.search-btn kbd { font-family: inherit; font-size: .72rem; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }
.search-btn .lbl { display: none; }
.cta { display: none; }
.burger { display: inline-grid; }
@media (min-width: 1100px) {
  .nav { display: flex; }
  .burger { display: none; }
  .cta { display: inline-flex; }
  .search-btn .lbl { display: inline; }
}

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: .2s; z-index: 70; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); z-index: 71; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 16px; }
.drawer { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
body.drawer-open .drawer { transform: none; visibility: visible; transition: transform .25s ease; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.drawer a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; }
.drawer a i { width: 20px; text-align: center; color: var(--brand); }
.drawer a:hover, .drawer a.is-active { background: var(--surface-2); color: var(--ink); }
.drawer h6 { margin: 14px 12px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }

/* Search */
.search { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(8, 10, 16, .55); backdrop-filter: blur(4px); }
.search.open { display: flex; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.search-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: var(--ink); min-width: 0; }
.search-input kbd { font-size: .72rem; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 8px; }
.search-results a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--ink); }
.search-results a.sel, .search-results a:hover { background: var(--surface-2); }
.search-results .tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: var(--brand-50); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.search-label { padding: 6px 12px; font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }
.search-foot { padding: 8px 14px; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: #0b0f17; color: #cbd5e1; margin-top: 64px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.foot-top { display: grid; gap: 32px 24px; padding: 52px 0 36px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand .logo { color: #fff; }
.foot-brand p { color: #94a3b8; margin: 14px 0 18px; max-width: 38ch; }
@media (min-width: 900px) { .foot-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; } .foot-brand { grid-column: auto; } }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #161d2b; border: 1px solid #222b3d; transition: .15s; }
.social a:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .93rem; }
.foot-bottom { border-top: 1px solid #1c2433; padding: 20px 0; font-size: .82rem; color: #64748b; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* ---------- Floating UI ---------- */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff; border: 0; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); z-index: 90; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 48px 0 32px; border-bottom: 1px solid var(--border); background: var(--surface); }
.page-hero::before { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(207, 39, 30, .14), transparent 70%); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; margin: 12px 0 10px; }
.page-hero p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.page-hero .chip-row { margin-top: 22px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs i { font-size: .6rem; opacity: .6; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 4px; }
.section-head a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

/* ---------- Home hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 36px; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(closest-side, rgba(207, 39, 30, .16), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); } }
.hero-grid > div:first-child { min-width: 0; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.07; letter-spacing: -.035em; font-weight: 800; margin: 18px 0 16px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 56ch; line-height: 1.7; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 32px; }
.stats b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stats span { font-size: .85rem; color: var(--muted); }
.hero-card { position: relative; justify-self: center; width: min(100%, 340px); }
@media (max-width: 899px) { .hero-card { width: min(78%, 300px); } }
.hero-card .photo { aspect-ratio: 3/4; border-radius: 28px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-lg); border: 6px solid var(--surface); }
.hero-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.hero-card:hover .photo img { transform: scale(1.04); }
.hero-card .badge { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .85rem; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.hero-card .badge i { color: var(--brand); font-size: 1.1rem; }
.hero-card .b1 { left: -18px; bottom: 40px; }
.hero-card .b2 { right: -14px; top: 30px; }
@media (max-width: 480px) { .hero-card .b1 { left: 6px; } .hero-card .b2 { right: 6px; } }

/* Explore tiles */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: .18s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.tile .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; }
.tile b { font-size: 1.02rem; }
.tile small { color: var(--muted); font-size: .85rem; line-height: 1.45; }

/* ---------- Article cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card .thumb { aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.card .body { display: flex; flex-direction: column; gap: 10px; padding: 18px; flex: 1; }
.card h3 { font-size: 1.08rem; line-height: 1.35; }
.card p { color: var(--muted); font-size: .93rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .82rem; color: var(--muted); margin-top: auto; }
.meta i { margin-right: 4px; }

/* Featured layout (home) */
.featured { display: grid; gap: 22px; }
@media (min-width: 960px) { .featured { grid-template-columns: 1.35fr 1fr; } }
.feature-main { position: relative; display: block; border-radius: 20px; overflow: hidden; min-height: 360px; background: #111; box-shadow: var(--shadow); }
.feature-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform .5s ease; }
.feature-main:hover img { transform: scale(1.03); }
.feature-main .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 26px; background: linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .92) 100%); color: #fff; }
.feature-main h3, .feature-main p { text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
@media (max-width: 640px) { .feature-main { min-height: 300px; } .feature-main p { display: none; } }
.feature-main h3 { color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.2; }
.feature-main p { color: rgba(255, 255, 255, .85); max-width: 60ch; }
.feature-main .chip { background: var(--brand); color: #fff; align-self: flex-start; }
.feature-list { display: grid; gap: 14px; }
.row-card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: .18s; }
.row-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.row-card img { width: 120px; height: 84px; object-fit: cover; border-radius: 12px; }
.row-card h3 { font-size: .98rem; line-height: 1.35; margin: 4px 0; }
.row-card .meta { margin: 0; }

/* Two-column with sidebar */
.with-side { display: grid; gap: 32px; }
@media (min-width: 1000px) { .with-side { grid-template-columns: minmax(0, 1fr) 330px; } }
.side { display: grid; gap: 18px; align-content: start; }
@media (min-width: 1000px) { .side.sticky { position: sticky; top: calc(var(--header-h) + 20px); } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel h3 i { color: var(--brand); }
.mini-list { display: grid; gap: 12px; }
.mini { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.mini img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.mini b { font-size: .9rem; line-height: 1.35; font-weight: 600; display: block; }
.mini:hover b { color: var(--brand); }
.mini small { color: var(--muted); font-size: .78rem; }

/* Kural / quote panels */
.kural { background: linear-gradient(135deg, #fff7ed, #fdf2f8); border: 1px solid #fde7d3; }
html.dark .kural { background: linear-gradient(135deg, #1e1a23, #1b2433); border-color: var(--border); }
.kural .ta { font-family: "Noto Sans Tamil", var(--font); font-size: 1.15rem; font-weight: 700; line-height: 1.7; white-space: pre-line; color: var(--ink); }
.kural .en { margin-top: 10px; color: var(--ink-2); font-style: italic; }
.quote-panel blockquote { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.6; color: var(--ink); }
.quote-panel .by { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.quote-panel .by img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* Quote strip */
.quote-strip { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 700px) { .quote-strip { grid-template-columns: repeat(6, 1fr); } }
.quote-strip a { border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); transition: .18s; }
.quote-strip a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quote-strip img { width: 100%; height: 100%; object-fit: cover; }

/* CTA band */
.band { border-radius: 24px; padding: 36px 28px; background: linear-gradient(135deg, #1a1f2e, #0b0f17); color: #fff; display: grid; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(207, 39, 30, .45), transparent 70%); }
.band h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.band p { color: #cbd5e1; margin-top: 6px; }
.band .btns { margin: 0; position: relative; z-index: 1; }
@media (min-width: 860px) { .band { grid-template-columns: 1fr auto; padding: 40px 44px; } }

/* ---------- Article page ---------- */
.post-head { padding: 40px 0 8px; }
.post-head .wrap { max-width: 1192px; }
.post-head h1, .post-head .lede { max-width: 860px; }
.post-head h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 14px 0 16px; }
.post-head .lede { font-size: 1.15rem; color: var(--muted); line-height: 1.6; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; font-size: .9rem; color: var(--muted); }
.byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline b { color: var(--ink); font-weight: 600; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
.post-cover { max-width: 1192px; margin: 26px auto 0; padding: 0 16px; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
.post-cover figcaption { margin-top: 8px; text-align: center; font-size: .8rem; color: var(--muted); }
.post-cover figcaption a { text-decoration: underline; }
.post-layout { max-width: 1160px; margin: 36px auto 0; padding: 0 16px; display: grid; gap: 40px; }
@media (min-width: 1040px) { .post-layout { grid-template-columns: minmax(0, 1fr) 320px; max-width: 1192px; } .post-layout .prose, .post-layout .share, .post-layout .author-box { max-width: 760px; } }

.prose { font-size: 1.1rem; line-height: 1.85; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.55rem; line-height: 1.3; margin-top: 1.9em; color: var(--ink); }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; color: var(--ink); }
.prose h4 { font-size: 1.08rem; margin-top: 1.4em; }
.prose h2 b, .prose h3 b, .prose h2 strong, .prose h3 strong { font-weight: inherit; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 14px 14px 0; font-family: var(--serif); font-size: 1.18rem; color: var(--ink); font-style: italic; }
.prose img { border-radius: 14px; margin: 1.4em auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose strong, .prose b { color: var(--ink); }
.prose p:first-child::first-letter { float: left; font-family: var(--serif); font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; color: var(--brand); font-weight: 700; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.share span { font-weight: 600; color: var(--ink); margin-right: 4px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: .86rem; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand); }
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; margin-top: 28px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-box b { display: block; font-size: 1.05rem; }
.author-box p { color: var(--muted); font-size: .93rem; margin-top: 4px; }
.author-box .links { display: flex; gap: 12px; margin-top: 8px; font-size: .9rem; }
.author-box .links a { color: var(--brand); font-weight: 600; }

/* ---------- InfoQuotes gallery ---------- */
#gallery { display: grid !important; gap: 14px !important; grid-template-columns: repeat(2, 1fr) !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
@media (min-width: 640px) { #gallery { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1000px) { #gallery { grid-template-columns: repeat(4, 1fr) !important; } }
#gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; cursor: zoom-in; transition: .2s; box-shadow: none !important; }
#gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow) !important; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .86); padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 720px); max-height: 82vh; border-radius: 14px; }
.lightbox button { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.2rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- About ---------- */
.about-hero { display: grid; gap: 32px; align-items: center; padding-top: 52px; padding-bottom: 24px; }
@media (max-width: 899px) { .about-photo { width: min(84%, 340px); } }
@media (min-width: 900px) { .about-hero { grid-template-columns: .8fr 1.2fr; } }
.about-photo { justify-self: center; width: min(100%, 380px); padding: 0 0 40px 0; }
.about-photo .ap-main { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3/4; border: 6px solid var(--surface); background: #000; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-photo .ap-main img { transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.about-photo:hover .ap-main img { transform: scale(1.04); }
.about-photo .ap-small { position: absolute; right: -26px; bottom: 0; width: 42%; aspect-ratio: 3/4; border-radius: 20px; overflow: hidden; border: 5px solid var(--surface); box-shadow: var(--shadow-lg); animation: popIn .9s .7s cubic-bezier(.2,.8,.2,1) both, floatY 6s 1.6s ease-in-out infinite; }
.about-photo .ap-tag { position: absolute; left: -14px; top: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .85rem; font-weight: 600; animation: popIn .8s 1s both, floatY 5s 2s ease-in-out infinite; }
.about-photo .ap-tag i { color: var(--brand); }
@media (max-width: 480px) { .about-photo .ap-small { right: 0; } .about-photo .ap-tag { left: 4px; } }
.story-photo { margin: 0 0 22px; border-radius: 24px; overflow: hidden; position: relative; background: #000; box-shadow: var(--shadow); }
.story-photo img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.story-photo:hover img { transform: scale(1.05); }
.story-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; color: #fff; font-family: var(--serif); font-style: italic; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.me-card { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius); background: #0f0f10; color: #fff; overflow: hidden; }
.me-card img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; object-position: 40% 30%; }
.me-card b { display: block; font-size: 1.05rem; }
.me-card small { color: rgba(255,255,255,.7); }
.me-card p { margin-top: 6px; font-size: .92rem; color: rgba(255,255,255,.85); }
.hero-author { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; font-size: .92rem; color: var(--muted); }
.hero-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--brand); }
.hero-author a { color: var(--ink); }
.about-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 14px 0; }
.about-hero p { color: var(--muted); font-size: 1.1rem; }
.facts { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.fact b { display: block; font-size: 1.8rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.fact span { display: block; font-weight: 600; margin-top: 2px; }
.fact small { display: block; color: var(--muted); margin-top: 4px; font-size: .85rem; }
.story { max-width: 760px; }
.big-quote { margin: 0; padding: 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.5; color: var(--ink); position: relative; }
.big-quote::before { content: "“"; position: absolute; top: -10px; left: 22px; font-size: 5rem; line-height: 1; color: var(--brand); opacity: .25; }
.big-quote footer { margin-top: 16px; font-family: var(--font); font-size: .95rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.big-quote footer img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.two { display: grid; gap: 18px; }
@media (min-width: 800px) { .two { grid-template-columns: 1fr 1fr; } }
.vm { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.vm .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1.2rem; margin-bottom: 14px; }
.vm h3 { font-size: 1.2rem; margin-bottom: 8px; }
.vm p { color: var(--ink-2); }
.brands { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.brand { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.brand .logo-box { width: 64px; height: 64px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.brand .logo-box img { max-width: 52px; max-height: 52px; object-fit: contain; }
.brand b { font-size: 1.02rem; }
.brand p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.brand .links { display: flex; gap: 12px; margin-top: auto; color: var(--muted); }
.brand .links a:hover { color: var(--brand); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 22px; margin-top: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.contact-cards { display: grid; gap: 14px; align-content: start; }
.c-card { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: .18s; }
a.c-card:hover { border-color: var(--brand); }
.c-card .ic { flex: 0 0 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; color: #fff; }
.c-card b { display: block; }
.c-card small { color: var(--muted); }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 16px; }
.form h2 { font-size: 1.3rem; }
.form p.hint { color: var(--muted); font-size: .9rem; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 1rem; outline: none; transition: .15s; }
.field input:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Legal / prose pages ---------- */
.doc { max-width: 820px; margin: 36px auto 0; padding: 0 16px; }
.doc-body { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(22px, 4vw, 44px); }
.doc-body h1 { display: none; }
.doc-body .updated { display: inline-block; font-size: .85rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 4px 12px; }
.doc-body section { margin-top: 1.8em; }
.doc-body h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.doc-body h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.doc-body p, .doc-body li { color: var(--ink-2); line-height: 1.8; }
.doc-body ul { padding-left: 1.3em; }
.doc-body a { color: var(--brand); text-decoration: underline; }

/* Sitemap */
.map-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 32px; }
.map-grid .panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.map-grid .panel a { color: var(--ink-2); font-size: .94rem; }
.map-grid .panel a:hover { color: var(--brand); }

/* Empty / 404 */
.center-msg { text-align: center; padding: 72px 16px 24px; }
.center-msg .big { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center-msg h1 { font-size: 1.8rem; margin: 14px 0 8px; }
.center-msg p { color: var(--muted); max-width: 48ch; margin: 0 auto; }
.center-msg .btns { justify-content: center; }

/* Blog list controls */
.list-tools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 28px 0 22px; }
.filter { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); min-width: min(100%, 300px); color: var(--muted); }
.filter input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.empty { display: none; text-align: center; padding: 40px; color: var(--muted); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.feature-main .meta { margin-top: 0; }

/* ---------- Topics (home) ---------- */
.topics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.topic-col { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.topic-head { display: flex; align-items: center; gap: 10px; }
.topic-head .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.topic-head b { font-size: 1.05rem; }
.topic-head .count { margin-left: auto; font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.topic-col .mini { grid-template-columns: 52px 1fr; }
.topic-col .mini img { width: 52px; height: 52px; }
.topic-col .mini b { font-size: .86rem; }
.topic-col .more { margin-top: auto; color: var(--brand); font-weight: 600; font-size: .9rem; }

.topic-col .mini { grid-template-columns: 1fr; }
.topic-col .mini img { display: none; }
.topic-col .mini-list { gap: 14px; }
.topic-col .mini b { font-size: .9rem; }
@media (min-width: 1100px) { .topics { grid-template-columns: repeat(4, 1fr); } }

/* =====================================================================
   TOOLS v4 — cards, hub, tool pages
   ===================================================================== */
.tool-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tool-card { --c: var(--brand); position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px 40px 18px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); opacity: 0; transition: .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.tool-card:hover::before { opacity: 1; }
.tool-card .ic { flex: 0 0 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); transition: .2s; }
.tool-card:hover .ic { background: var(--c); color: #fff; transform: rotate(-6deg) scale(1.05); }
.tool-card b { display: block; margin-bottom: 3px; font-size: .98rem; }
.tool-card small { color: var(--muted); font-size: .85rem; line-height: 1.45; display: block; }
.tool-card .go { position: absolute; right: 16px; top: 50%; transform: translate(-6px, -50%); opacity: 0; color: var(--c); transition: .2s; }
.tool-card:hover .go { opacity: 1; transform: translate(0, -50%); }
.tool-card .pop { display: inline-block; vertical-align: 2px; margin-left: 4px; font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); padding: 2px 7px; border-radius: 999px; }


/* hub */
.tools-hero { position: relative; overflow: hidden; padding: 46px 0 30px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tools-hero::before { content: ""; position: absolute; right: -160px; top: -200px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(closest-side, rgba(207, 39, 30, .14), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.tools-hero .wrap { position: relative; }
.tools-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.03em; margin: 12px 0 10px; }
.tools-hero p { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.tool-search { display: flex; align-items: center; gap: 10px; margin-top: 24px; max-width: 620px; padding: 14px 18px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); transition: .15s; }
.tool-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); background: var(--surface); }
.tool-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: var(--ink); min-width: 0; }
.tabs { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; transition: .15s; }
.tab span { font-size: .75rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab.is-active span { background: rgba(255, 255, 255, .18); color: #fff; }
.tool-group + .tool-group { margin-top: 44px; }
.tg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tg-head .ic { --c: var(--brand); width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 10px 20px -10px var(--c); }
.tg-head h2 { font-size: 1.35rem; }
.tg-head p { color: var(--muted); font-size: .92rem; }
#tool-empty { display: none; }

/* tool page hero */
.tool-hero { --c: var(--brand); position: relative; overflow: hidden; padding: 34px 0 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--surface)), var(--surface)); border-bottom: 1px solid var(--border); }
.tool-hero::after { content: ""; position: absolute; right: -120px; top: -140px; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
.tool-hero .wrap { position: relative; z-index: 1; }
.th-row { display: flex; gap: 18px; align-items: center; margin-top: 16px; }
.th-icon { flex: 0 0 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--c); box-shadow: 0 16px 30px -14px var(--c); animation: popIn .5s cubic-bezier(.2, .9, .3, 1.3) both; }
.th-row h1 { font-size: clamp(1.6rem, 3.8vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; }
.th-row p { color: var(--muted); margin-top: 6px; font-size: 1.02rem; max-width: 64ch; }
.th-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.th-chips span { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); padding: 6px 11px; border-radius: 999px; }
.th-chips i { color: var(--c); }
@media (max-width: 560px) { .th-row { flex-direction: column; align-items: flex-start; gap: 12px; } .th-icon { flex-basis: auto; width: 52px; height: 52px; font-size: 1.3rem; border-radius: 16px; } }

/* tool shell */
.tool-wrap { margin-top: 28px; }
.tool-shell { display: grid; gap: 20px; align-items: start; }
@media (min-width: 980px) { .tool-shell { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); } .tool-shell .tool-out { position: sticky; top: calc(var(--header-h) + 18px); } }
@media (min-width: 980px) { .tool-shell.wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } }
.tool-shell.solo { grid-template-columns: minmax(0, 560px); justify-content: center; }
.tool-in, .tool-out { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(18px, 2.6vw, 28px); box-shadow: var(--shadow-sm); }
.tool-out { background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--brand) 3%, var(--surface))); }
.pane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pane-head h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 700; }
.pane-head h2 i { color: var(--brand); }
.link-btn { border: 0; background: none; color: var(--muted); font-weight: 600; font-size: .85rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; }
.link-btn:hover { color: var(--brand); background: var(--brand-50); }
.tool-in { display: grid; gap: 22px; }
.tool-in .pane-head { margin-bottom: -4px; }

/* slider field */
.sf { display: grid; gap: 10px; }
.sf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sf-top label, .fld-label { font-weight: 600; font-size: .93rem; color: var(--ink-2); }
.sf-box { display: flex; align-items: center; gap: 4px; background: var(--brand-50); border: 1px solid transparent; border-radius: 10px; padding: 6px 10px; transition: .15s; }
.sf-box:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-50); }
.sf-box input { width: 9.5ch; border: 0; outline: 0; background: transparent; text-align: right; font-weight: 700; font-size: 1rem; color: var(--brand); -moz-appearance: textfield; }
.sf-box input::-webkit-outer-spin-button, .sf-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf-affix { color: var(--brand); font-weight: 700; font-size: .95rem; }
.sf-range { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) var(--p), var(--surface-2) var(--p)); outline: none; cursor: pointer; margin: 4px 0; }
.sf-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 4px 10px rgba(207, 39, 30, .35); transition: transform .15s; }
.sf-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.sf-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 4px 10px rgba(207, 39, 30, .35); }
.sf-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px var(--ring); }
.sf-scale { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: -4px; }
.sf-hint { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.fld { display: grid; gap: 8px; }
.fld input:not([type=radio]):not([type=checkbox]):not([type=color]), .fld select, .fld textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 1rem; outline: none; transition: .15s; }
.fld input[type=color] { width: 100%; height: 48px; padding: 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.fld textarea { line-height: 1.6; resize: vertical; min-height: 140px; }
.fld-2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .fld-2 { grid-template-columns: 1fr 1fr; } }
.fld-sep { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--ink-2); cursor: pointer; transition: .15s; white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.seg input:focus-visible + span { outline: 3px solid var(--ring); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink-2); }
.check input, .tog input { width: 18px; height: 18px; accent-color: var(--brand); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tog { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; cursor: pointer; }
.tog:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

/* result panel */
#out { display: grid; gap: 18px; }
.out-main { position: relative; padding: 20px 22px; border-radius: 18px; background: linear-gradient(135deg, var(--brand), #e2552f); color: #fff; box-shadow: 0 18px 34px -18px rgba(207, 39, 30, .9); animation: popIn .35s ease both; }
.out-main span { display: block; font-size: .85rem; opacity: .9; font-weight: 600; }
.out-main b { display: block; font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; line-height: 1.2; word-break: break-word; }
.out-main small { font-size: .85rem; opacity: .9; }
.out-main .fr sup, .out-main .fr sub { font-size: .7em; }
.out-copy { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }
.out-copy:hover { background: rgba(255, 255, 255, .3); }
.out-badge { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 500; color: var(--ink-2); }
.out-badge.ok { background: #ecfdf5; color: #065f46; }
.out-badge.warn { background: #fffbeb; color: #92400e; }
.out-badge.bad { background: #fef2f2; color: #991b1b; }
.out-rows { margin: 0; display: grid; }
.out-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.out-rows div:last-child { border-bottom: 0; }
.out-rows dt { color: var(--muted); font-size: .92rem; }
.out-rows dd { margin: 0; font-weight: 600; text-align: right; color: var(--ink); }
.out-rows .strong dd { color: var(--brand); font-weight: 800; }
.out-note { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.out-sub { font-size: .9rem; margin: 2px 0 -6px; color: var(--ink-2); }
.viz { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; animation: spinIn .7s cubic-bezier(.2, .8, .2, 1) both; }
.donut-hole { width: 86px; height: 86px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.donut-hole b { font-size: 1.2rem; }
.donut-hole small { font-size: .68rem; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; min-width: 170px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.legend i { width: 12px; height: 12px; border-radius: 4px; flex: 0 0 auto; }
.legend span { color: var(--muted); flex: 1; }
.legend b { color: var(--ink); }
.gauge { position: relative; padding-top: 6px; }
.gauge-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; }
.gauge-pin { position: absolute; top: 0; width: 4px; height: 24px; margin-left: -2px; border-radius: 4px; background: var(--ink); box-shadow: 0 0 0 3px var(--surface); transition: left .4s cubic-bezier(.2, .8, .2, 1); }
.gauge-labels { display: flex; margin-top: 8px; font-size: .72rem; color: var(--muted); text-align: center; }
.glasses { display: flex; flex-wrap: wrap; gap: 6px; color: #0ea5e9; font-size: 1.15rem; }
.glasses i { animation: popIn .3s ease both; }
.glasses i:nth-child(n) { animation-delay: calc(var(--i, 0) * 20ms); }
.tool-extra { margin-top: 20px; }
.extra-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(18px, 2.6vw, 28px); }
.extra-card h2 { font-size: 1.1rem; margin-bottom: 14px; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 14px; max-height: 460px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.calc-table th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: left; padding: 11px 14px; font-weight: 600; white-space: nowrap; }
.calc-table td { padding: 10px 14px; border-top: 1px solid var(--border); white-space: nowrap; color: var(--ink-2); }
.calc-table tr:nth-child(even) td { background: var(--surface-2); }
.calc-table tr:hover td { background: var(--brand-50); }

/* info */
.tool-info { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .tool-info { grid-template-columns: 1fr 1fr; } }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(18px, 2.6vw, 28px); }
.info-card h2 { font-size: 1.1rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.info-card h2 i { color: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps span { flex: 0 0 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .9rem; }
.steps p { color: var(--ink-2); padding-top: 4px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--brand); transition: transform .2s; font-size: .85rem; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding: 0 0 16px; line-height: 1.7; }
.disclaimer { margin-top: 26px; font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* special widgets */
.frac-row { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.frac { display: grid; gap: 6px; width: 110px; }
.frac input { text-align: center; font-size: 1.3rem; font-weight: 700; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); outline: none; }
.frac input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.frac span { height: 3px; background: var(--ink); border-radius: 3px; }
.seg-op { flex-direction: column; }
.seg-op span { font-size: 1.15rem; padding: 6px 14px; }
.fr { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; vertical-align: middle; }
.fr sup { border-bottom: 3px solid currentColor; padding: 0 6px 4px; }
.fr sub { padding-top: 4px; }
.calc-ui { display: grid; gap: 14px; }
.screen { background: #0f1420; color: #fff; border-radius: 18px; padding: 18px 20px; text-align: right; min-height: 104px; display: grid; align-content: end; gap: 4px; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .4); }
.screen .expr { color: #94a3b8; font-size: .95rem; min-height: 1.3em; word-break: break-all; }
.screen .val { font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; word-break: break-all; line-height: 1.15; }
.screen .val.preview { color: #cbd5e1; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-ui.sci .keys { grid-template-columns: repeat(4, 1fr); }
.key { height: 58px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: 1.2rem; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .08s, background .15s; }
.key:hover { background: var(--surface-2); }
.key:active, .key.hit { transform: scale(.94); }
.key.op { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.key.fn { background: var(--surface-2); font-size: .95rem; height: 46px; }
.key.clr { color: var(--brand); }
.key.eq { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(207, 39, 30, .8); }
.key.eq:hover { background: var(--brand-600); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .85rem; color: var(--muted); text-align: right; }
.pwd { display: grid; gap: 12px; }
.pwd code { display: block; padding: 18px; border-radius: 16px; background: #0f1420; color: #fff; font-size: 1.25rem; word-break: break-all; letter-spacing: .04em; animation: popIn .3s ease both; }
.pwd-actions, .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; transition: width .4s; }
.meter.bad span { background: #ef4444; } .meter.warn span { background: #f59e0b; } .meter.ok span { background: #22c55e; }
.pwd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pwd-list li { display: flex; gap: 8px; align-items: center; }
.pwd-list code { flex: 1; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; word-break: break-all; }
.swatch-big { height: 130px; border-radius: 18px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); animation: popIn .3s ease both; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.codes li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--surface-2); }
.codes span { width: 48px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.codes code { flex: 1; font-size: .92rem; word-break: break-all; }
.shades { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.shades button { height: 38px; border: 0; border-radius: 8px; cursor: pointer; transition: transform .12s; }
.shades button:hover { transform: translateY(-3px); }
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contrast div { padding: 14px; border-radius: 12px; font-size: 1.1rem; }
.contrast b { display: block; font-size: .78rem; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.stat b { display: block; font-size: 1.35rem; letter-spacing: -.02em; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.main { background: var(--brand); color: #fff; } .stat.main span { color: rgba(255, 255, 255, .85); }
.chip-link.is-active { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 6px 16px -6px rgba(207,39,30,.55); }
.chip-link.is-active span { opacity: .85 !important; }

/* =====================================================================
   MOTION
   ===================================================================== */
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes spinIn { from { opacity: 0; transform: rotate(-90deg) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.12); } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes ring { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill: var(--ink); } }

/* scroll reveal */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
html.js [data-reveal="left"] { transform: translateX(-34px); }
html.js [data-reveal="right"] { transform: translateX(34px); }
html.js [data-reveal="zoom"] { transform: scale(.92); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* home hero */
.hero::before { animation: drift 14s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; left: -160px; bottom: -220px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 158, 11, .14), transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; pointer-events: none; }
.hero-grid > div:first-child > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero-grid > div:first-child > :nth-child(1) { animation-delay: .05s; }
.hero-grid > div:first-child > :nth-child(2) { animation-delay: .15s; }
.hero-grid > div:first-child > :nth-child(3) { animation-delay: .28s; }
.hero-grid > div:first-child > :nth-child(4) { animation-delay: .4s; }
.hero-grid > div:first-child > :nth-child(5) { animation-delay: .52s; }
.hero-card { animation: rise 1s .25s cubic-bezier(.2, .8, .2, 1) both; }
.hero-card .photo { position: relative; }
.hero-card .badge { animation: floatY 5s ease-in-out infinite; }
.hero-card .b2 { animation-delay: -2.5s; }
.hero-card .ring { position: absolute; inset: -18px; border-radius: 34px; border: 2px solid rgba(207, 39, 30, .25); animation: ring 3s ease-out infinite; pointer-events: none; }
.hero h1 em { background-size: 200% auto; animation: shine 6s linear infinite; background-image: linear-gradient(90deg, var(--brand), var(--accent), var(--brand)); }
.rotator { display: inline; white-space: normal; overflow-wrap: break-word; }
.rotator .caret { display: inline-block; width: 3px; height: .9em; margin-left: 3px; background: var(--brand); vertical-align: -0.08em; animation: blink 1s step-end infinite; -webkit-text-fill-color: initial; }
.stats b { font-variant-numeric: tabular-nums; }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 30px; font-size: .78rem; color: var(--muted); }
.scroll-cue span { width: 22px; height: 34px; border-radius: 12px; border: 2px solid var(--border); position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--brand); animation: floatY 1.6s ease-in-out infinite; }
.tile .ic { transition: transform .25s ease; }
.tile:hover .ic { transform: rotate(-8deg) scale(1.08); }

/* quote marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track a { flex: 0 0 180px; height: 180px; border-radius: 16px; overflow: hidden; background: var(--surface-2); transition: transform .25s; }
.marquee-track a:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: var(--shadow); }
.marquee-track img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .marquee-track a { flex-basis: 140px; height: 140px; } }

/* about */
.about-photo { position: relative; }
.about-hero .about-photo { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.about-hero > div:last-child > * { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.about-hero > div:last-child > :nth-child(2) { animation-delay: .12s; }
.about-hero > div:last-child > :nth-child(3) { animation-delay: .24s; }
.about-hero > div:last-child > :nth-child(4) { animation-delay: .36s; }
.about-hero > div:last-child > :nth-child(5) { animation-delay: .48s; }
.about-hero > div:last-child > :nth-child(6) { animation-delay: .6s; }
.signature { display: block; width: min(320px, 80%); height: auto; margin-top: 8px; overflow: visible; }
.signature text { font-family: "Great Vibes", cursive; font-size: 64px; fill: transparent; stroke: var(--brand); stroke-width: 1.2; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 3.2s .6s ease forwards, fillIn .8s 3.2s ease forwards; }
.fact { position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.fact:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.fact::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--brand); transition: width .6s ease .2s; }
.fact.in::after { width: 100%; }
.vm { transition: transform .25s, box-shadow .25s; }
.vm:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vm .ic { transition: transform .3s; }
.vm:hover .ic { transform: rotate(-10deg) scale(1.1); }
.brand { transition: transform .25s, box-shadow .25s; }
.brand:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.brand .logo-box img { transition: transform .3s; }
.brand:hover .logo-box img { transform: scale(1.12) rotate(-4deg); }
.social-pop a, .chip-row .icon-btn { transition: transform .2s; }
.chip-row .icon-btn:hover { transform: translateY(-3px); }
.journey { position: relative; display: grid; gap: 22px; padding-left: 30px; }
.journey::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.journey .line-fill { position: absolute; left: 9px; top: 6px; width: 2px; height: 0; background: var(--brand); transition: height 1.6s ease; }
.journey.in .line-fill { height: calc(100% - 12px); }
.journey li { position: relative; list-style: none; }
.journey li::before { content: ""; position: absolute; left: -27px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.journey b { display: block; font-size: 1.02rem; }
.journey p { color: var(--muted); font-size: .95rem; }


/* =====================================================================
   PAGE HERO v6 — band below the header (blog, topics, tools, quotes, contact, legal)
   ===================================================================== */
.page-hero, .tools-hero { position: relative; overflow: hidden; padding: 40px 0 38px; border-bottom: 0; background:
  radial-gradient(circle at 1px 1px, rgba(15, 23, 42, .07) 1px, transparent 0) 0 0 / 22px 22px,
  linear-gradient(120deg, #ffffff 0%, #fff7f6 55%, #fdeeed 100%); }
.page-hero::before, .tools-hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; width: auto; border-radius: 0; top: auto; right: 0; left: 0;
  background: linear-gradient(90deg, var(--brand), #f59e0b, #7c3aed, var(--brand)); background-size: 300% 100%; animation: shine 10s linear infinite; opacity: .9; }
.page-hero::after, .tools-hero::after { content: none; }
.ph-grid { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .page-hero.has-art .ph-grid, .tools-hero .ph-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; } }
.ph-text .crumbs { margin-bottom: 14px; }
.ph-text .crumbs a, .ph-text .crumbs span { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.8); border: 1px solid var(--border); }
.ph-text .crumbs i { display: none; }
.ph-text .crumbs a::after { content: none; }
.ph-text .crumbs { gap: 6px; }
.ph-text .crumbs > a + i + *, .ph-text .crumbs > * { position: relative; }
.ph-text .eyebrow { margin: 0 0 4px; }
.page-hero h1, .tools-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 12px 0 12px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 55%, var(--brand) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-hero p, .tools-hero p { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; opacity: .85; }
.page-hero .chip-row { margin-top: 24px; gap: 8px; }
.page-hero .chip-link { background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.page-hero .chip-link.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-hero .chip-link:not(.is-active):hover { border-color: var(--brand); color: var(--brand); }
.hero-author { margin-top: 22px; padding: 8px 16px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
@media (max-width: 600px) { .hero-author { border-radius: 18px; align-items: flex-start; } }
.tools-hero .tool-search { background: #fff; box-shadow: 0 10px 30px -18px rgba(15,23,42,.35); }
.tools-hero .tab:not(.is-active) { background: #fff; }

/* art: stacked covers */
.ph-art { position: relative; }
@media (max-width: 899px) { .ph-art { display: none; } }
.ph-stack { position: relative; height: 270px; }
.ph-stack img { position: absolute; width: 270px; height: 170px; object-fit: cover; border-radius: 18px; border: 5px solid #fff; box-shadow: 0 24px 50px -24px rgba(15,23,42,.45); background: #eee; }
.ph-stack .s0 { right: 0; top: 0; transform: rotate(6deg); z-index: 1; animation: phIn .9s .15s cubic-bezier(.2,.8,.2,1) both, floatY 7s 1.2s ease-in-out infinite; }
.ph-stack .s1 { right: 70px; top: 54px; transform: rotate(-5deg); z-index: 2; animation: phIn .9s .3s cubic-bezier(.2,.8,.2,1) both, floatY 7s 2.2s ease-in-out infinite; }
.ph-stack .s2 { right: 24px; top: 100px; transform: rotate(2deg); z-index: 3; animation: phIn .9s .45s cubic-bezier(.2,.8,.2,1) both, floatY 7s 3.2s ease-in-out infinite; }
.ph-badge { position: absolute; left: 0; bottom: 6px; z-index: 4; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--c); box-shadow: 0 16px 30px -12px var(--c); animation: popIn .7s .7s both, floatY 5s 1.5s ease-in-out infinite; }
@keyframes phIn { from { opacity: 0; translate: 40px 20px; } to { opacity: 1; translate: 0 0; } }

/* art: icon with orbit */
.ph-icon { --c: var(--brand); position: relative; height: 260px; display: grid; place-items: center; }
.ph-icon .big { width: 120px; height: 120px; border-radius: 36px; display: grid; place-items: center; font-size: 3rem; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #0f172a)); box-shadow: 0 30px 60px -24px var(--c); animation: spinIn .9s .1s cubic-bezier(.2,.8,.2,1) both; z-index: 1; }
.ph-icon .ring { position: absolute; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--c) 35%, transparent); }
.ph-icon .r1 { width: 210px; height: 210px; animation: spin 40s linear infinite; }
.ph-icon .r2 { width: 300px; height: 300px; opacity: .6; animation: spin 60s linear infinite reverse; }
.ph-icon .orb { position: absolute; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: var(--c); font-size: 1.2rem; box-shadow: 0 12px 26px -12px rgba(15,23,42,.35); border: 1px solid var(--border); animation: popIn .6s both, floatY 6s ease-in-out infinite; }
.ph-icon .o0 { left: 14%; top: 10%; animation-delay: .4s, 1s; }
.ph-icon .o1 { right: 10%; top: 18%; animation-delay: .55s, 2s; }
.ph-icon .o2 { right: 16%; bottom: 8%; animation-delay: .7s, 3s; }
.ph-icon .o3 { left: 10%; bottom: 14%; animation-delay: .85s, 4s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* art: tools tiles */
.tool-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transform: rotate(-4deg); }
.tool-tiles .tt { --c: var(--brand); aspect-ratio: 1; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 18px 36px -22px rgba(15,23,42,.4); display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--c); animation: popIn .6s calc(.2s + var(--d) / 4) both, floatY 6s var(--d) ease-in-out infinite; transition: transform .25s; }
.tool-tiles .tt:nth-child(even) { translate: 0 18px; }
.tool-tiles .tt i { font-size: 1.7rem; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); }
.tool-tiles .tt small { font-size: .74rem; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.2; padding: 0 6px; }
.tool-tiles .tt:hover { transform: scale(1.06) rotate(3deg); }

/* header actions on smaller screens (nav hidden) */
@media (max-width: 1099px) { .nav + .actions { margin-left: auto; } }
/* side reveals must not cause sideways scroll on phones */
html, body { overflow-x: clip; }
@media (max-width: 899px) { html.js [data-reveal="left"], html.js [data-reveal="right"] { transform: translateY(24px); } }

/* ---- page entrances (blog, articles, tools, other pages) ---- */
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); color: var(--brand); } 100% { transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.page-hero .ph-text > *, .tools-hero .ph-text > *, .post-head .wrap > *, .tool-hero .wrap > * { animation: rise .75s cubic-bezier(.2, .8, .2, 1) both; }
.page-hero .ph-text > :nth-child(2), .tools-hero .ph-text > :nth-child(2), .post-head .wrap > :nth-child(2), .tool-hero .wrap > :nth-child(2) { animation-delay: .08s; }
.page-hero .ph-text > :nth-child(3), .tools-hero .ph-text > :nth-child(3), .post-head .wrap > :nth-child(3), .tool-hero .wrap > :nth-child(3) { animation-delay: .16s; }
.page-hero .ph-text > :nth-child(4), .tools-hero .ph-text > :nth-child(4), .post-head .wrap > :nth-child(4), .tool-hero .wrap > :nth-child(4) { animation-delay: .24s; }
.page-hero .ph-text > :nth-child(5), .tools-hero .ph-text > :nth-child(5), .post-head .wrap > :nth-child(5) { animation-delay: .32s; }
.page-hero .ph-text > :nth-child(6), .tools-hero .ph-text > :nth-child(6), .post-head .wrap > :nth-child(6) { animation-delay: .4s; }
.page-hero .ph-text > :nth-child(7), .tools-hero .ph-text > :nth-child(7) { animation-delay: .48s; }
.page-hero .chip-link, .tools-hero .tab { animation: popIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.page-hero .chip-link:nth-child(2), .tools-hero .tab:nth-child(2) { animation-delay: .35s; }
.page-hero .chip-link:nth-child(3), .tools-hero .tab:nth-child(3) { animation-delay: .42s; }
.page-hero .chip-link:nth-child(4), .tools-hero .tab:nth-child(4) { animation-delay: .49s; }
.page-hero .chip-link:nth-child(5), .tools-hero .tab:nth-child(5) { animation-delay: .56s; }
.page-hero .chip-link:nth-child(6) { animation-delay: .63s; }
.page-hero .chip-link { transition: transform .2s, background .2s, color .2s; }
.page-hero .chip-link:hover { transform: translateY(-2px); }
.post-cover { animation: zoomIn 1s .3s cubic-bezier(.2, .8, .2, 1) both; }
.post-cover img { transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.post-cover:hover img { transform: scale(1.02); }
.tool-hero .th-icon { animation: spinIn .8s .1s cubic-bezier(.2, .8, .2, 1) both; }
.tool-hero .th-icon:hover i { animation: wobble .5s ease; }
.th-chips span { animation: popIn .5s both; }
.th-chips span:nth-child(1) { animation-delay: .35s; } .th-chips span:nth-child(2) { animation-delay: .45s; } .th-chips span:nth-child(3) { animation-delay: .55s; }
.tool-shell { animation: rise .8s .2s cubic-bezier(.2, .8, .2, 1) both; }
.out-main b.bump { display: inline-block; animation: bump .45s ease; }
.card .thumb img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.card:hover .thumb img { transform: scale(1.06); }
.tool-card .ic, .tool-card > i { transition: transform .3s; }
.tool-card:hover .ic { transform: rotate(-8deg) scale(1.1); }
.c-card .ic { transition: transform .3s; }
.c-card:hover .ic { transform: rotate(-10deg) scale(1.1); }
.mini img, .row-card img { transition: transform .4s; }
.mini:hover img, .row-card:hover img { transform: scale(1.08); }
html.js .prose[data-article] > [data-reveal] { transform: translateY(16px); transition-duration: .6s; }
.byline img, .author-box img { transition: transform .3s; }
.author-box:hover img { transform: rotate(-6deg) scale(1.06); }
.center-msg .big { animation: floatY 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .signature text { stroke-dashoffset: 0; fill: var(--ink); }
}
@media (max-width: 899px) { .tools-hero .ph-art.tool-tiles { display: none; } }
.ph-grid > .ph-text { min-width: 0; }

/* ---- home: explore cards (replaces the 4 plain tiles) ---- */
.explore { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .explore { grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 18px; } }
.ex { --c: var(--brand); position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 230px; padding: 18px; border-radius: 24px; overflow: hidden; color: #fff; isolation: isolate; box-shadow: 0 18px 40px -26px rgba(15, 23, 42, .55); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
@media (max-width: 640px) { .ex { min-height: 180px; padding: 14px; border-radius: 20px; } }
.ex:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -24px color-mix(in srgb, var(--c) 70%, #000); }
.ex-bg { position: absolute; inset: 0; z-index: -2; background: #111; }
.ex-bg img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.ex:hover .ex-bg img { transform: scale(1.08); }
.ex::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 40%, color-mix(in srgb, var(--c) 55%, #000) 100%); }
.ex-about .ex-bg img { object-position: 50% 25%; filter: grayscale(1) contrast(1.05); }
.ex-quotes .ex-bg img { filter: saturate(1.1); }
.ex-pattern { display: grid; grid-template-columns: repeat(3, 1fr); place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, #34d399, #0e9f6e 45%, #065f46); }
.ex-pattern i { font-size: 1.5rem; color: rgba(255,255,255,.35); animation: floatY 5s ease-in-out infinite; }
.ex-pattern i:nth-child(3n+2) { animation-delay: -1.6s; } .ex-pattern i:nth-child(3n) { animation-delay: -3.2s; }
.ex-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ex-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .3s; }
.ex:hover .ex-ic { transform: rotate(-10deg) scale(1.08); }
.ex-count { font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.ex-txt b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.ex-txt small { display: block; font-size: .88rem; opacity: .9; margin-top: 2px; padding-right: 44px; }
@media (max-width: 640px) { .ex-txt b { font-size: 1.1rem; } .ex-txt small { font-size: .78rem; padding-right: 0; } .ex-count { display: none; } }
.ex-go { position: absolute; right: 16px; bottom: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--c); font-size: .9rem; transform: translateX(-6px); opacity: .9; transition: transform .3s, opacity .3s; }
.ex:hover .ex-go { transform: none; opacity: 1; }
@media (max-width: 640px) { .ex-go { display: none; } }

.ex-fan { background: radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000)); }
.ex-fan img { position: absolute; width: 58%; height: auto; aspect-ratio: 16/9; border-radius: 12px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 14px 30px -12px rgba(0,0,0,.55); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.ex-fan img:nth-child(1) { right: -8%; top: 14%; transform: rotate(10deg); }
.ex-fan img:nth-child(2) { right: 14%; top: 22%; transform: rotate(-6deg); }
.ex-fan img:nth-child(3) { right: 2%; top: 34%; transform: rotate(3deg); }
.ex-fan.sq img { width: 40%; aspect-ratio: 1; }
.ex-fan.sq img:nth-child(1) { right: -4%; top: 10%; }
.ex-fan.sq img:nth-child(2) { right: 24%; top: 14%; }
.ex-fan.sq img:nth-child(3) { right: 8%; top: 26%; }
.ex:hover .ex-fan img { transform: rotate(0) translateY(-6px) scale(1.03); }
.ex:hover .ex-fan img:nth-child(2) { transform: rotate(-12deg) translate(-10px,-4px); }
.ex:hover .ex-fan img:nth-child(1) { transform: rotate(14deg) translate(8px,-6px); }
.ex-blog::after, .ex-quotes::after { background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--c) 70%, #000) 88%); }
.ex-blog .ex-top, .ex-quotes .ex-top { position: relative; }
@media (max-width: 640px) { .ex { min-height: 196px; } .ex-fan img { width: 54%; } .ex-fan.sq img { width: 36%; } .ex-fan img:nth-child(1) { top: 6%; } .ex-fan img:nth-child(2) { top: 10%; } .ex-fan img:nth-child(3) { top: 17%; } .ex-blog .ex-ic, .ex-quotes .ex-ic { position: relative; z-index: 1; } }

/* ---- home: magazine bento (below hero) ---- */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bento { grid-template-columns: 1fr 1fr; } .bn-big { grid-column: span 2; } .bn-about { grid-column: span 2; } }
@media (min-width: 1000px) { .bento { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 178px 178px; } .bn-big { grid-column: auto; grid-row: span 2; } .bn-about { grid-column: span 2; } }
.bn { position: relative; isolation: isolate; border-radius: 24px; overflow: hidden; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; color: #fff; box-shadow: 0 18px 40px -26px rgba(15,23,42,.5); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; min-height: 170px; }
.bn:hover { transform: translateY(-5px); box-shadow: 0 28px 50px -26px rgba(15,23,42,.6); }
.bn .k { display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.bn b { font-size: 1.2rem; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.bn-big { min-height: 300px; padding: 26px; }
.bn-big .bgi { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.bn-big:hover .bgi { transform: scale(1.06); }
.bn-big::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 15%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.88)); }
.bn-big b { font-size: clamp(1.35rem, 2.6vw, 1.85rem); max-width: 24ch; text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.bn-big .tag { position: absolute; top: 20px; left: 20px; display: inline-flex; gap: 7px; align-items: center; background: var(--brand); padding: 7px 13px; border-radius: 999px; font-size: .78rem; font-weight: 700; box-shadow: 0 8px 20px -8px rgba(207,39,30,.8); animation: popIn .6s .5s both; }
.bn-big .read { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; font-size: .92rem; width: max-content; padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, gap .2s; }
.bn-big:hover .read { background: #fff; color: var(--ink); gap: 12px; }
.bn-quote { background: radial-gradient(circle at 85% 0%, #a78bfa, #7c3aed 40%, #4c1d95); justify-content: space-between; }
.bn-quote::before { content: "“"; position: absolute; right: 14px; top: -24px; font-family: var(--serif); font-size: 9rem; line-height: 1; opacity: .15; }
.bn-quote p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bn-quote .more i, .bn-tools b i { transition: transform .2s; }
.bn-quote:hover .more i, .bn-tools:hover b i { transform: translateX(4px); }
.bn-tools { background: #fff; color: var(--ink); border: 1px solid var(--border); justify-content: space-between; }
.bn-tools .k { color: var(--muted); }
.bn-tools .mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bn-tools .mini span { aspect-ratio: 1; max-height: 58px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); transition: transform .3s; }
.bn-tools:hover .mini span { transform: translateY(-4px); }
.bn-tools:hover .mini span:nth-child(2) { transition-delay: .05s; } .bn-tools:hover .mini span:nth-child(3) { transition-delay: .1s; } .bn-tools:hover .mini span:nth-child(4) { transition-delay: .15s; }
.bn-tools b { font-size: 1.08rem; }
.bn-about { flex-direction: row; align-items: center; justify-content: flex-start; gap: 20px; background: linear-gradient(110deg, #0b0b0c 40%, #1e293b); }
.bn-about img { width: 112px; height: 138px; flex: none; object-fit: cover; object-position: 40% 25%; border-radius: 16px; filter: grayscale(1); transition: filter .5s, transform .5s; }
.bn-about:hover img { filter: none; transform: rotate(-3deg) scale(1.04); }
.bn-about b { display: block; margin: 4px 0 6px; font-size: 1.25rem; }
.bn-about .sub { font-size: .85rem; opacity: .7; }
.bn-about .go { margin-left: auto; width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transition: transform .25s; }
.bn-about:hover .go { transform: translateX(4px); }
@media (max-width: 480px) { .bn-about img { width: 86px; height: 108px; } .bn-about b { font-size: 1.05rem; } .bn-about .go { display: none; } }
@media (max-width: 480px) { .bn-about b br { display: none; } }

/* ---- tags ---- */
.post-tags, .tag-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.post-tags > span, .tag-line > span { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.post-tags a, .tag-line a { font-size: .86rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand); transition: background .2s, color .2s, transform .2s; }
.post-tags a:hover, .tag-line a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.tag-line { margin-top: 16px; }
.tag-line a { background: #fff; border: 1px solid var(--border); color: var(--ink-2); }
.tag-line a.all { border-color: transparent; background: transparent; color: var(--brand); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); }
.tag-cloud .tc { --w: 1; display: inline-flex; align-items: center; gap: 8px; font-size: calc(.86rem * var(--w)); font-weight: 700; padding: .45em .9em; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--ink-2); transition: .2s; }
.tag-cloud .tc span { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 1px 7px; }
.tag-cloud .tc:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.tag-cloud .tc:hover span { background: rgba(255,255,255,.2); color: #fff; }
.tc-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-mini a { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.tc-mini a:hover { color: var(--brand); border-color: var(--brand); }

/* ---- About: tighter layout ---- */
.about-hero { padding-top: 36px; padding-bottom: 8px; }
.about-hero + .section { padding-top: 24px; }
.story-photo img { aspect-ratio: 4/5; }
.with-side .story-photo { margin-bottom: 0; }
.quote-band { position: relative; margin: 8px 0 0; padding: 40px clamp(22px, 5vw, 64px); border-radius: 28px; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 90% 0%, rgba(255,255,255,.12), transparent 40%), linear-gradient(120deg, #7f1d1d, var(--brand) 55%, #f59e0b); box-shadow: 0 30px 60px -36px rgba(207,39,30,.8); }
.quote-band > i { position: absolute; right: 30px; top: 18px; font-size: 6rem; opacity: .14; }
.quote-band p { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.45; max-width: 46ch; }
.quote-band footer { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.quote-band footer img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.8); object-fit: cover; }
.quote-band footer b { display: block; } .quote-band footer small { opacity: .8; font-size: .85rem; }
@media (min-width: 900px) {
  .journey.jh { grid-template-columns: repeat(5, 1fr); gap: 16px; padding-left: 0; padding-top: 30px; }
  .journey.jh::before { left: 10px; right: 10px; top: 8px; bottom: auto; width: auto; height: 2px; }
  .journey.jh .line-fill { left: 10px; top: 8px; height: 2px; width: 0; transition: width 1.6s ease; }
  .journey.jh.in .line-fill { height: 2px; width: calc(100% - 20px); }
  .journey.jh li { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .25s, box-shadow .25s; }
  .journey.jh li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .journey.jh li::before { left: 18px; top: -29px; }
}

/* ---- home: newsletter band with photo ---- */
.band-photo { padding-top: 30px; padding-bottom: 30px; }
@media (min-width: 860px) { .band-photo { grid-template-columns: 170px 1fr auto; gap: 36px; padding: 30px 44px 30px 34px; } }
.band-pic { position: relative; width: 150px; height: 170px; z-index: 1; }
@media (min-width: 860px) { .band-pic { width: 170px; height: 196px; } }
.band-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; border-radius: 22px; border: 4px solid rgba(255,255,255,.9); box-shadow: 0 20px 40px -18px rgba(0,0,0,.7); transform: rotate(-3deg); transition: transform .4s; }
.band-photo:hover .band-pic img { transform: rotate(0) scale(1.03); }
.band-pic .ring { position: absolute; inset: -10px; border-radius: 28px; border: 2px dashed rgba(255,255,255,.25); animation: spin 30s linear infinite; }
.band-live { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #16a34a; color: #fff; font-size: .74rem; font-weight: 700; box-shadow: 0 8px 18px -8px rgba(22,163,74,.9); animation: floatY 4s ease-in-out infinite; }
.band-k { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fca5a5; margin-bottom: 6px; }
.band-photo > div:nth-child(2) { position: relative; z-index: 1; }

.tools-hero .tabs { flex-wrap: wrap; overflow: visible; }
@media (max-width: 640px) { .tools-hero .tabs { flex-wrap: nowrap; overflow-x: auto; } }

/* ---- Books ---- */
.book3d { --b1: #1e1b4b; --b2: #0f766e; --ba: #fbbf24; position: relative; width: 180px; aspect-ratio: 2/3; perspective: 900px; flex: none; }
.book3d.lg { width: 220px; }
.bk-front { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 14px 14px; border-radius: 4px 12px 12px 4px; color: #fff;
  background: radial-gradient(circle at 70% 18%, rgba(255,255,255,.22), transparent 38%), linear-gradient(160deg, var(--b1), var(--b2));
  box-shadow: inset 6px 0 0 rgba(0,0,0,.28), inset 9px 0 0 rgba(255,255,255,.12), 0 24px 40px -18px rgba(0,0,0,.55); transform: rotateY(-18deg); transform-origin: left center; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.bk-front::after { content: ""; position: absolute; inset: 8px 8px 8px 14px; border: 1px solid color-mix(in srgb, var(--ba) 55%, transparent); border-radius: 2px 8px 8px 2px; pointer-events: none; }
.bk-pages { position: absolute; z-index: 1; top: 4px; bottom: 4px; right: -8px; width: 16px; border-radius: 0 6px 6px 0; background: repeating-linear-gradient(90deg, #f8fafc 0 2px, #e2e8f0 2px 3px); transform: rotateY(-18deg); transform-origin: left center; }
.book3d:hover .bk-front, .book-card:hover .bk-front { transform: rotateY(-4deg); }
.bk-genre { font-size: .6rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--ba); }
.bk-ic { font-size: 2.6rem; margin: auto 0 10px; color: var(--ba); filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
.bk-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; }
.bk-sub { font-size: .66rem; opacity: .8; margin-top: 6px; }
.bk-author { margin-top: auto; padding-top: 12px; font-size: .58rem; letter-spacing: .14em; font-weight: 700; opacity: .9; }
.book3d.lg .bk-title { font-size: 1.55rem; }
.book-list { display: grid; gap: 20px; }
@media (min-width: 1000px) { .books-sec .book-list { grid-template-columns: 1fr 1fr; } }
.book-card { position: relative; display: grid; gap: 22px; padding: 26px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.book-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 230px; background: linear-gradient(160deg, color-mix(in srgb, var(--b1) 14%, #fff), color-mix(in srgb, var(--b2) 18%, #fff)); }
@media (max-width: 639px) { .book-card::before { width: auto; right: 0; bottom: auto; height: 250px; } }
@media (min-width: 640px) { .book-card { grid-template-columns: 200px 1fr; align-items: start; } }
.bc-cover { position: relative; display: grid; place-items: center; padding: 6px 0; }
.bc-body { position: relative; }
.bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.live { background: #dcfce7; color: #166534; }
.pill.live .dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; animation: blink 1.4s ease-in-out infinite; }
.book-card h3 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; }
.bc-sub { color: var(--brand); font-weight: 600; margin: 2px 0 10px; }
.book-card p { color: var(--ink-2); line-height: 1.65; }
.bc-themes { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.bc-themes li { display: flex; gap: 10px; align-items: baseline; font-size: .94rem; }
.bc-themes i { color: #16a34a; font-size: .8rem; }
.bc-teaser { margin: 16px 0; padding: 18px 20px; border-left: 4px solid var(--b2); border-radius: 0 14px 14px 0; background: var(--bg); font-family: var(--serif); font-style: italic; color: var(--ink-2); line-height: 1.7; }
.bc-teaser span { display: block; font-family: var(--font); font-style: normal; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.bc-for { display: flex; gap: 8px; align-items: baseline; font-size: .88rem; color: var(--muted) !important; margin-bottom: 14px; }
.ph-books { position: relative; height: 290px; }
.ph-books .book3d { position: absolute; width: 170px; }
.ph-books .book3d:nth-child(1) { left: 30px; top: 10px; transform: rotate(-6deg); animation: floatY 6s ease-in-out infinite; }
.ph-books .book3d:nth-child(2) { right: 20px; top: 30px; transform: rotate(5deg); animation: floatY 6s -3s ease-in-out infinite; }

/* ---- About: Projects & communities v2 ---- */
.proj-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .proj-grid { grid-template-columns: 1fr 1fr; } }
.proj { --pc: var(--brand); position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 18px; align-items: center; padding: 18px 20px 18px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.proj::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--pc); }
.proj:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px color-mix(in srgb, var(--pc) 70%, #000); border-color: color-mix(in srgb, var(--pc) 35%, var(--border)); }
.proj-logo { width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--pc) 10%, #fff); border: 1px solid color-mix(in srgb, var(--pc) 20%, transparent); }
.proj-logo img { max-width: 60px; max-height: 60px; object-fit: contain; transition: transform .35s; }
.proj:hover .proj-logo img { transform: scale(1.1) rotate(-4deg); }
.proj-kind { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--pc); margin-bottom: 2px; }
.proj-body b { display: block; font-size: 1.12rem; }
.proj-body p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 4px 0 10px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-links a { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--ink-2); transition: .2s; }
.proj-links a:hover { background: var(--pc); border-color: var(--pc); color: #fff; }
.proj-num { position: absolute; right: 16px; top: 10px; font-size: 2.2rem; font-weight: 800; color: color-mix(in srgb, var(--pc) 12%, transparent); letter-spacing: -.04em; }
@media (max-width: 420px) { .proj { grid-template-columns: 64px 1fr; } .proj-logo { width: 64px; height: 64px; } .proj-logo img { max-width: 46px; max-height: 46px; } }

/* blog dropdown: two columns now there are many topics */
@media (min-width: 1100px) { .dd-menu { grid-auto-flow: row; } .nav .dd:first-of-type .dd-menu { grid-template-columns: 1fr 1fr; min-width: 440px; } }

/* ---- real book covers ---- */
.book3d.img { width: 190px; aspect-ratio: 2/3; }
.book3d .bk-img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; border-radius: 3px 10px 10px 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), 0 26px 44px -18px rgba(0,0,0,.6); transform: rotateY(-16deg); transform-origin: left center; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.book3d.img::after { content: ""; position: absolute; z-index: 3; left: 0; top: 0; bottom: 0; width: 10px; border-radius: 3px 0 0 3px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.15) 60%, transparent); transform: rotateY(-16deg); transform-origin: left center; pointer-events: none; }
.book3d.img:hover .bk-img, .book-card:hover .book3d .bk-img, .book-card:hover .book3d.img::after { transform: rotateY(-3deg); }
@media (min-width: 640px) { .book-card { grid-template-columns: 210px 1fr; } }
.bc-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.bc-facts span { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; padding: 7px 12px; border-radius: 12px; background: color-mix(in srgb, var(--b2) 9%, #fff); color: var(--b1); border: 1px solid color-mix(in srgb, var(--b2) 22%, transparent); }
.bc-facts i { color: var(--b2); }
.ph-books .book3d.img { width: 165px; }
.book-card.compact { padding: 22px; }
@media (min-width: 640px) { .book-card.compact { grid-template-columns: 160px 1fr; gap: 22px; } .book-card.compact::before { width: 182px; } }
.book-card.compact .book3d.img { width: 150px; }
.book-card.compact h3 { font-size: 1.35rem; }
.book-card.compact .bc-body > p:not(.bc-sub):not(.bc-for) { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: .94rem; }
.book-card.compact .bc-for { display: none; }
.book-card.compact .bc-facts span { font-size: .76rem; padding: 5px 10px; }
.book-card.compact .btns { gap: 8px; }

/* ---- SEO/GEO helpers: TL;DR, table of contents, related tools ---- */
.tldr { margin: 0 0 18px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, var(--brand-50), #fff); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--border)); }
.tldr b { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.tldr p { margin-top: 6px; font-size: 1.04rem; line-height: 1.6; color: var(--ink); }
.toc { margin: 0 0 26px; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.toc b { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; columns: 1; }
@media (min-width: 700px) { .toc ol { display: block; columns: 2; column-gap: 28px; } .toc li { break-inside: avoid; margin-bottom: 6px; } }
.toc a { color: var(--ink-2); font-size: .92rem; } .toc a:hover { color: var(--brand); }
.prose h2[id] { scroll-margin-top: 90px; }
.tool-mini { --c: var(--brand); }
.tool-mini .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.tool-about { margin-top: 20px; }
.tool-about p { color: var(--ink-2); line-height: 1.65; margin-top: 8px; }

/* ---- contact honeypot + cookie consent ---- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 620px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-radius: 18px; background: #0f172a; color: #e2e8f0; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); transform: translateY(140%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.consent.show { transform: none; }
.consent p { flex: 1 1 300px; font-size: .9rem; line-height: 1.5; }
.consent p i { color: #fbbf24; margin-right: 8px; }
.consent a { color: #fca5a5; text-decoration: underline; }
.consent-btns { display: flex; gap: 8px; }
.consent .btn-ghost { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,.25); }

/* ---- language switch + Tamil typography ---- */
.lang-sw { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: .88rem; white-space: nowrap; transition: .2s; }
.lang-sw:hover { border-color: var(--brand); color: var(--brand); }
.lang-sw i { color: var(--brand); }
@media (max-width: 420px) { .lang-sw { padding: 0 9px; } .lang-sw i { display: none; } }
html[lang="ta"] body { font-family: "Noto Sans Tamil", var(--font); }
html[lang="ta"] h1, html[lang="ta"] h2, html[lang="ta"] h3 { letter-spacing: 0; line-height: 1.3; }
html[lang="ta"] .prose { line-height: 1.95; font-size: 1.04rem; }
html[lang="ta"] .page-hero h1, html[lang="ta"] .tools-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.25; }
html[lang="ta"] .hero h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.25; }
html[lang="ta"] .nav a, html[lang="ta"] .nav button { font-size: .9rem; }
html[lang="ta"] .btn { white-space: normal; text-align: center; }
/* Tamil header: longer words need more room — keep the full nav for ≥1320px, burger below */
html[lang="ta"] .cta { white-space: nowrap; }
html[lang="ta"] .logo span { white-space: nowrap; }
@media (min-width: 1100px) and (max-width: 1319px) {
  html[lang="ta"] .nav { display: none; }
  html[lang="ta"] .burger { display: inline-grid; }
  html[lang="ta"] .nav + .actions { margin-left: auto; }
}
@media (min-width: 1100px) and (max-width: 1439px) { html[lang="ta"] .search-btn .lbl { display: none; } }
