/* StitchRove — "linen & thread" theme. Light only.
   Signature details: linen background weave, running-stitch dashed lines, button-like craft tags,
   cross-stitch breadcrumbs, a hoop that stitches itself on the homepage. */
/* Self-hosted fonts (SIL Open Font License): Fraunces, Nunito Sans */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/fraunces-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/fraunces-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/fraunces-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 500; font-display: swap; src: url(/assets/fonts/fraunces-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 600; font-display: swap; src: url(/assets/fonts/fraunces-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/nunito-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/nunito-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/nunito-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/nunito-sans-latin-800-normal.woff2) format("woff2"); }
:root {
  --bg: #FBF6EE;
  --bg-2: #F3EADB;
  --panel: #FFFFFF;
  --panel-2: #FBF7F1;
  --line: rgba(92, 64, 40, .13);
  --line-2: rgba(92, 64, 40, .24);
  --ink: #2E241C;
  --ink-2: #5A4A3C;
  --muted: #86735F;
  --madder: #B8553A;      /* terracotta thread */
  --madder-d: #9A4129;
  --rose: #B04A5A;
  --sage: #6E8B5E;
  --sage-d: #4F6B41;
  --mustard: #D9A441;
  --indigo: #4E6F86;
  --wood: #C69A6B;
  --ok: #3F7A3A;
  --warn: #A06A12;
  --tint: rgba(184, 85, 58, .07);
  --tint-2: rgba(184, 85, 58, .12);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(92, 64, 40, .06), 0 12px 28px -22px rgba(92, 64, 40, .5);
  --stitch: repeating-linear-gradient(90deg, var(--madder) 0 9px, transparent 9px 15px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; color: var(--ink); background-color: var(--bg);
  font: 16px/1.62 var(--body); -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 90, 60, .028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(120, 90, 60, .028) 0 1px, transparent 1px 4px);
}
a { color: var(--madder-d); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-style: dashed; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.14; margin: 0; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(30px, 4.2vw, 46px); }
h2 { font-size: clamp(22px, 2.4vw, 28px); }
h3, .h3 { font-size: 19px; }
p { margin: 0 0 1em; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
code { font-size: .86em; background: var(--bg-2); padding: .12em .42em; border-radius: 6px; color: var(--ink-2); }
pre { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
pre code { background: none; padding: 0; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sel { user-select: all; font-weight: 600; }
:focus-visible { outline: 2px dashed var(--madder); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--madder); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: 24px; }
.wrap.narrow { max-width: 860px; }
.narrow-wide { max-width: 1080px; }
.narrow-col { max-width: 820px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } .flag { right: 10px; } }
body { overflow-x: hidden; }

/* Icons */
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic-sm { width: 17px; height: 17px; }
.ic-xs { width: 14px; height: 14px; vertical-align: -2px; }
.ic-lg { width: 30px; height: 30px; }
.ic-xl { width: 48px; height: 48px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 700 15px/1 var(--body); padding: 12px 18px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; color: var(--ink); background: var(--bg-2); text-decoration: none !important; white-space: nowrap; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-xs { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn-go { background: var(--madder); color: #fff; box-shadow: 0 6px 18px -10px rgba(154, 65, 41, .9); }
.btn-go:hover { background: var(--madder-d); }
.btn-ghost { background: var(--panel); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-line { background: transparent; border: 1.5px dashed var(--madder); color: var(--madder-d); }
.btn-line:hover { background: var(--tint); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 30; background: rgba(251, 246, 238, .92); backdrop-filter: saturate(1.3) blur(10px); -webkit-backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1.5px; background: var(--stitch); opacity: .35; }
.top-in { display: flex; align-items: center; gap: 22px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word { font: 650 24px/1 var(--display); letter-spacing: -.02em; }
.brand-word em { font-style: italic; color: var(--madder); font-weight: 600; }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--muted); }
.top-search:focus-within { border-color: var(--madder); }
.top-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 15px var(--body); height: 42px; }
.top-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-nav > a:not(.btn) { color: var(--ink-2); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top-nav > a:not(.btn):hover, .top-nav > a.on { color: var(--madder-d); background: var(--tint); text-decoration: none; }
.top-nav .btn { margin-left: 6px; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--panel); cursor: pointer; padding: 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--ink-2); border-radius: 2px; }
@media (max-width: 1060px) {
  .top-in { gap: 12px; }
  .top-search { display: none; }
  .nav-toggle { display: flex; }
  .top-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px; box-shadow: var(--shadow); }
  .top-nav.open { display: flex; }
  .top-nav .btn { margin: 8px 0 0; }
}

/* Hero */
.hero { position: relative; padding: 46px 0 34px; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -140px; top: -160px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(217, 164, 65, .16), transparent 65%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-d); margin: 0 0 14px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(110, 139, 94, .18); }
.hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--madder); font-weight: 600; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 64ch; margin-bottom: 22px; }
.hero-search { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 2px solid var(--line-2); border-radius: 999px; padding: 0 8px 0 20px; color: var(--muted); max-width: 640px; box-shadow: var(--shadow); }
.hero-search:focus-within { border-color: var(--madder); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 17px var(--body); color: var(--ink); height: 56px; }
.hero-count { font-size: 13px; color: var(--muted); white-space: nowrap; padding-right: 12px; }
.big-search { margin-top: 16px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.quick button { font: 700 13px var(--body); padding: 7px 13px; border-radius: 999px; border: 1.5px dashed var(--line-2); background: var(--panel); color: var(--ink-2); cursor: pointer; }
.quick button:hover { border-color: var(--madder); color: var(--madder-d); }
.quick button.on { background: var(--madder); border-color: var(--madder); border-style: solid; color: #fff; }

.hero-tools { background: var(--panel); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; position: relative; }
.hero-tools::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(184, 85, 58, .35); border-radius: 18px; pointer-events: none; }
.hoop { width: 150px; height: 150px; border-radius: 50%; border: 6px solid var(--wood); box-shadow: inset 0 0 0 2px #E2C9A6, 0 6px 16px -8px rgba(92, 64, 40, .6); overflow: hidden; position: relative; background: #FFFDF8; }
.hoop::after { content: ""; position: absolute; left: 50%; top: -9px; width: 26px; height: 14px; margin-left: -13px; background: var(--wood); border-radius: 4px; }
.hoop-canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-tools-kicker { font: 800 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--sage-d); margin: 0 0 8px; }
.hero-tools ul { list-style: none; margin: 0; padding: 0; }
.hero-tools li a { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.3; border-bottom: 1px dashed var(--line); }
.hero-tools li:last-child a { border-bottom: 0; }
.hero-tools li a .ic { color: var(--madder); }
.hero-tools li a .go { margin-left: auto; color: var(--muted); }
.hero-tools li a:hover { color: var(--madder-d); text-decoration: none; }
.hero-ad { display: block; background: var(--panel); border-radius: 24px; padding: 18px; box-shadow: var(--shadow); color: var(--ink); position: relative; }
.hero-ad-label { position: absolute; top: 12px; right: 14px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 1000px) { .hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; } .hero-tools { max-width: 520px; } }
@media (max-width: 520px) { .hero-tools { grid-template-columns: 1fr; } .hoop { margin: 0 auto; } .hero-search input { height: 50px; font-size: 16px; } }

