/* =========================================================
   ToolStack — "Overworld" pixel-art design system
   16-bit editorial look: warm cream ground, ink borders,
   chunky 2px frames, HARD offset shadows (no soft blur, no
   gradients on chrome), pixel display type + a clean grotesk
   body + a mono utility face. Light default + dark toggle.
   Everything is tokenised; components never use raw colors.
   ========================================================= */

:root {
	--bg:            #f4efe2;   /* cream ground */
	--surface:       #fffdf6;   /* warm card */
	--surface-2:     #ece3d0;   /* inset / stripe */
	--ink:           #17140d;   /* near-black warm — borders & hard shadow */
	--border:        #17140d;   /* Overworld draws borders in ink */
	--border-soft:   #d8cdb5;   /* faint divider where ink is too heavy */
	--text:          #17140d;
	--text-muted:    #5b5443;
	--text-faint:    #8b8368;

	--accent:        #2b4cf0;   /* Overworld blue (primary) */
	--accent-2:      #e8552e;   /* vermilion */
	--accent-soft:   #dde3ff;   /* soft blue chip */
	--accent-grad:   #2b4cf0;   /* NO gradients on chrome — flat fill */
	--gold:          #e0972b;
	--good:          #2f9e44;
	--warn:          #d97706;
	--bad:           #d63b2f;

	/* Hard, offset "sticker" shadows — the Overworld signature */
	--shadow-sm:     2px 2px 0 var(--ink);
	--shadow-md:     4px 4px 0 var(--ink);
	--shadow-lg:     6px 6px 0 var(--ink);

	--radius:        8px;
	--radius-lg:     12px;
	--maxw:          1180px;

	--font-display:  'Pixelify Sans', 'Space Grotesk', system-ui, sans-serif;
	--font-body:     'Space Grotesk', system-ui, -apple-system, sans-serif;
	--font-mono:     'Space Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg:          #14110b;
		--surface:     #1f1b12;
		--surface-2:   #29241a;
		--ink:         #000000;
		--border:      #4c442f;
		--border-soft: #362f20;
		--text:        #f3ecda;
		--text-muted:  #b6ac91;
		--text-faint:  #7f785f;
		--accent:      #7d93ff;
		--accent-2:    #ff7a52;
		--accent-soft: #222846;
		--accent-grad: #7d93ff;
		--gold:        #f0b64a;
		--good:        #57c06a;
	}
}
/* Explicit toggle always wins over the OS preference. */
:root[data-theme="light"] {
	--bg:#f4efe2; --surface:#fffdf6; --surface-2:#ece3d0; --ink:#17140d;
	--border:#17140d; --border-soft:#d8cdb5; --text:#17140d; --text-muted:#5b5443; --text-faint:#8b8368;
	--accent:#2b4cf0; --accent-2:#e8552e; --accent-soft:#dde3ff; --accent-grad:#2b4cf0; --gold:#e0972b; --good:#2f9e44;
}
:root[data-theme="dark"] {
	--bg:#14110b; --surface:#1f1b12; --surface-2:#29241a; --ink:#000000;
	--border:#4c442f; --border-soft:#362f20; --text:#f3ecda; --text-muted:#b6ac91; --text-faint:#7f785f;
	--accent:#7d93ff; --accent-2:#ff7a52; --accent-soft:#222846; --accent-grad:#7d93ff; --gold:#f0b64a; --good:#57c06a;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	transition: background .2s ease, color .2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
.ft-display, h1.ft-display, h2.ft-display { font-family: var(--font-display); }
h1, h2, h3 { text-wrap: balance; }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; line-height: 1; }

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

/* Uppercase mono eyebrow/label used across the site */
.ft-eyebrow, .ft-kicker {
	font-family: var(--font-mono); font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}

/* Dashed section-break band (Overworld ticker rule) */
.ft-rule {
	border: none; border-top: 2px dashed var(--border);
	max-width: var(--maxw); margin: 56px auto; opacity: .6;
}

/* ---------- Buttons ---------- */
.ft-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; border-radius: var(--radius); font-family: var(--font-mono);
	font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
	border: 2px solid var(--ink); cursor: pointer;
	transition: transform .08s ease, box-shadow .08s ease;
}
.ft-btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.ft-btn--primary:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); }
.ft-btn--primary:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.ft-btn--outline { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ft-btn--outline:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); background: var(--accent-soft); }
.ft-btn--outline:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.ft-btn--block { width: 100%; }
.ft-btn--lg { padding: 15px 26px; font-size: 15px; }

