/* PatchCraft Co — shared styles */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --tint-violet: #F3F0FF;
  --tint-coral: #FFF0EC;
  --tint-yellow: #FFF8E1;
  --tint-teal: #E8FBF6;
  --ink: #1A1533;
  --ink-dim: #4A4368;
  --ink-faint: #7A7396;
  --line: rgba(26,21,51,0.10);
  --line-strong: rgba(26,21,51,0.20);
  --primary: #5B3DF5;
  --primary-deep: #4429D6;
  --on-primary: #FFFFFF;
  --coral: #FF5B45;
  --coral-deep: #E8432F;
  --yellow: #FFC93C;
  --teal: #00B39B;
  --shadow: 0 1px 2px rgba(26,21,51,0.06), 0 14px 32px -16px rgba(26,21,51,0.28);
  --shadow-lg: 0 18px 46px -18px rgba(26,21,51,0.34);
  --radius: 18px;
  --radius-sm: 10px;

  /* product category accents */
  --c-embroidered: #5B3DF5;
  --c-puff: #2F8FFF;
  --c-woven: #00B39B;
  --c-chenille: #D99400;
  --c-leather: #D9552E;
  --c-pvc: #FF4C82;
  --c-sublimated: #B23FD1;
  --c-applique: #2FA360;
  --c-sequin: #2F6FE0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150F2E; --surface: #1E1745;
    --tint-violet: #241A57; --tint-coral: #2B1A2E; --tint-yellow: #2A2211; --tint-teal: #102B28;
    --ink: #F5F1FF; --ink-dim: #C9C0EA; --ink-faint: #8F86B8;
    --line: rgba(245,241,255,0.14); --line-strong: rgba(245,241,255,0.26);
    --primary: #8B7CFF; --primary-deep: #A79AFF; --on-primary: #150F2E;
    --coral: #FF8168; --coral-deep: #FF9985; --yellow: #FFD666; --teal: #4FE0C0;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 16px 38px -18px rgba(0,0,0,0.6);
    --shadow-lg: 0 20px 50px -18px rgba(0,0,0,0.65);
    --c-embroidered: #8B7CFF; --c-puff: #6FB4FF; --c-woven: #4FE0C0; --c-chenille: #FFCE54;
    --c-leather: #FF8A61; --c-pvc: #FF8FB0; --c-sublimated: #D98CF0; --c-applique: #6BD696; --c-sequin: #7FA9FF;
  }
}
:root[data-theme="dark"] {
  --bg: #150F2E; --surface: #1E1745;
  --tint-violet: #241A57; --tint-coral: #2B1A2E; --tint-yellow: #2A2211; --tint-teal: #102B28;
  --ink: #F5F1FF; --ink-dim: #C9C0EA; --ink-faint: #8F86B8;
  --line: rgba(245,241,255,0.14); --line-strong: rgba(245,241,255,0.26);
  --primary: #8B7CFF; --primary-deep: #A79AFF; --on-primary: #150F2E;
  --coral: #FF8168; --coral-deep: #FF9985; --yellow: #FFD666; --teal: #4FE0C0;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 16px 38px -18px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 50px -18px rgba(0,0,0,0.65);
  --c-embroidered: #8B7CFF; --c-puff: #6FB4FF; --c-woven: #4FE0C0; --c-chenille: #FFCE54;
  --c-leather: #FF8A61; --c-pvc: #FF8FB0; --c-sublimated: #D98CF0; --c-applique: #6BD696; --c-sequin: #7FA9FF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
.mono { font-family: "IBM Plex Mono", monospace; }
h1, h2, h3 {
  font-family: "Unbounded", sans-serif; font-weight: 800; text-wrap: balance; margin: 0; color: var(--ink);
  line-height: 1.12;
}
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 19px; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral-deep); display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-weight: 600;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); display: inline-block; }
.lede { color: var(--ink-dim); font-size: 17.5px; max-width: 62ch; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); background: var(--primary-deep); box-shadow: var(--shadow-lg); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: var(--shadow); }
.btn-coral:hover { transform: translateY(-2px); background: var(--coral-deep); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.logo svg { width: 30px; height: 30px; }
.logo-word { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 18px; color: var(--ink); }
.navlinks { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.navlinks > a:not(.btn) {
  font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink-dim);
  padding: 8px 12px; border-radius: 999px;
}
.navlinks > a:not(.btn):hover { color: var(--ink); background: var(--tint-violet); }
.navlinks > a.active { color: var(--primary); }
.navcta { margin-left: 8px; }
@media (max-width: 900px) { .navlinks > a:not(.btn):not(.navcta) { display: none; } .has-dropdown { display: none; } }

.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--line-strong); border-radius: 10px;
  width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.menu-toggle svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .menu-toggle { display: flex; } }
