/* ToolMakersHub — shared brand styles (see brand-guidelines.md) */
:root {
    --logo-from: #00b4db; --logo-to: #00d4aa;
    --brand: #007a99; --brand-2: #00b4db; --brand-ink: #ffffff;
    --bg: #ffffff; --surface-2: #f4f5f9; --text: #1d1f2b; --muted: #636779; --border: #dcdfe8;
    color-scheme: light;
}
[data-theme="dark"] {
    --brand: #22c7e6; --brand-2: #2dd4bf; --brand-ink: #14151c;
    --bg: #14151c; --surface-2: #262935; --text: #e8e9f0; --muted: #9a9db0; --border: #353846;
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.tmh-skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.tmh-skip:focus { left: 12px; }

/* Top bar */
.tmh-top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 32px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.tmh-wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.04em; font-size: 19px; color: var(--text); text-decoration: none; }
.tmh-wordmark.small { font-size: 16px; }
.tmh-wordmark svg { flex: none; }
.hub { background: linear-gradient(90deg, var(--logo-from), var(--logo-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tmh-nav { display: flex; align-items: center; gap: 4px; }
.tmh-nav a { white-space: nowrap; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.tmh-nav a:hover, .tmh-nav a.is-active { background: var(--surface-2); }
.tmh-theme { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; margin-left: 4px; }
.tmh-theme .moon { display: none; }
[data-theme="dark"] .tmh-theme .sun { display: none; }
[data-theme="dark"] .tmh-theme .moon { display: block; }
.tmh-theme:focus-visible, .tmh-nav a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Products menu */
.tmh-menu { position: relative; }
.tmh-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.tmh-menu > summary::-webkit-details-marker { display: none; }
.tmh-menu > summary:hover, .tmh-menu[open] > summary, .tmh-menu > summary.is-active { background: var(--surface-2); }
.tmh-menu > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.tmh-menu[open] > summary svg { transform: rotate(180deg); }
.tmh-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 24px)); background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .35); display: grid; gap: 2px; z-index: 20; }
.tmh-nav .tmh-menu-item { white-space: normal; font-size: 14px; font-weight: 400; }
.tmh-menu-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.tmh-menu-item:hover, .tmh-menu-item:focus-visible { background: var(--surface-2); outline: none; }
.tmh-menu-item b { font-size: 14px; font-weight: 600; }
.tmh-menu-item em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.tmh-menu-item small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.tmh-menu-item > span:last-child { min-width: 0; }
.tmh-nav .tmh-menu-all { display: block; border-radius: 0 0 12px 12px; color: var(--brand); }
.tmh-menu-all { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--border); margin-top: 4px; font-size: 13px; font-weight: 600; text-decoration: none; }

/* Footer */
.tmh-footer { background: var(--surface-2); margin-top: 48px; padding: 28px clamp(16px, 4vw, 32px); display: grid; gap: 14px; }
.tmh-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 1160px; width: 100%; margin: 0 auto; font-size: 14px; }
.tmh-footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.tmh-footer-row nav a { color: var(--text); text-decoration: none; }
.tmh-footer-row nav a:hover { color: var(--brand); }
.tmh-legal a { font-size: 13px; }
.tmh-social { gap: 8px !important; }
.tmh-footer-row .tmh-social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); transition: color .15s, border-color .15s, transform .15s; }
.tmh-footer-row .tmh-social a:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.tmh-footer-row .tmh-social a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.tmh-footer-row.muted { color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); padding-top: 14px; }

/* Glyph tiles and badges */
.glyph { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--logo-from), var(--logo-to)); color: #fff; font-weight: 800; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.02em; }
.glyph-sm { width: 32px; height: 32px; font-size: 11px; border-radius: 9px; }
.glyph-lg { width: 64px; height: 64px; font-size: 20px; border-radius: 16px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.draft { background: #fef3c7; color: #b45309; }

@media (max-width: 520px) {
    .tmh-hide-sm { display: none; }
    .tmh-nav a { padding: 8px 9px; font-size: 13px; }
    .tmh-wordmark { font-size: 17px; }
    .tmh-menu > summary { padding: 8px 9px; font-size: 13px; }
    .tmh-wordmark > span { display: none; }
}