.ft-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
	border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); color: var(--text);
	cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.ft-icon-btn:hover { background: var(--accent-soft); transform: translate(-1px,-1px); box-shadow: var(--shadow-md); }
.ft-icon-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Header ---------- */
.ft-site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--surface);
	border-bottom: 2px solid var(--ink);
}
.ft-header__inner {
	max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
	display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
}
.ft-logo { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .01em; color: var(--text); }
.ft-logo__mark {
	width: 36px; height: 36px; border-radius: 8px; background: var(--accent); border: 2px solid var(--ink);
	display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-sm);
}
.ft-logo__mark .material-symbols-outlined { font-size: 20px; }

.ft-header__spacer { flex: 1; }
.ft-header__tools { display: flex; align-items: center; gap: 10px; }

/* Header search */
.ft-search { position: relative; width: min(240px, 24vw); flex: 0 1 auto; }
@media (max-width: 1180px) { .ft-search { display: none; } }
.ft-search__input {
	width: 100%; padding: 10px 14px 10px 40px; border-radius: var(--radius);
	border: 2px solid var(--ink); background: var(--surface); color: var(--text);
	font-family: var(--font-mono); font-size: 13px;
}
.ft-search__input:focus { outline: none; box-shadow: var(--shadow-sm); }
.ft-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 20px; pointer-events: none; }
.ft-search__results {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 120;
	background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
	box-shadow: var(--shadow-md); padding: 6px; display: none; max-height: 360px; overflow-y: auto;
}
.ft-search.is-open .ft-search__results { display: block; }
.ft-search__result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; color: var(--text); }
.ft-search__result:hover, .ft-search__result.is-active { background: var(--accent-soft); }
.ft-search__result .material-symbols-outlined { color: var(--accent); font-size: 22px; }
.ft-search__result-name { font-weight: 700; font-size: 14px; }
.ft-search__result-desc { font-size: 12px; color: var(--text-muted); }
.ft-search__empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); }

/* Theme toggle */
.ft-theme-toggle .material-symbols-outlined { font-size: 20px; }

/* ---------- Mega menu ---------- */
.ft-mega-menu { display: none; min-width: 0; }
@media (min-width: 1024px) { .ft-mega-menu { display: block; } }
.ft-menu { list-style: none; display: flex; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 0; }
.ft-menu-item { position: relative; }
.ft-menu-link {
	display: inline-flex; align-items: center; gap: 3px; padding: 8px 10px; border-radius: 6px;
	white-space: nowrap; color: var(--text); font-family: var(--font-mono); font-weight: 700; font-size: 13px;
	text-transform: uppercase; letter-spacing: .03em; transition: background .12s ease, color .12s ease; cursor: pointer;
}
.ft-menu-link:hover { background: var(--accent-soft); color: var(--accent); }
.ft-menu-item.has-mega > .ft-menu-link::after { content: "expand_more"; font-family: 'Material Symbols Outlined'; font-size: 16px; color: var(--text-faint); }

.ft-mega-panel {
	position: absolute; top: calc(100% + 10px); left: 0; min-width: 520px;
	background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg); padding: 16px;
	opacity: 0; transform: translateY(-6px); pointer-events: none;
	transition: opacity .12s ease, transform .12s ease;
}
.ft-menu-item.has-mega:hover .ft-mega-panel,
.ft-menu-item.has-mega:focus-within .ft-mega-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ft-mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ft-mega-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; color: var(--text); }
.ft-mega-link:hover { background: var(--accent-soft); }
.ft-mega-link .material-symbols-outlined {
	font-size: 22px; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 6px; flex: 0 0 auto;
}
.ft-mega-link__name { font-weight: 700; font-size: 14px; }
.ft-mega-link__desc { font-size: 12px; color: var(--text-muted); }
.ft-mega-link.is-soon { opacity: .5; cursor: default; pointer-events: none; }

/* Wide "All Tools" panel: a column per category */
.ft-mega-panel--wide { min-width: 740px; left: 0; }
@media (max-width: 1200px) { .ft-mega-panel--wide { left: auto; right: 0; } }
.ft-mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 22px; }
.ft-mega-cat__title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); padding: 6px 8px 4px; border-bottom: 2px dashed var(--border); margin-bottom: 4px; }
.ft-mega-cat__list { list-style: none; margin: 0 0 10px; padding: 0; }
.ft-mega-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.ft-mega-item:hover { background: var(--accent-soft); color: var(--accent); }
.ft-mega-item .material-symbols-outlined { font-size: 19px; color: var(--accent); flex: 0 0 auto; }
.ft-mega-item.is-soon { opacity: .5; cursor: default; pointer-events: none; }
.ft-mega-item .ft-badge-soon { margin-left: auto; }
.ft-badge-soon {
	margin-left: auto; font-family: var(--font-mono); font-size: 9px; font-weight: 700; text-transform: uppercase;
	letter-spacing: .06em; color: var(--accent-2); background: var(--surface); border: 2px solid var(--accent-2); padding: 2px 6px; border-radius: 999px;
}