.mobile-panel {
  display: none; position: fixed; inset: 65px 0 0 0; background: var(--bg); z-index: 55;
  overflow-y: auto; padding: 20px 24px 40px;
}
body.nav-open .mobile-panel { display: block; }
body.nav-open { overflow: hidden; }
.mobile-panel a {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 17px; padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.mobile-panel .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mobile-panel .m-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 22px 0 4px; font-weight: 700; }
.mobile-panel .btn { margin-top: 24px; width: 100%; justify-content: center; }

.has-dropdown { position: relative; }
.has-dropdown > button {
  display: flex; align-items: center; gap: 5px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ink-dim); background: none; border: none; cursor: pointer; padding: 8px 12px; border-radius: 999px;
}
.has-dropdown > button:hover, .has-dropdown:hover > button { color: var(--ink); background: var(--tint-violet); }
.has-dropdown > button svg { width: 12px; height: 12px; transition: transform 0.15s ease; }
.has-dropdown:hover > button svg, .has-dropdown:focus-within > button svg { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: 100%; left: 0; margin-top: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; width: 420px;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.15s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  text-decoration: none; color: var(--ink-dim); font-size: 13.5px; font-weight: 600;
}
.dropdown a:hover { background: var(--tint-violet); color: var(--ink); }
.dropdown a .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: 13px; color: var(--ink-faint); padding: 22px 0 0; }
.crumbs a { text-decoration: none; color: var(--ink-faint); }
.crumbs a:hover { color: var(--primary); }

/* ---------- Section tints ---------- */
.tint-violet { background: var(--tint-violet); }
.tint-coral { background: var(--tint-coral); }
.tint-yellow { background: var(--tint-yellow); }
.tint-teal { background: var(--tint-teal); }

/* ---------- Cards / grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.patch-card { position: relative; overflow: hidden; text-decoration: none; }
.patch-card .swatch-lg { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.patch-card .swatch-lg svg { width: 22px; height: 22px; stroke: #fff; }
.patch-card h3 { margin-bottom: 6px; }
.patch-card p { font-size: 13.5px; color: var(--ink-dim); margin: 0 0 14px; }
.patch-card .price { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; font-weight: 600; }
.patch-card .arrow { position: absolute; top: 22px; right: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--tint-violet); display: flex; align-items: center; justify-content: center; transition: transform 0.15s ease; }
.patch-card:hover .arrow { transform: translate(3px,-3px); }
.patch-card .arrow svg { width: 14px; height: 14px; }

/* ---------- Pipeline / steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
@media (max-width: 860px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.step-num { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 26px; color: var(--primary); margin-bottom: 14px; }
.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 13.5px; color: var(--ink-dim); margin: 0; }

/* ---------- Pricing table ---------- */
.table-scroll { overflow-x: auto; margin-top: 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
table.pricing { width: 100%; border-collapse: collapse; background: var(--surface); }
table.pricing th, table.pricing td { padding: 14px 20px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); }
table.pricing th { background: var(--primary); color: #fff; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
table.pricing tr:nth-child(even) td { background: var(--tint-violet); }
.price-cell { font-family: "IBM Plex Mono", monospace; color: var(--coral-deep); font-weight: 700; }
.pricing-note { font-size: 13px; color: var(--ink-faint); margin-top: 16px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 22px 4px; display: flex; align-items: center; gap: 14px;
  font-family: "Unbounded", sans-serif; font-size: 16px; font-weight: 700; color: var(--ink);
}
.faq-q .plus {
  margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--tint-violet); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 16px; transition: transform 0.2s ease; flex: none;
}
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 4px 22px; color: var(--ink-dim); font-size: 14.5px; max-width: 66ch; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Form ---------- */
.form-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 44px; box-shadow: var(--shadow-lg); margin-top: 32px;
}
@media (max-width: 640px) { .form-wrap { padding: 26px 18px; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-dim); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; padding: 13px 15px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.hp-field { position: absolute; left: -9999px; }
.form-submit { margin-top: 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { font-size: 12.5px; color: var(--ink-faint); }
#formStatus { display: none; padding: 18px 20px; border-radius: 14px; font-size: 14.5px; margin-top: 24px; }
#formStatus.show { display: block; }
#formStatus.ok { background: var(--tint-teal); color: #0A7A69; border: 1px solid var(--teal); }
#formStatus.err { background: var(--tint-coral); color: var(--coral-deep); border: 1px solid var(--coral); }

/* ---------- Hero shared ---------- */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(38px, 5.6vw, 58px); line-height: 1.03; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 34px; }
.trust-row span { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-dim); font-weight: 600; }
.trust-row svg { width: 16px; height: 16px; stroke: var(--teal); flex: none; }

