@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0b1120;
  --bg-2: #0f172a;
  --surface: #121a2e;
  --surface-2: #18223a;
  --surface-3: #1f2b47;
  --text: #e6ebf5;
  --text-2: #b9c3d6;
  --muted: #8592ab;
  --border: #233050;
  --border-strong: #2f3e63;
  --accent: #34d399;
  --accent-2: #5eead4;
  --accent-soft: rgba(52, 211, 153, .12);
  --blue: #7aa2ff;
  --error: #fb7185;
  --warn: #fbbf24;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.025em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .88em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; color: #d7e0f2; overflow-wrap: anywhere; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 17, 32, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 1.15rem; letter-spacing: -.03em; }
.brand:hover { color: var(--text); }
.brand b { color: var(--accent); }
.mark { width: 30px; height: 30px; flex: none; }
.main-nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { color: var(--text-2); font-weight: 550; font-size: .9rem; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) { .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 6px; } .main-nav { margin-left: 0; width: 100%; } }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 650; font-size: .9rem; line-height: 1; cursor: pointer; border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; white-space: nowrap; color: var(--text); background: none; }
.btn-sm { padding: 7px 11px; font-size: .84rem; }
.btn-primary { background: var(--accent); color: #062014; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.field { display: inline-flex; flex-direction: column; gap: 6px; font-size: .78rem; font-weight: 650; color: var(--muted); min-width: 0; }
.field-block { display: flex; width: 100%; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; font-size: .86rem; }
.field-label { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; display: block; margin-bottom: 6px; }
.field-block .field-label { margin-bottom: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; min-width: 0; }
textarea, .mono, .mono-lg { font-family: var(--mono); font-size: .9rem; }
.mono-lg { font-size: 1.05rem; }
textarea { width: 100%; resize: vertical; line-height: 1.55; tab-size: 2; }
textarea[readonly] { background: #0d1426; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238592ab' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; }
.select-plain { font-size: .9rem; }
input[type="number"] { width: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--error); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 550; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; }
.status { font-size: .88rem; font-weight: 600; color: var(--muted); margin: 10px 0 0; min-height: 1.4em; }
.status[data-kind="ok"] { color: var(--accent); }
.status[data-kind="error"] { color: var(--error); }
.status[data-kind="warn"] { color: var(--warn); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.toolbar-top { margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { font: 600 .82rem var(--mono); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }

/* ---------- Tool layout ---------- */
.tool-hero { padding: 24px 0 30px; background: radial-gradient(900px 300px at 80% -80px, rgba(52, 211, 153, .12), transparent 70%), radial-gradient(700px 300px at 0% -40px, rgba(122, 162, 255, .12), transparent 70%); }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs .icon { width: 13px; height: 13px; }
.tool-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); }
.lede { color: var(--text-2); font-size: 1.04rem; margin: 8px 0 0; max-width: 68ch; }
.tool { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
@media (max-width: 560px) { .tool { padding: 14px; border-radius: 16px; } }
.io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 820px) { .io { grid-template-columns: minmax(0, 1fr); } }
pre.code { margin: 0; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px; font-size: .86rem; line-height: 1.55; overflow: auto; min-height: 120px; max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; color: #d7e0f2; }

/* Diff */
.diff-out { margin-top: 14px; border: 1px solid var(--border-strong); border-radius: 12px; overflow: auto; max-height: 560px; background: var(--bg-2); font-family: var(--mono); font-size: .85rem; }
.diff-out:empty { display: none; }
.diff-out > p { padding: 12px; margin: 0; }
.dl { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr); }
.dl span { color: var(--muted); text-align: right; padding: 1px 8px; user-select: none; border-right: 1px solid var(--border); font-size: .78rem; }
.dl code { background: none; border-radius: 0; padding: 1px 10px; white-space: pre-wrap; color: var(--text-2); font-size: inherit; }
.dl.add { background: rgba(52, 211, 153, .1); }
.dl.add code { color: #a7f3d0; }
.dl.del { background: rgba(251, 113, 133, .1); }
.dl.del code { color: #fecdd3; }
.dl mark { background: rgba(255, 255, 255, .18); color: inherit; border-radius: 3px; }

/* Hash */
.hash-list { display: grid; gap: 8px; margin: 14px 0; }
.hash-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.hash-row span { font-weight: 700; font-size: .8rem; color: var(--muted); }
.hash-row code { background: none; padding: 0; font-size: .84rem; }

/* JWT */
.claims { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.claims div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.claims span { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.claims small { color: var(--muted); }

/* Regex */
.regex-line { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 1.1rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 4px 10px; }
.regex-line input { flex: 1; border: 0; background: none; font-family: var(--mono); font-size: 1.05rem; padding: 8px 4px; box-shadow: none; }
.regex-line input.flags { flex: 0 0 70px; color: var(--accent); }
.regex-line:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hl-wrap { position: relative; }
.hl, .hl-wrap textarea { font-family: var(--mono); font-size: .9rem; line-height: 1.55; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 2; letter-spacing: 0; }
.hl { position: absolute; inset: 0; margin: 0; overflow: hidden; color: transparent; pointer-events: none; background: var(--bg-2); }
.hl mark { background: rgba(52, 211, 153, .3); color: transparent; border-radius: 3px; box-shadow: 0 0 0 1px rgba(52, 211, 153, .5); }
.hl-wrap textarea { position: relative; background: transparent; border-color: var(--border-strong); color: var(--text); caret-color: var(--text); display: block; }
.matches { display: grid; gap: 6px; max-height: 330px; overflow: auto; }
.match { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: .86rem; }
.match b { color: var(--muted); font-size: .76rem; }
.match small { color: var(--muted); }
.match ol { grid-column: 1 / -1; margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; font-family: var(--mono); font-size: .8rem; color: var(--text-2); }
.match ol span { color: var(--blue); margin-right: 6px; }
.replace { margin-top: 14px; }
.replace pre { margin-top: 8px; }

/* Case, formats */
.case-grid, .color-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 14px; }
.case-item { text-align: left; font: inherit; display: flex; flex-direction: column; gap: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--text); min-width: 0; }
.case-item:hover { border-color: var(--accent); }
.case-item span { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.case-item code { background: none; padding: 0; white-space: pre-wrap; max-height: 7.5em; overflow: hidden; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.stat-grid div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat-grid span { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat-grid b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }

/* Slug, clean URL */
.slug-out { display: flex; align-items: center; gap: 10px; margin-top: 14px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; }
.slug-out code { flex: 1; background: none; padding: 0; font-size: 1rem; color: var(--accent); min-width: 0; }
.slug-out code:empty::before { content: "–"; color: var(--muted); }

/* Timestamp */
.now { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.now .field-label { margin: 0; }
.now b { font-family: var(--mono); font-size: 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.kv { margin: 12px 0 0; display: grid; gap: 6px; }
.kv div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--border); padding: 6px 0; }
.kv dt { color: var(--muted); font-size: .84rem; font-weight: 650; }
.kv dd { margin: 0; font-family: var(--mono); font-size: .86rem; overflow-wrap: anywhere; }
@media (max-width: 480px) { .kv div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Cron */
.cron-human { font-size: 1.25rem; font-weight: 700; margin: 12px 0; color: var(--text); }
.cron-human[data-kind="error"] { color: var(--error); font-size: 1rem; }
.cron-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
@media (max-width: 640px) { .cron-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cron-fields div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.cron-fields span { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.cron-fields code { background: none; padding: 0; font-size: 1rem; color: var(--accent); }
.runs { margin: 6px 0 0; padding-left: 1.4em; font-family: var(--mono); font-size: .9rem; color: var(--text-2); }

/* Chmod */
.chmod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .chmod-grid { grid-template-columns: minmax(0, 1fr); } }
.chmod-grid fieldset { border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 14px 14px; margin: 0; display: grid; gap: 8px; }
.chmod-grid legend { font-weight: 750; padding: 0 6px; }
.chmod-out { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 16px; }
.chmod-out input { width: 100px; }
.chmod-out code { display: inline-block; font-size: 1.05rem; padding: 9px 12px; }

/* Bases */
.base-grid { display: grid; gap: 12px; }

/* Color */
.color-top { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 520px) { .color-top { grid-template-columns: minmax(0, 1fr); } }
.swatch-big { height: 120px; border-radius: 16px; border: 1px solid var(--border-strong); }
.color-inputs { display: flex; gap: 10px; align-items: flex-end; }
.color-inputs input[type="color"] { width: 52px; height: 44px; padding: 3px; cursor: pointer; flex: none; }
.contrast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.contrast-card { border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); }
.contrast-card span { font-weight: 800; font-size: 1.2rem; margin-left: auto; }
.contrast-card em { font-style: normal; font-weight: 800; font-size: .76rem; padding: 3px 8px; border-radius: 999px; background: #062014; color: #6ee7b7; }
.contrast-card em[data-tag="fail"] { background: #3b0a14; color: #fda4af; }

.pill { font-size: .72rem; font-weight: 700; color: var(--warn); border: 1px solid rgba(251, 191, 36, .4); border-radius: 999px; padding: 2px 8px; }

/* ---------- Content ---------- */
.content { padding: 30px 0 10px; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px; max-width: 860px; }
@media (max-width: 560px) { .prose { padding: 18px 16px; } }
.prose h2 { font-size: 1.25rem; margin: 24px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); line-height: 1.7; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 5px; }
.prose.narrow { margin: 10px 0 40px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 13px; }
.more { margin: 10px 0 30px; }
.more h2, .home-group h2 { font-size: 1.15rem; margin-bottom: 12px; color: var(--text-2); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tool-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; color: var(--text); transition: border-color .15s, background .15s; }
.tool-card:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); }
.tool-card > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.tool-card b { font-size: .95rem; }
.tool-card > span:last-child span { color: var(--muted); font-size: .82rem; }
.tool-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.tool-icon .icon { width: 21px; height: 21px; }
.ad { margin: 0 0 20px; min-height: 90px; max-width: 860px; }

/* ---------- Home ---------- */
.home-hero { padding: 56px 0 40px; background: radial-gradient(900px 400px at 85% -10%, rgba(52, 211, 153, .16), transparent 60%), radial-gradient(800px 400px at 0% 0%, rgba(122, 162, 255, .16), transparent 60%); }
.home-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.045em; line-height: 1.02; }
.home-hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(52, 211, 153, .25); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; }
.tool-search { display: block; max-width: 520px; margin-top: 26px; }
.tool-search input { width: 100%; font-size: 1.05rem; padding: 13px 16px; border-radius: 14px; background: var(--surface); }
.home-group { margin-bottom: 26px; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: #080d19; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 26px; padding: 44px 0 26px; }
.footer-brand p { font-size: .88rem; margin-top: 12px; max-width: 32ch; }
.site-footer h3 { color: var(--text); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.site-footer nav { display: flex; flex-direction: column; gap: 5px; }
.site-footer nav a, .footer-legal a { color: var(--muted); font-size: .86rem; }
.site-footer nav a:hover, .footer-legal a:hover { color: var(--text); }
.footer-legal { border-top: 1px solid var(--border); padding: 16px 0 24px; }
.footer-legal p { margin: 0; font-size: .82rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: #062014; font-weight: 700; font-size: .9rem; padding: 9px 15px; border-radius: 10px; z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