/* ---------- Mobile drawer ---------- */
.ft-drawer-trigger { display: inline-flex; border: 2px solid var(--ink); background: var(--surface); color: var(--text); border-radius: var(--radius); cursor: pointer; padding: 8px; box-shadow: var(--shadow-sm); }
@media (min-width: 1024px) { .ft-drawer-trigger { display: none; } }
.ft-drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.ft-drawer.is-open { visibility: visible; }
.ft-drawer__backdrop { position: absolute; inset: 0; background: rgba(10,8,4,.55); opacity: 0; transition: opacity .2s ease; }
.ft-drawer.is-open .ft-drawer__backdrop { opacity: 1; }
.ft-drawer__panel {
	position: absolute; top: 0; right: 0; height: 100%; width: min(330px, 86vw);
	background: var(--surface); border-left: 2px solid var(--ink); padding: 18px; transform: translateX(100%); transition: transform .22s ease; overflow-y: auto;
}
.ft-drawer.is-open .ft-drawer__panel { transform: translateX(0); }
.ft-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ft-drawer-close { border: none; background: transparent; color: var(--text); cursor: pointer; }
.ft-drawer__search { margin-bottom: 14px; }
.ft-drawer__search input { width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); color: var(--text); font-family: var(--font-mono); }
.ft-drawer-group { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin: 14px 0 6px; }
.ft-drawer-menu { list-style: none; margin: 0; padding: 0; }
.ft-drawer-menu li a { display: flex; align-items: center; gap: 10px; padding: 11px 6px; color: var(--text); border-bottom: 1px solid var(--border-soft); font-weight: 500; }
.ft-drawer-menu li a .material-symbols-outlined { font-size: 20px; color: var(--accent); }

/* ---------- Footer ---------- */
.ft-site-footer { margin-top: 72px; border-top: 2px solid var(--ink); background: var(--surface-2); }
.ft-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 44px 20px 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .ft-footer__inner { grid-template-columns: 1fr 1fr; } }
.ft-footer__brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 30ch; }
.ft-footer__col h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin: 0 0 14px; }
.ft-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ft-footer__col a { color: var(--text-muted); font-size: 14px; }
.ft-footer__col a:hover { color: var(--accent); }
.ft-footer__bar { border-top: 2px dashed var(--border); }
.ft-footer__bar-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* ---------- Tool pages (shared) ---------- */
.ft-tool-page { padding: 40px 20px 80px; }
.ft-tool-page__title { font-family: var(--font-display); font-size: clamp(30px, 4.8vw, 50px); font-weight: 700; margin-bottom: 10px; line-height: 1.05; }
.ft-tool-page__subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 17px; max-width: 62ch; }

.ft-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.ft-tool-card {
	position: relative; display: block; padding: 20px; border-radius: var(--radius);
	border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm);
	transition: transform .1s ease, box-shadow .1s ease;
}
.ft-tool-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.ft-tool-card:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.ft-tool-card__icon { font-size: 24px; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 8px; display: inline-flex; }
.ft-tool-card h2, .ft-tool-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 14px 0 4px; }
.ft-tool-card p { margin: 0; color: var(--text-muted); font-size: 14px; }
.ft-tool-card.is-soon { opacity: .72; }
.ft-tool-card.is-soon:hover { transform: none; box-shadow: var(--shadow-sm); }
.ft-tool-card .ft-badge-soon { position: absolute; top: 14px; right: 14px; margin: 0; }

/* Category block (All-tools + homepage "browse by category") */
.ft-cat-block { margin-top: 40px; }
.ft-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ft-cat-head__icon { font-size: 24px; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 8px; display: inline-flex; box-shadow: var(--shadow-sm); }
.ft-cat-head__text h2, .ft-cat-head__text h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin: 0; }
.ft-cat-head__text p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }

/* Category cards (browse-by-category tiles with a tool count) */
.ft-catcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.ft-catcard { display: block; padding: 22px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .1s ease, box-shadow .1s ease; }
.ft-catcard:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.ft-catcard__icon { font-size: 24px; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 8px; display: inline-flex; }
.ft-catcard__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 14px 0 4px; color: var(--text); }
.ft-catcard__desc { color: var(--text-muted); font-size: 14px; margin: 0 0 10px; }
.ft-catcard__count { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Hero ---------- */
.ft-hero { padding: 68px 0 36px; text-align: center; position: relative; }
.ft-hero__eyebrow {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
	background: var(--surface); border: 2px solid var(--ink); color: var(--text); box-shadow: var(--shadow-sm);
	font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 22px;
}
.ft-hero__eyebrow .ft-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); border: 1px solid var(--ink); display: inline-block; }
.ft-hero__title { font-family: var(--font-display); font-size: clamp(38px, 6.6vw, 74px); font-weight: 700; line-height: 1.02; margin: 0 auto 18px; max-width: 15ch; }
.ft-hero__title .grad { color: var(--accent); }
.ft-hero__subtitle { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-muted); margin: 0 auto 28px; max-width: 56ch; }
.ft-hero__search { max-width: 620px; margin: 0 auto; }
.ft-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.ft-chip { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: transform .08s ease, box-shadow .08s ease; }
.ft-chip:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); background: var(--accent-soft); color: var(--accent); }

/* Big search (hero) */
.ft-bigsearch { position: relative; }
.ft-bigsearch__row { display: flex; gap: 10px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 8px 8px 20px; box-shadow: var(--shadow-md); align-items: center; }
.ft-bigsearch__row .material-symbols-outlined { color: var(--text-faint); }
.ft-bigsearch input { flex: 1; border: none; background: transparent; color: var(--text); font-family: var(--font-body); font-size: 16px; padding: 8px 0; }
.ft-bigsearch input:focus { outline: none; }
.ft-bigsearch .ft-search__results { border-radius: var(--radius-lg); padding: 8px; }