/* ---------- Product imagery ---------- */
.hero-photo-frame { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px 18px 0 0; background: var(--ink-faint); }
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.thumb-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
@media (max-width: 560px) { .thumb-strip { grid-template-columns: repeat(3, 1fr); } }
.patch-card .patch-thumb { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.patch-card .patch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.patch-hero-photo { width: 100%; aspect-ratio: 1.3; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.16); }
.patch-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 52px 0 36px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 0 0 14px; font-weight: 700; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-dim); text-decoration: none; margin-bottom: 10px; }
.foot-col a:hover { color: var(--primary); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-bottom .fine { font-size: 12.5px; color: var(--ink-faint); }
.foot-bottom .fine a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.foot-bottom .fine a:hover { color: var(--primary); }
.foot-bottom .contact { font-weight: 700; text-decoration: none; color: var(--primary); font-size: 14px; }

/* ---------- Blog index ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { text-decoration: none; overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.blog-card .blog-thumb {
  height: 132px; display: flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; font-size: 11.5px; letter-spacing: 0.05em;
  color: #fff; text-transform: uppercase; padding: 16px; text-align: center;
}
.blog-card .blog-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card .blog-tag {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--primary); margin-bottom: 10px;
}
.blog-card h3 { font-size: 18px; margin-bottom: 10px; }
.blog-card p { font-size: 13.5px; color: var(--ink-dim); margin: 0 0 16px; flex: 1; }
.blog-card .blog-meta { font-size: 12px; color: var(--ink-faint); display: flex; gap: 10px; align-items: center; }
.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-decoration: none; overflow: hidden; padding: 0;
  margin-top: 40px;
}
@media (max-width: 760px) { .blog-featured { grid-template-columns: 1fr; } }
.blog-featured .blog-thumb { height: 100%; min-height: 220px; }
.blog-featured .blog-body { padding: 36px; justify-content: center; }
.blog-featured h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 14px; }
.blog-featured p { font-size: 15px; }

/* ---------- Article / blog post ---------- */
.article-hero { padding: 48px 0 0; }
.article-meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px;
  font-size: 13px; color: var(--ink-faint); font-family: "IBM Plex Mono", monospace;
}
.article-meta-row .blog-tag { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); background: var(--tint-violet); padding: 5px 12px; border-radius: 999px; }
.article-hero h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: 20ch; margin-top: 18px; }
.article-band { height: 8px; margin: 40px 0 0; }
.prose { max-width: 72ch; margin-top: 8px; }
.prose p { font-size: 16.5px; line-height: 1.75; color: var(--ink-dim); margin: 0 0 22px; }
.prose h2 { font-size: 25px; margin: 48px 0 18px; line-height: 1.2; }
.prose h3 { font-size: 19px; margin: 34px 0 14px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; color: var(--ink-dim); font-size: 16px; line-height: 1.7; }
.prose li { margin-bottom: 8px; }
.prose li strong { color: var(--ink); }
.prose a { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--primary); }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 30px 0; padding: 4px 4px 4px 22px; border-left: 3px solid var(--coral);
  font-size: 17px; font-style: italic; color: var(--ink);
}
.prose .callout {
  background: var(--tint-violet); border-radius: var(--radius-sm); padding: 20px 24px; margin: 30px 0;
  font-size: 15px; color: var(--ink-dim);
}
.prose .callout strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 14.5px; }
.prose table th, .prose table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose table th { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); }
.article-cta {
  margin-top: 48px; padding: 32px; border-radius: var(--radius); background: var(--tint-violet);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.article-cta h3 { font-size: 19px; margin-bottom: 4px; }
.article-cta p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.article-author { display: flex; align-items: center; gap: 12px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-author .av {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff; font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 15px;
}
.article-author .name { font-weight: 700; font-size: 14.5px; }
.article-author .role { font-size: 12.5px; color: var(--ink-faint); }
.related-posts { margin-top: 20px; }

/* --- Patch type explorer (homepage) --- */
.type-explorer {
  display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; min-width: 0;
}
.type-list, .type-panels, .type-panel-media, .type-panel-body { min-width: 0; }
.type-list {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.type-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: none; border-left: 3px solid transparent; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.type-btn:hover { background: var(--tint-violet); }
.type-btn.is-active { background: var(--tint-violet); border-left-color: var(--accent); }
.type-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.type-btn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.type-btn-name { font-weight: 700; font-size: 14.5px; }
.type-btn-tag { font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-btn-arrow { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateX(-4px); transition: opacity 0.15s ease, transform 0.15s ease; }
.type-btn-arrow svg { width: 13px; height: 13px; stroke: var(--accent); }
.type-btn.is-active .type-btn-arrow, .type-btn:hover .type-btn-arrow { opacity: 1; transform: translateX(0); }

.type-panels { position: relative; }
.type-panel {
  display: none; grid-template-columns: 220px 1fr; gap: 28px;
  background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--accent);
}
.type-panel.is-active { display: grid; animation: typeFadeIn 0.25s ease; }
@keyframes typeFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.type-panel-media { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.type-panel-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.type-panel-body { min-width: 0; }
.type-panel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.type-tag {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  padding: 5px 10px; border-radius: 999px; background: var(--tint-violet); color: var(--ink-dim);
}
.type-panel-body h3 { font-size: 22px; margin-bottom: 10px; }
.type-panel-body > p { color: var(--ink-dim); font-size: 14.5px; margin: 0 0 20px; }
.type-panel-meta { display: flex; gap: 28px; margin-bottom: 22px; }
.type-panel-meta .meta-label { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 4px; }
.type-panel-meta .meta-value { font-weight: 800; font-size: 17px; color: var(--accent); }

@media (max-width: 860px) {
  .type-explorer { grid-template-columns: 1fr; }
  .type-panel { grid-template-columns: 1fr; }
  .type-panel-media { max-width: 220px; }
}

/* --- Finish compare tool (homepage) --- */
.compare-tool { min-width: 0; }
.compare-controls { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.compare-select-wrap { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.compare-select-wrap label {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600;
}
.compare-select-wrap select {
  min-width: 0; width: 100%; font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink);
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer;
}
.compare-select-wrap select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.compare-swap { flex: none; width: 34px; height: 34px; margin-bottom: 11px; border-radius: 50%; background: var(--tint-violet); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.compare-swap svg { width: 15px; height: 15px; }

.compare-canvas {
  position: relative; width: 100%; aspect-ratio: 16 / 8; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--surface); user-select: none; touch-action: none; --split: 50%;
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.compare-img-left { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-img-right { clip-path: inset(0 0 0 var(--split)); }
.compare-label {
  position: absolute; bottom: 16px; padding: 7px 15px; border-radius: 999px; background: rgba(15,11,32,0.68); color: #fff;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; pointer-events: none;
}
.compare-label-left { left: 16px; }
.compare-label-right { right: 16px; }
.compare-seam { position: absolute; top: 0; bottom: 0; left: var(--split); pointer-events: none; }
.compare-seam::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(15,11,32,0.18);
}
.compare-handle {
  position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: none; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; color: var(--primary); pointer-events: auto;
}
.compare-handle svg { width: 19px; height: 19px; }
.compare-handle:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

@media (max-width: 640px) {
  .compare-canvas { aspect-ratio: 4 / 5; }
  .compare-controls { align-items: stretch; }
  .compare-swap { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