/* Craft strip and nav */
.craft-strip { margin: 6px 0 28px; }
.strip-title { font-size: 15px; font-family: var(--body); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.craftnav { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.craftnav a { --c: var(--madder); display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 10px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); color: var(--ink); font-weight: 800; font-size: 15px; box-shadow: var(--shadow); }
.craftnav a .ic { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.craftnav a:hover, .craftnav a.on { border-color: var(--c); border-style: dashed; text-decoration: none; }
.craftnav a.on { background: color-mix(in srgb, var(--c) 10%, #fff); }
.catnav { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.catnav a { --cat: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-weight: 700; font-size: 13px; }
.catnav a i { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }
.catnav a.on { border-color: var(--cat); color: var(--ink); }

/* Layout */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding-bottom: 56px; }
@media (max-width: 1080px) { .home-layout { grid-template-columns: minmax(0, 1fr); } .home-side .sticky { position: static; } }
.home-side { display: grid; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.panel-tint { background: color-mix(in srgb, var(--mustard) 9%, #fff); border-color: rgba(217, 164, 65, .35); }
.panel.sticky { position: sticky; top: 90px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2, .panel-title { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.panel-head h2 { margin: 0; }
.panel-head h2 .ic { color: var(--mustard); }
.panel-foot { display: flex; gap: 14px; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); font-size: 14px; font-weight: 700; }
.links { list-style: none; margin: 0 0 8px; padding: 0; }
.links li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; font-weight: 600; }
.links li:last-child { border-bottom: 0; }
.more { font-size: 14px; font-weight: 800; color: var(--madder-d); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.group { margin-bottom: 18px; }
.group-head { padding: 22px 0 6px; margin-bottom: 8px; position: relative; }
.group-head::after { content: ""; display: block; height: 2px; margin-top: 12px; background: var(--stitch); opacity: .55; border-radius: 2px; }
.group-head h2 { font-size: clamp(24px, 2.6vw, 32px); }
.group-head p { color: var(--muted); margin: 6px 0 0; }
.block { margin: 26px 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.block-head h2, .block-head h3 { min-width: 0; }
.block-head h2, .block-head h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.block-head small { font: 800 13px var(--body); color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 2px 9px; }
.block-head h2 > .ic { color: var(--mustard); }
.cat-ic { --cat: var(--madder); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--cat) 13%, #fff); color: var(--cat); flex: none; border: 1.5px dashed color-mix(in srgb, var(--cat) 45%, transparent); }
.cat-ic .ic { width: 20px; height: 20px; }
.cat-ic-lg { width: 64px; height: 64px; }
.cat-ic-lg .ic { width: 32px; height: 32px; }
[style*="--c:"] > .cat-ic, .craft-hero .cat-ic { --cat: var(--c); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { --cat: var(--madder); position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s; }
.card::after { content: ""; position: absolute; inset: 5px; border-radius: 12px; border: 1.5px dashed transparent; pointer-events: none; transition: border-color .16s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(92, 64, 40, .06), 0 18px 32px -22px rgba(92, 64, 40, .6); }
.card:hover::after { border-color: color-mix(in srgb, var(--cat) 55%, transparent); }
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.card-act, .card-crafts { position: relative; z-index: 2; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card-id { min-width: 0; }
.card-name { font-size: 17px; line-height: 1.2; }
.card-dom { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tag { font-size: 14.5px; color: var(--ink-2); margin: 0; flex: 1; line-height: 1.5; }
.card-crafts { display: flex; flex-wrap: wrap; gap: 5px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card-act { display: flex; gap: 8px; margin-top: 2px; }
.card-act .btn { flex: 1; }
.flag { position: absolute; top: -9px; right: 14px; z-index: 3; font: 800 11px var(--body); letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--sage); padding: 3px 10px; border-radius: 999px; }
.flag-ad { background: var(--ink-2); }
.d-flags .flag { position: static; }
.is-featured { border-color: rgba(110, 139, 94, .4); }
.is-sponsored { border-color: rgba(90, 74, 60, .4); }
.logo { --s: 40px; position: relative; width: var(--s); height: var(--s); flex: none; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.logo::before { content: attr(data-initials); font: 700 calc(var(--s) * .38) var(--display); color: var(--madder-d); }
.logo img { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; background: transparent; }
.craft-dot { --c: var(--madder); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 2px 9px 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--c) 9%, #fff); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.craft-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 60%, #fff); }
a.craft-dot:hover { text-decoration: none; border-color: var(--c); }
.craft-more { font-size: 12px; color: var(--muted); font-weight: 700; align-self: center; }
.badge { display: inline-block; font: 800 11.5px/1 var(--body); letter-spacing: .02em; padding: 5px 9px; border-radius: 6px; background: var(--bg-2); color: var(--ink-2); }
.b-free, .b-open-source { background: rgba(110, 139, 94, .16); color: var(--sage-d); }
.b-freemium { background: rgba(217, 164, 65, .18); color: #7A5410; }
.b-paid, .b-subscription { background: rgba(78, 111, 134, .14); color: #34536A; }
.b-store { background: rgba(176, 74, 90, .1); color: #8A3443; }
.b-free-pat { background: rgba(110, 139, 94, .1); color: var(--sage-d); border: 1px dashed rgba(110, 139, 94, .5); }
.b-kind { background: var(--panel); border: 1px solid var(--line-2); }
.chip-mini { font-size: 12px; color: var(--muted); font-weight: 700; }

/* Rankings */
.rank { list-style: none; margin: 0; padding: 0; }
.rank-row { display: grid; grid-template-columns: 24px auto minmax(0, 1fr) auto 26px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-n { font: 700 15px var(--display); color: var(--muted); text-align: center; }
.rank-row.top .rank-n { color: var(--madder); }
.rank-name { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.rank-name strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-weight: 800; font-size: 14px; text-align: right; }
.rank-val small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.rank-go { color: var(--muted); display: grid; place-items: center; }
.rank-big .rank-row { grid-template-columns: 30px auto minmax(0, 1fr) 140px 64px 28px; padding: 12px 0; }
.rank-bar { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--stitch); }
.rank-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding-bottom: 50px; }
.rank-cats { display: flex; flex-direction: column; gap: 2px; }
.rank-cats a { --cat: var(--muted); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.rank-cats a i { width: 8px; height: 8px; border-radius: 50%; background: var(--cat); }
.rank-cats a.on { background: var(--tint); color: var(--ink); }
@media (max-width: 800px) { .rank-layout { grid-template-columns: 1fr; } .rank-cats { flex-direction: row; flex-wrap: wrap; } .rank-big .rank-row { grid-template-columns: 26px auto minmax(0, 1fr) 54px 26px; } .rank-bar { display: none; } }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; padding: 18px 0 4px; color: var(--muted); }
.crumbs a { color: var(--ink-2); font-weight: 700; }
.crumbs .sep { color: var(--madder); font-weight: 800; opacity: .6; }

/* Page heads */
.page-head { padding: 14px 0 18px; }
.page-head h1 { margin-bottom: 12px; }
.page-head.with-logo { display: flex; gap: 18px; align-items: flex-start; }
.cat-hero, .craft-hero, .tool-head { display: flex; gap: 22px; align-items: flex-start; padding: 16px 24px 22px; }
.tool-head { padding-inline: 0; }
.cat-hero h1, .craft-hero h1, .tool-head h1 { margin-bottom: 10px; }
.cat-hero .cat-ic, .craft-hero .cat-ic { margin-top: 4px; }
@media (max-width: 600px) { .cat-hero, .craft-hero, .tool-head { flex-direction: column; gap: 12px; padding-inline: 16px; } .tool-head { padding-inline: 0; } }

/* Toolbar & segmented control */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg-2); border-radius: 999px; padding: 4px; }
.seg button, .seg a { font: 700 13.5px var(--body); border: 0; background: transparent; color: var(--ink-2); padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.seg button small { font-weight: 700; color: var(--muted); }
.seg .on { background: var(--panel); color: var(--madder-d); box-shadow: 0 1px 3px rgba(92, 64, 40, .18); text-decoration: none; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.mini-search { flex: 1; min-width: 200px; max-width: 320px; font: 15px var(--body); padding: 9px 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); outline: 0; }
.mini-search:focus { border-color: var(--madder); }
.empty { color: var(--muted); padding: 20px; text-align: center; border: 1.5px dashed var(--line-2); border-radius: var(--r); }
.note { padding: 12px 16px; border-radius: 12px; background: var(--bg-2); margin: 10px 0; }
.note-ok { background: rgba(110, 139, 94, .14); color: var(--sage-d); font-weight: 700; }
.note-bad { background: rgba(184, 85, 58, .1); color: var(--madder-d); font-weight: 700; }

/* Detail page */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding-bottom: 56px; }
@media (max-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.d-head { display: flex; gap: 20px; align-items: flex-start; padding: 14px 0 18px; }
.d-head .logo { border-radius: 18px; }
.d-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.d-tag { font-size: 18px; color: var(--ink-2); margin: 8px 0 10px; }
.d-crafts { display: flex; gap: 6px; flex-wrap: wrap; }
.d-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 26px; }
.prose { font-size: 16.5px; }
.prose h2 { margin: 28px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.d-sec { margin: 30px 0; }
.d-sec > h2 { margin-bottom: 14px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--sage); margin-top: 3px; }
.ticks-inline { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); font-size: 14.5px; margin: 6px 0 14px; }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.procon > div { border-radius: var(--r); padding: 16px 18px; border: 1.5px dashed var(--line-2); background: var(--panel); }
.procon .pro { border-color: rgba(110, 139, 94, .55); }
.procon .con { border-color: rgba(184, 85, 58, .45); }
.procon h3 { margin-bottom: 8px; font-size: 17px; }
.procon ul { margin: 0; padding-left: 18px; }
@media (max-width: 640px) { .procon { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0 0 14px; }
.facts > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.facts dt { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.facts-side { grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts-side > div { border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; padding: 9px 0; background: none; }
.facts-side > div:last-child { border-bottom: 0; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fact { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--panel-2); border: 1px dashed var(--line-2); font-size: 14.5px; }
.fx-ok { color: var(--ok); }
.fx-warn { color: var(--warn); }
.fx-na { color: var(--ink-2); }
.stats-panel { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.stats-panel b { display: block; font: 600 24px var(--display); }
.stats-panel span { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.chip { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.chip:hover { border-color: var(--madder); color: var(--madder-d); text-decoration: none; }
.chip.on { background: var(--madder); color: #fff; border-color: var(--madder); }
.chip-tag { font-weight: 600; font-size: 13px; background: var(--panel-2); }
.chip-tool { border-style: dashed; border-color: var(--madder); color: var(--madder-d); }
.chips-lg .chip { padding: 9px 15px; font-size: 14.5px; }
.compare-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp-table th, .cmp-table td { padding: 11px 14px; text-align: left; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.cmp-table thead th { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.cmp-table tbody tr:last-child td, .cmp-table tbody tr:last-child th { border-bottom: 0; }
.cmp-table tr.self td { background: var(--tint); }
.cmp-table .num { font: 600 16px var(--display); color: var(--muted); }
.tcell { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 220px; }
.tcell span { display: flex; flex-direction: column; }
.tcell small { color: var(--muted); font-size: 12.5px; }
.vs-head { display: flex; align-items: center; justify-content: center; gap: 28px; text-align: center; }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 8px; font: 600 22px var(--display); }
.vs { font: italic 600 28px var(--display); color: var(--madder); }
.vs-table th[scope=row] { width: 26%; color: var(--ink-2); }
.vs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
@media (max-width: 760px) { .vs-cols { grid-template-columns: 1fr; } }

/* Category & craft cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat-card { --cat: var(--madder); display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; position: relative; }
.cat-card::after { content: ""; position: absolute; inset: 5px; border-radius: 12px; border: 1.5px dashed transparent; pointer-events: none; }
.cat-card:hover { transform: translateY(-2px); text-decoration: none; }
.cat-card:hover::after { border-color: color-mix(in srgb, var(--cat) 55%, transparent); }
.cat-card h2, .cat-card h3 { font-size: 19px; }
.cat-card p { color: var(--ink-2); font-size: 14.5px; margin: 0; flex: 1; }
.cat-logos { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.cat-logos .small { margin-left: 8px; color: var(--muted); font-weight: 700; }

/* Craft guide path */
.guide { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px; box-shadow: var(--shadow); position: relative; }
.guide::before { content: ""; position: absolute; inset: 8px; border-radius: 16px; border: 1.5px dashed rgba(110, 139, 94, .45); pointer-events: none; }
.guide .prose p { color: var(--ink-2); }
.path { list-style: none; counter-reset: p; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; position: relative; }
.path li { counter-increment: p; background: var(--panel-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.path-step { font: 800 12px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--sage-d); }
.path-step::before { content: counter(p) ". "; color: var(--madder); }
.path a { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.path .logo { --s: 24px !important; border-radius: 7px; }

/* Collections */
.tool-cta { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r); background: color-mix(in srgb, var(--mustard) 12%, #fff); border: 1.5px dashed rgba(217, 164, 65, .8); color: var(--ink); margin-bottom: 18px; }
.tool-cta span:not(.cat-ic) { display: flex; flex-direction: column; flex: 1; }
.tool-cta small { color: var(--ink-2); font-size: 14px; }
.tool-cta:hover { text-decoration: none; background: color-mix(in srgb, var(--mustard) 18%, #fff); }
.best-list { display: grid; gap: 14px; }
.best-item { --cat: var(--madder); display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 18px 10px; box-shadow: var(--shadow); }
.best-n { font: 600 30px/1 var(--display); color: var(--cat); text-align: center; padding-top: 6px; }
.best-body header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.best-body header p { margin: 2px 0 0; }
.best-body h2 { font-size: 21px; }
.best-body h2 a { color: var(--ink); }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.faq h2 { margin-bottom: 14px; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.col-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); box-shadow: var(--shadow); border-left: 4px solid var(--madder); }
.col-card span { color: var(--ink-2); font-size: 14.5px; }
.col-card small { color: var(--muted); font-weight: 700; }
.col-card:hover { text-decoration: none; border-left-color: var(--sage); }

/* Forms */
.form { display: grid; gap: 16px; padding: 24px; }
.f-row { display: grid; gap: 6px; }
.f-row label, legend { font-weight: 800; font-size: 14px; color: var(--ink-2); }
.f-two { grid-template-columns: 1fr 1fr; gap: 14px; }
.f-three { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.f-two > div, .f-three > div { display: grid; gap: 6px; align-content: start; }
@media (max-width: 560px) { .f-two, .f-three { grid-template-columns: 1fr; } }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not(.mini-search):not([type=search]), select, textarea {
  width: 100%; font: 16px var(--body); color: var(--ink); background: var(--panel); border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--madder); }
fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; }
.checks label, .check-inline label { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; font-size: 15px; }
.check-inline { display: flex; align-items: flex-end; padding-bottom: 8px; }
input[type=checkbox] { accent-color: var(--madder); width: 17px; height: 17px; }
.hp { position: absolute; left: -9999px; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.price-card.hot { border: 2px dashed var(--madder); }
.price b { font: 600 34px var(--display); }
.price span { color: var(--muted); }
.notfound { padding: 60px 0; }
.notfound .craftnav { justify-content: center; margin-top: 24px; }

/* Tools */
.tool-layout { padding-bottom: 10px; }
.tool-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.tool-panel-wide { display: block; padding: 22px; }
.tool-form { padding: 24px; display: grid; gap: 16px; align-content: start; border-right: 1px dashed var(--line-2); }
.tool-out { padding: 24px; background: var(--panel-2); min-height: 260px; }
@media (max-width: 860px) { .tool-panel { grid-template-columns: 1fr; } .tool-form { border-right: 0; border-bottom: 1px dashed var(--line-2); } }
.tabs { justify-self: start; }
.res { margin: 0; display: grid; gap: 10px; }
.res > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.res dt { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.res dd { margin: 3px 0 0; font-weight: 700; font-size: 17px; }
.res dd small { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.res .big dd { font: 600 26px/1.2 var(--display); }
.res .big dd small { font-family: var(--body); }
.res .hl { border: 2px dashed var(--madder); background: #fff; }
.res .hl dd b, .res .big dd b { color: var(--madder-d); }
.instr { display: block; font: 700 17px/1.55 var(--body); }
.drop { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: 18px; text-align: center; cursor: pointer; background: var(--panel-2); color: var(--ink-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--madder); background: var(--tint); }
.drop .ic { color: var(--madder); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ptp-empty { height: 100%; min-height: 220px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.ptp-empty .ic { color: var(--line-2); }
.ptp-thumb { display: block; max-width: 100%; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow); }
.ptp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.ptp-chart-wrap { overflow: auto; max-height: 76vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 18px; }
.ptp-chart-wrap canvas { display: block; }
.key-table .sym { font: 700 16px system-ui, sans-serif; text-align: center; width: 70px; }
.swatch { display: inline-block; width: 28px; height: 20px; border-radius: 5px; border: 1px solid var(--line-2); vertical-align: middle; }
.tool-guide { max-width: 820px; margin: 10px 0 0; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--panel); border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--ink); }
.tool-card:hover { border-color: var(--madder); text-decoration: none; }
.tool-card strong { font: 600 18px var(--display); }
.tool-grid-lg .tool-card { padding: 22px; }
.tool-grid-lg .tool-card .small { color: var(--ink-2); }
.tool-crafts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }

/* Footer */
.foot { margin-top: 30px; background: var(--bg-2); border-top: 1px solid var(--line); position: relative; }
.stitch-line { height: 3px; background: var(--stitch); opacity: .6; }
.foot-in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 28px; }
.foot-brand p { color: var(--ink-2); font-size: 14.5px; margin-top: 12px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot-cols h4 { font: 800 13px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-cols a { display: block; color: var(--ink-2); font-size: 14.5px; padding: 3px 0; font-weight: 600; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 16px; padding-bottom: 26px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
@media (max-width: 960px) { .foot-in { grid-template-columns: 1fr; } .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vs-title { text-align: center; font-size: clamp(26px, 3.4vw, 38px); margin: 10px 0 4px; }