/* ---------- Sections ---------- */
.ft-section { margin-top: 60px; }
.ft-section__head { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ft-section__head .material-symbols-outlined { color: var(--accent); font-size: 26px; }
.ft-section__title { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; margin: 0; }
.ft-section__sub { color: var(--text-muted); font-size: 15px; margin: 0 0 22px; }
.ft-section__link { margin-left: auto; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

/* Trust badges */
.ft-trust-badges { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ft-trust-badges--center { justify-content: center; }
.ft-trust-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--ink); color: var(--text); font-family: var(--font-mono); font-size: 12px; font-weight: 700; box-shadow: var(--shadow-sm); }
.ft-trust-badge .material-symbols-outlined { font-size: 18px; color: var(--good); }

/* Steps */
.ft-steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ft-step { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
.ft-step__num { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; background: var(--accent); border: 2px solid var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ft-step__title { font-family: var(--font-display); font-size: 17px; margin: 2px 0 4px; }
.ft-step__text { margin: 0; color: var(--text-muted); font-size: 14px; }

/* Benefits */
.ft-benefits__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ft-benefit-card { padding: 22px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .1s ease, box-shadow .1s ease; }
.ft-benefit-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.ft-benefit-card__icon { font-size: 24px; color: var(--accent); background: var(--accent-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 8px; display: inline-flex; }
.ft-benefit-card__title { font-family: var(--font-display); font-size: 17px; margin: 12px 0 6px; }
.ft-benefit-card__text { margin: 0; color: var(--text-muted); font-size: 14px; }

/* FAQ */
.ft-faq__list { display: flex; flex-direction: column; gap: 12px; }
.ft-faq__item { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.ft-faq__q { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; color: var(--text); }
.ft-faq__q::-webkit-details-marker { display: none; }
.ft-faq__q::after { content: "add"; font-family: 'Material Symbols Outlined'; color: var(--accent); }
.ft-faq__item[open] .ft-faq__q::after { content: "remove"; }
.ft-faq__item[open] .ft-faq__q { background: var(--accent-soft); border-bottom: 2px solid var(--ink); }
.ft-faq__a { padding: 14px 18px 16px; }
.ft-faq__a p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.8; }

/* Related + article cards */
.ft-related__grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ft-related-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .1s ease, box-shadow .1s ease; }
.ft-related-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.ft-related-card__icon { font-size: 24px; color: var(--accent); }
.ft-related-card__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.ft-related-card__text { font-size: 13px; color: var(--text-muted); }

/* Breadcrumbs */
.ft-breadcrumbs { margin: 4px 0 20px; font-family: var(--font-mono); font-size: 12px; }
.ft-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ft-breadcrumbs li { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.ft-breadcrumbs li:not(:last-child)::after { content: "chevron_right"; font-family: 'Material Symbols Outlined'; font-size: 16px; color: var(--text-faint); }
.ft-breadcrumbs a { color: var(--text-muted); }
.ft-breadcrumbs a:hover { color: var(--accent); }
.ft-breadcrumbs li[aria-current="page"] { color: var(--text); font-weight: 700; }
.ft-rtl .ft-breadcrumbs li:not(:last-child)::after { content: "chevron_left"; }

/* ---------- Article / blog ---------- */
.ft-article { padding-bottom: 64px; }
.ft-article__header { margin: 26px 0 22px; max-width: 760px; }
.ft-article__title { font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; margin: 10px 0 16px; }
.ft-article__meta { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; flex-wrap: wrap; }
.ft-article__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.ft-article__meta b { color: var(--text); font-weight: 700; }
.ft-article__meta .ft-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); display: inline-block; }
.ft-article__thumb img { border-radius: var(--radius-lg); border: 2px solid var(--ink); width: 100%; margin: 6px 0 4px; }

.ft-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 46px; align-items: start; }
@media (max-width: 960px) { .ft-article__layout { grid-template-columns: 1fr; } }

/* Prose */
.ft-article__content { max-width: 760px; font-size: 17px; line-height: 1.8; color: var(--text); }
.ft-article__content > * { margin: 0 0 1.15em; }
.ft-article__content h2 { font-family: var(--font-display); font-size: 1.55em; line-height: 1.15; margin: 1.8em 0 .55em; scroll-margin-top: 92px; }
.ft-article__content h3 { font-family: var(--font-display); font-size: 1.24em; margin: 1.5em 0 .5em; scroll-margin-top: 92px; }
.ft-article__content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.ft-article__content a:hover { background: var(--accent-soft); }
.ft-article__content ul, .ft-article__content ol { padding-inline-start: 1.4em; }
.ft-article__content li { margin: .45em 0; }
.ft-article__content img { border-radius: var(--radius); border: 2px solid var(--ink); }
.ft-article__content blockquote { border: 2px solid var(--ink); border-left-width: 6px; background: var(--surface); margin: 1.4em 0; padding: 14px 18px; border-radius: var(--radius); color: var(--text-muted); box-shadow: var(--shadow-sm); }
.ft-article__content code { font-family: var(--font-mono); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 1px 6px; border-radius: 5px; font-size: .88em; }

/* TOC — shared list styling */
.ft-toc__title { font-family: var(--font-mono); font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.ft-toc__title .material-symbols-outlined { color: var(--accent); font-size: 18px; }
.ft-toc__list { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.ft-toc__list li { counter-increment: toc; }
.ft-toc__list li a { display: flex; gap: 8px; padding: 7px 0; color: var(--text-muted); line-height: 1.4; }
.ft-toc__list li a::before { content: counter(toc) "."; font-family: var(--font-mono); color: var(--accent); font-weight: 700; flex: 0 0 auto; }
.ft-toc__list li a:hover, .ft-toc__list li a.is-active { color: var(--accent); font-weight: 700; }
.ft-toc__list li.lvl-3 a { padding-inline-start: 20px; font-size: 13px; }
.ft-toc__list li.lvl-3 a::before { content: "–"; color: var(--text-faint); }

/* TOC — desktop sidebar */
.ft-toc--desktop { position: sticky; top: 88px; align-self: start; border: 2px solid var(--ink); background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-md); font-size: 14px; }
@media (max-width: 960px) { .ft-toc--desktop { display: none; } }

/* TOC — mobile (collapsible, at the very top of the article) */
.ft-toc--mobile { display: none; border: 2px solid var(--ink); background: var(--surface); border-radius: var(--radius); margin: 0 0 26px; overflow: hidden; box-shadow: var(--shadow-sm); }
@media (max-width: 960px) { .ft-toc--mobile { display: block; } }
.ft-toc--mobile > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.ft-toc--mobile > summary::-webkit-details-marker { display: none; }
.ft-toc--mobile > summary::after { content: "expand_more"; font-family: 'Material Symbols Outlined'; color: var(--accent); }
.ft-toc--mobile[open] > summary::after { content: "expand_less"; }
.ft-toc--mobile[open] > summary { border-bottom: 2px solid var(--ink); }
.ft-toc--mobile .ft-toc__list { padding: 12px 16px 14px; }

/* Summarize-with-AI panel (below the TOC) */
.ft-ai-summarize { margin-top: 18px; }
.ft-toc--desktop .ft-ai-summarize { border-top: 2px dashed var(--border); padding-top: 16px; }
.ft-ai-summarize__title { font-family: var(--font-mono); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 0 0 10px; }
.ft-ai-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.ft-ai-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-family: var(--font-mono); font-weight: 700; font-size: 12px; transition: transform .08s ease, box-shadow .08s ease, background .12s ease; }
.ft-ai-btn:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); background: var(--accent-soft); color: var(--accent); }
.ft-ai-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.ft-ai-btn svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.ft-toc--mobile .ft-ai-summarize { padding: 0 16px 14px; }

