:root { --sans: "Plus Jakarta Sans", "IBM Plex Sans Thai", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace; }
:root, :root[data-theme="dark"] {
  --bg: #111213;
  --bg-2: #0d0e0f;
  --surface: #18191b;
  --surface-2: #1e2022;
  --border: #26282b;
  --border-2: #3a3d41;
  --text: #ececea;
  --text-2: #b9bbbd;
  --muted: #7f8286;
  --accent: #d4f53c;
  --accent-ink: #111213;
  --accent-text: #d4f53c;
  --mt-top: #3a3c3f;
  --hero-fade: #111213;
}
:root[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-2: #ebebe7;
  --surface: #ffffff;
  --surface-2: #f7f7f4;
  --border: #e2e2dd;
  --border-2: #cfcfc9;
  --text: #151617;
  --text-2: #45474a;
  --muted: #7a7c80;
  --accent: #c6ea1f;
  --accent-ink: #111213;
  --accent-text: #5c7300;
  --mt-top: #c9cac5;
  --hero-fade: #f4f4f1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; margin: 0; }
b { font-weight: 700; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.accent { color: var(--accent-text); }
.dim { color: var(--text-2); font-weight: 400; }
.muted { color: var(--muted); }
.hand { font-family: "Caveat", cursive; color: var(--text-2); line-height: 1; }
.kicker { color: var(--muted); font-size: 13px; letter-spacing: .04em; margin: 0 0 10px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 88px; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.logo .accent { font-weight: 400; font-size: .8em; margin-left: 10px; }
.logo.small { font-size: 17px; }
.main-nav { display: flex; gap: 32px; margin-left: auto; margin-right: auto; font: 500 13px var(--sans); }
.main-nav a { color: var(--text-2); transition: color .15s; }
.main-nav a:hover { color: var(--text); }
.search { position: relative; }
.search input {
  width: 214px; height: 34px; padding: 0 34px 0 12px; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  font: 12px var(--sans); outline: none; transition: border-color .15s;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; right: 10px; top: 9px; color: var(--muted); pointer-events: none; }
.tagline { display: flex; align-items: center; gap: 20px; padding-left: 28px; border-left: 1px solid var(--border); font-size: 12px; line-height: 1.35; color: var(--text-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* Hero */
.hero { position: relative; min-height: 380px; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero-media {
  position: absolute; inset: 0 0 0 48%; background: center/cover no-repeat;
  filter: grayscale(1) contrast(1.05);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.hero-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--hero-fade) 0%, transparent 30%); }
.hero-media.no-image { background: radial-gradient(ellipse at 60% 40%, var(--surface-2), var(--bg) 70%); }
.hero-note { position: absolute; right: 44px; top: 48px; font-size: 30px; transform: rotate(-12deg); text-align: left; }
.hero-content { position: relative; padding-top: 52px; padding-bottom: 60px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 42px); line-height: 1.3; letter-spacing: .02em; }
.cursor { display: inline-block; width: .55em; height: 4px; background: var(--accent); margin-left: 6px; vertical-align: baseline; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--text-2); font-size: 14px; margin: 24px 0 28px; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 22px; height: 44px; padding: 0 24px; border-radius: 3px; font-size: 13px; font-weight: 500; transition: transform .15s, background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost { border: 1px solid var(--border-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }

/* Tools */
.tools { padding: 44px 0 20px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: 30px; letter-spacing: .02em; }
.section-head h2 b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.sub { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.filters { display: flex; gap: 22px; font: 13px var(--sans); }
.filters button { background: none; border: 0; padding: 0 0 6px; color: var(--text-2); cursor: pointer; font: inherit; border-bottom: 2px solid transparent; }
.filters button:hover { color: var(--text); }
.filters button.active { color: var(--accent-text); border-bottom-color: var(--accent-text); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .18s, border-color .18s, background .18s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--surface-2); }
.card-icon { width: 36px; height: 36px; border-radius: 5px; display: grid; place-items: center; color: #151617; flex: none; transition: transform .2s; }
.card-icon.big { width: 56px; height: 56px; border-radius: 8px; }
.card h3 { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; letter-spacing: .03em; }
.card .arrow { color: var(--text-2); transition: transform .18s, color .18s; display: flex; }
.card:hover .arrow { transform: translateX(3px); color: var(--accent-text); }
.card p { margin: 6px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tags span { font-size: 11px; padding: 2px 12px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Quote */
.quote-band { position: relative; padding: 48px 0 70px; overflow: hidden; }
.mountains { position: absolute; left: 25%; right: 0; bottom: 0; width: 75%; height: 170px; }
.quote-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-end; }
blockquote { margin: 0; padding-left: 30px; border-left: 3px solid var(--accent); color: var(--text-2); }
blockquote p { margin: 0; font-size: 17px; line-height: 1.5; letter-spacing: .03em; }
blockquote b { font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
blockquote .q { color: var(--muted); font-size: 16px; line-height: 1; display: block; }
blockquote cite { display: block; margin-top: 12px; font-style: normal; font-size: 11px; color: var(--muted); }
.quote-note { font-size: 36px; transform: rotate(-8deg); text-align: right; position: relative; }
.quote-note i { display: block; width: 18px; height: 3px; background: var(--accent); margin: 8px 0 0 auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; height: 68px; gap: 20px; font: 12px var(--sans); color: var(--text-2); }
.footer-left, .footer-right { display: flex; align-items: center; gap: 16px; }
.footer-left a:not(.logo):hover, .footer-right a:hover { color: var(--text); }
.footer-left .logo { color: var(--text); margin-right: 10px; font-family: var(--mono); }
.sep { color: var(--border-2); }
.theme-toggle { background: none; border: 0; color: var(--text-2); cursor: pointer; margin-left: 12px; display: flex; padding: 4px; }
.theme-toggle:hover { color: var(--accent-text); }
[data-theme="dark"] .i-sun, [data-theme="light"] .i-moon { display: none; }

/* Inner pages */
.page { padding: 48px 0 80px; min-height: 60vh; }
.page h1 { font-size: 32px; }
.back { color: var(--muted); font-size: 12px; display: inline-block; margin-bottom: 28px; }
.back:hover { color: var(--accent-text); }
.page-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 36px; }
.tool-body { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 28px; color: var(--text-2); }
.prose { margin-top: 28px; }
.tool-body input, .tool-body textarea, .tool-body select, .tool-body button { font: inherit; }

/* Responsive */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tagline { display: none; }
  .main-nav { gap: 20px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-inner { height: auto; flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .main-nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .search { margin-left: auto; }
  .theme-toggle.header-toggle { width: 34px; }
  .search input { width: 150px; }
  .hero-media { inset: 0; opacity: .35; }
  .hero-note { display: none; }
  .grid { grid-template-columns: 1fr; }
  .filters { overflow-x: auto; width: 100%; }
  .quote-inner { flex-direction: column; align-items: flex-start; gap: 30px; }
  .quote-note { align-self: flex-end; }
  .mountains { left: 0; width: 100%; }
  .footer-inner { flex-direction: column; height: auto; padding: 18px 16px; }
}

/* Tool detail page */
.detail { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.detail .page-head { margin-bottom: 28px; }
.detail .lead { margin: 12px 0 0; }
.prose { color: var(--text-2); font-size: 14px; line-height: 1.85; border-top: 1px solid var(--border); padding-top: 28px; }
.prose > :first-child { margin-top: 0; }
.prose h3 { color: var(--text); font-size: 17px; font-weight: 500; margin: 30px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent-text); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; font-size: 12px; }
.prose img { max-width: 100%; border-radius: 6px; }
.detail-side { position: sticky; top: 110px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 22px; }
.btn-block { width: 100%; justify-content: center; height: 50px; font-size: 14px; }
.mobile-open { display: none; }
.btn.disabled { opacity: .5; cursor: default; }
.side-url { margin: 10px 0 0; font-size: 11px; color: var(--muted); text-align: center; word-break: break-all; }
.side-card dl { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; }
.side-card dt { color: var(--muted); margin-bottom: 4px; }
.side-card dd { margin: 0 0 14px; color: var(--text-2); }
.side-card dd:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 28px; }
  .detail-side { position: static; }
  .mobile-open { display: flex; margin-bottom: 28px; }
  .detail .page-head { flex-direction: column; gap: 14px; }
}

/* /<slug>/ — tool wrapped with a slim site bar */
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-top { flex: none; display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 20px; background: var(--bg-2); border-bottom: 1px solid var(--border); font: 13px var(--sans); }
.app-top .logo { font-family: "JetBrains Mono", monospace; font-size: 16px; }
.app-top .logo .accent { margin-left: 6px; }
.app-sep { width: 1px; height: 22px; background: var(--border-2); }
.app-back { color: var(--text-2); padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border-2); line-height: 1; transition: .15s; white-space: nowrap; }
.app-back:hover { color: var(--accent-text); border-color: var(--accent); }
.app-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-title .card-icon { width: 24px; height: 24px; margin: 0; border-radius: 4px; }
.app-name { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.app-actions a { color: var(--text-2); white-space: nowrap; }
.app-actions a:hover, .app-actions button:hover { color: var(--accent-text); }
.app-actions button { background: none; border: 1px solid var(--border-2); border-radius: 4px; color: var(--text-2); cursor: pointer; padding: 5px 7px; display: flex; }
.app-shell iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }
@media (max-width: 720px) {
  .app-top { gap: 10px; padding: 0 12px; }
  .app-top .logo .dim, .app-top .logo .accent, .app-sep, .app-back span, .hide-sm { display: none; }
}

/* Theme toggle in header */
.theme-toggle.header-toggle { margin: 0; width: 34px; height: 34px; justify-content: center; align-items: center; border: 1px solid var(--border-2); border-radius: 4px; background: var(--surface); }
.theme-toggle.header-toggle:hover { border-color: var(--accent); }
.app-actions .theme-toggle { margin: 0; }
html { transition: background-color .2s; }
body, .site-header, .card, .site-footer, .app-top { transition: background-color .2s, border-color .2s, color .2s; }

/* ===== Design pass 2 ===== */
:root, :root[data-theme="dark"] { --glow: rgba(212, 245, 60, .10); --grain: .045; --term-bg: #0c0d0e; }
:root[data-theme="light"] { --glow: rgba(120, 150, 0, .10); --grain: .03; --term-bg: #ffffff; }

/* film grain over everything, very subtle */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 3px; }

.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5); }
.main-nav a { position: relative; }
.main-nav a.active { color: var(--text); }
.main-nav a.active::after, .main-nav a:hover::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); }

/* hero */
.hero { min-height: 440px; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--border-2) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 75% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 80% at 75% 45%, #000 20%, transparent 75%); opacity: .7;
}
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: 8%; top: -140px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.hero-visual { position: absolute; inset: 0 0 0 50%; display: flex; align-items: center; padding-left: 4%; }
.term {
  width: min(400px, 90%); background: var(--term-bg); border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), 0 0 0 1px var(--border); transform: rotate(-1.5deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: rotate(-1.5deg) translateY(-8px); } }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); }