.ft-tool-callout { margin-top: 48px; padding: 26px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 2px solid var(--ink); box-shadow: var(--shadow-md); text-align: center; }
.ft-tool-callout__links { display: flex; gap: 12px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.ft-post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin: 28px 0; }
.ft-post-card { padding: 20px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .1s ease, box-shadow .1s ease; }
.ft-post-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.ft-post-card__thumb img { border-radius: var(--radius); border: 2px solid var(--ink); margin-bottom: 12px; }
.ft-post-card__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ft-post-card__date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.ft-post-card__title { font-family: var(--font-display); font-size: 19px; margin: 6px 0; }
.ft-post-card__title a { color: var(--text); }
.ft-post-card__title a:hover { color: var(--accent); }
.ft-post-card__excerpt { color: var(--text-muted); font-size: 14px; }

/* RTL helper (kept for Arabic articles / future toggle) */
.ft-rtl { direction: rtl; text-align: right; }

/* ---------- Overworld component details ---------- */

/* Keycap hint (the reference's "/" focus key) */
.ft-kbd {
	display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
	padding: 0 5px; border: 2px solid var(--ink); border-radius: 5px; background: var(--surface);
	box-shadow: 1px 1px 0 var(--ink); font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-muted);
}
.ft-search .ft-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ft-search__input { padding-right: 34px; }
.ft-bigsearch .ft-kbd { flex: 0 0 auto; }
.ft-search__hint { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin: 10px 0 0; text-align: center; }
.ft-search__hint .ft-kbd { margin: 0 2px; }

/* Inverted-black tag label ("SIDE QUEST" / "DAILY QUESTS" style) */
.ft-tag { display: inline-block; background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: 3px 9px; border-radius: 4px; }
.ft-tag--accent { background: var(--accent); color: #fff; }

/* Sun/moon theme switch (replaces the plain toggle button) */
.ft-switch {
	position: relative; width: 62px; height: 34px; flex: 0 0 auto; padding: 0;
	border: 2px solid var(--ink); border-radius: 999px; background: var(--surface-2);
	box-shadow: var(--shadow-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between;
}
.ft-switch__icon { font-size: 15px; width: 26px; text-align: center; z-index: 1; color: var(--text-faint); pointer-events: none; }
.ft-switch__icon--sun { color: var(--gold); }
.ft-switch__knob {
	position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%;
	background: var(--accent); border: 2px solid var(--ink); transition: transform .18s ease; z-index: 2;
}
@media (prefers-color-scheme: dark) { .ft-switch__knob { transform: translateX(28px); } }
:root[data-theme="light"] .ft-switch__knob { transform: translateX(0); }
:root[data-theme="dark"] .ft-switch__knob { transform: translateX(28px); }

/* Blocky pagination (blog archive) — matches the reference pager */
.pagination, .ft-pagination { margin-top: 40px; }
.pagination .nav-links, .ft-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
	border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); color: var(--text);
	font-family: var(--font-mono); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm);
	transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.pagination a.page-numbers:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); background: var(--accent-soft); }
.pagination .page-numbers.current { background: var(--accent); color: #fff; }
.pagination .page-numbers.dots { border: none; box-shadow: none; background: transparent; }
.pagination .prev.page-numbers, .pagination .next.page-numbers { text-transform: uppercase; letter-spacing: .04em; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tool-page: "Articles about this tool" ---------- */
.ft-tool-articles { margin: 52px auto 8px; }
.ft-tool-articles__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 3px solid var(--ink, var(--border)); }
.ft-tool-articles__title { font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px); line-height: 1.15; margin: 0; }
.ft-tool-articles .ft-post-list { margin-top: 24px; }