.term-bar i:first-child { background: var(--accent); }
.term-bar span { margin-left: 10px; font-size: 11px; color: var(--muted); }
.term-body { padding: 16px 18px 18px; font-size: 12.5px; line-height: 1.9; color: var(--text-2); }
.term-body p { margin: 0; }
.term-body .p { color: var(--accent-text); margin-right: 6px; }
.term-body ul { list-style: none; margin: 2px 0 10px; padding: 0 0 0 16px; }
.term-body li { display: flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-body li.more { color: var(--muted); }
.term-body .sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.term-body .out { color: var(--muted); padding-left: 16px; margin-bottom: 10px; }
.term-body .cursor { height: 13px; width: 8px; vertical-align: -2px; margin: 0; }
.hero-note { z-index: 2; }
.hero-visual ~ .hero-note { top: auto; bottom: 42px; right: 48px; font-size: 32px; }
.hero-content { padding-bottom: 56px; }
.stats { display: flex; gap: 40px; margin: 44px 0 0; padding-top: 22px; border-top: 1px dashed var(--border-2); width: fit-content; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 0; font-size: 22px; color: var(--text); font-weight: 500; }

/* tools */
.kicker .count { color: var(--accent-text); margin-left: 4px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.card-num { font-size: 11px; color: var(--muted); letter-spacing: .05em; transition: color .2s; }
.card { position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover::before { opacity: 1; }
.card:hover { box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6); }
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card:hover .card-num { color: var(--accent-text); }
.js .reveal:not(.in) { opacity: 0; }
.reveal.in { animation: rise .55s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.filters button { transition: color .15s, border-color .15s; }

/* detail: related */
.related { margin-top: 72px; padding-top: 36px; border-top: 1px solid var(--border); }
.related .kicker { margin-bottom: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.site-footer .copy { color: var(--muted); margin-right: 8px; }

@media (max-width: 1100px) { .hero-visual ~ .hero-note { display: none; } }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) {
  .hero-visual, .hero::before { display: none; }
  .hero-grid { -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 30%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 90% 70% at 70% 30%, #000 10%, transparent 70%); }
  .stats { gap: 28px; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.card-soon { align-items: center; justify-content: center; text-align: center; background: transparent; border: 1px dashed var(--border-2); min-height: 170px; }
.card-soon:hover { transform: none; background: transparent; box-shadow: none; border-color: var(--border-2); }
.card-soon::before { display: none; }
.soon-plus { width: 36px; height: 36px; border-radius: 50%; border: 1px dashed var(--border-2); display: grid; place-items: center; color: var(--muted); font-size: 18px; margin-bottom: 10px; }
.card-soon p { margin: 0; }
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; }
  .logo { font-size: 19px; }
  .logo .accent { margin-left: 6px; }
  .search { flex: 1; min-width: 0; margin-left: 4px; }
  .search input { width: 100%; }
  .main-nav { padding-top: 2px; }
  .hero-content { padding-top: 36px; }
  .hero h1 .cursor { vertical-align: 0; }
}
.about-body { margin-top: 32px; }

/* Feedback form (about page) */
.feedback { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--border); scroll-margin-top: 110px; }
.feedback h2 { font-size: 24px; }
.fb-form { margin-top: 24px; display: grid; gap: 16px; }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fb-form label { display: block; font-size: 12px; color: var(--text-2); }
.fb-form label span { color: var(--muted); font-size: 11px; margin-left: 6px; }
.fb-form label input, .fb-form label textarea { margin-top: 6px; display: block; }
.fb-form input, .fb-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); font: 14px/1.6 var(--sans); outline: none; transition: border-color .15s;
}
.fb-form textarea { resize: vertical; min-height: 120px; }
.fb-form input:focus, .fb-form textarea:focus { border-color: var(--accent-text); }
.fb-form .btn { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.fb-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 20px; padding: 14px 16px; border-radius: 4px; font-size: 13px; border: 1px solid; }
.form-note.ok { border-color: var(--accent-text); color: var(--accent-text); background: var(--glow); }
.form-note.err { border-color: #c85a5a; color: #e88; background: rgba(200, 90, 90, .08); }
[data-theme="light"] .form-note.err { color: #a32424; }
@media (max-width: 720px) { .fb-row { grid-template-columns: 1fr; } }

/* Tool logos */
.card-icon.has-logo { background: var(--surface-2); overflow: hidden; }
.card-icon.has-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-icon.big.has-logo { border-radius: 12px; }

/* mobile: the open button already sits under the title — don't repeat it in the side card */
@media (max-width: 860px) {
  .detail-side .btn-block, .detail-side .side-url { display: none; }
  .side-card dl { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* ===== Typography: Plus Jakarta Sans (+ IBM Plex Sans Thai); mono only for small labels ===== */
.logo, .kicker, .card-num, .term, .stats dd, .side-url, .back, .prose code, .quote-note, .app-top .logo { font-family: var(--mono); }
.hand { font-family: "Caveat", cursive; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -0.025em; word-spacing: .05em; line-height: 1.08; }
.hero .lead { font-size: 16px; line-height: 1.7; }
.section-head h2 { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.section-head h2 b { font-weight: 800; }
.page h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
.feedback h2 { font-weight: 600; letter-spacing: -0.02em; font-size: 26px; }
.card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.card p { font-size: 13px; }
.tags span { font-size: 11.5px; }
.sub { font-size: 13px; }
.btn { font-size: 14px; letter-spacing: -0.005em; }
blockquote p { font-size: 20px; letter-spacing: -0.01em; font-weight: 500; }
.stats dt { letter-spacing: .06em; }
.prose { font-size: 15.5px; line-height: 1.8; }
.prose h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.side-card dt { font-size: 12px; }
.app-name { font-weight: 600; }
.cursor { height: .09em; min-height: 4px; }
@media (max-width: 720px) {
  .hero h1 { font-size: 36px; }
  .page h1 { font-size: 32px; }
  .section-head h2 { font-size: 28px; }
}

/* ===== Sections: things / experiments / notes ===== */
.home-section { padding: 44px 0 24px; }
.home-section + .home-section { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 52px; }
.see-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 8px 0; border-bottom: 1px solid var(--border-2); transition: color .15s, border-color .15s, gap .15s; }
.see-all:hover { color: var(--accent-text); border-color: var(--accent-text); gap: 12px; }
.see-all.top { margin-top: 8px; align-self: flex-end; }

/* experiments look a little "unfinished" on purpose */
.card.is-exp { border-style: dashed; }
.card.is-exp .card-num::before { content: "β "; color: var(--accent-text); }
.exp-badge { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; border: 1px dashed var(--accent-text); color: var(--accent-text); }

/* notes list */
.note-list { border-top: 1px solid var(--border); }
.note-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 24px; align-items: baseline; padding: 22px 4px; border-bottom: 1px solid var(--border); transition: background .15s, padding .2s; }
.note-row:hover { background: var(--surface); padding-left: 14px; padding-right: 14px; }
.note-row time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.note-row h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; margin: 0; }
.note-row p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.note-meta { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.note-meta .arrow { display: flex; transition: transform .2s, color .2s; }
.note-row:hover .note-meta .arrow { transform: translateX(3px); color: var(--accent-text); }
.note-row:hover h3 { color: var(--text); }

/* section pages */
.section-page .section-head { margin-bottom: 34px; }
.section-page h1 b { font-weight: 800; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 8px; text-decoration-thickness: 3px; }
.wrap.narrow-md { max-width: 900px; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 70px 20px; border: 1px dashed var(--border-2); border-radius: 8px; color: var(--muted); text-align: center; }
.empty-state p { margin: 0; }

/* single note */
.note .kicker { margin-bottom: 14px; }
.note h1 { font-size: 42px; }
.note .lead { font-size: 18px; color: var(--text-2); margin: 16px 0 0; line-height: 1.6; }
.note-cover { width: 100%; border-radius: 8px; margin: 32px 0 0; border: 1px solid var(--border); display: block; }
.note-body { margin-top: 32px; border-top: 0; padding-top: 0; font-size: 16.5px; line-height: 1.9; }
.draft-flag { display: inline-block; margin-bottom: 18px; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 4px; background: var(--glow); border: 1px dashed var(--accent-text); color: var(--accent-text); }

@media (max-width: 720px) {
  .note-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 2px; }
  .note-row:hover { padding-left: 2px; padding-right: 2px; }
  .note-meta { display: none; }
  .note h1 { font-size: 30px; }
  .see-all.top { align-self: flex-start; margin-top: 0; }
  .stats .hide-sm { display: none; }
}
