:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1b1f2a;
  --muted: #5d6475;
  --border: #e3e6ee;
  --accent: #3d5afe;
  --accent-text: #ffffff;
  --accent-soft: #eef1ff;
  --error: #c62828;
  --error-soft: #fdecec;
  --success: #2e7d32;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 4px 16px rgba(20, 24, 40, .06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131a;
    --surface: #1a1d27;
    --text: #e8eaf1;
    --muted: #a0a6b6;
    --border: #2b2f3c;
    --accent: #7b8cff;
    --accent-text: #0e1020;
    --accent-soft: #232845;
    --error: #ff8a80;
    --error-soft: #3a1e22;
    --success: #81c784;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }
a { color: var(--accent); }

/* Header + navigation bar */
.site-header {
  position: sticky; top: 0; z-index: 20; margin-bottom: 8px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; flex: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.nav-link[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-icon { font-size: 1rem; line-height: 1; display: none; }
.menu-btn {
  display: none; margin-inline-start: auto; font: inherit; font-size: 1.3rem; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
/* "Tools ▾" dropdown */
.nav-menu { position: relative; }
.nav-menu-btn { font: inherit; font-size: .93rem; font-weight: 500; border: none; background: none; cursor: pointer; }
.nav-menu-btn.current { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.caret { font-size: .75rem; transition: transform .15s; }
.nav-menu.open .caret { transform: rotate(180deg); }
.nav-sub {
  display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 200px; padding: 6px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.nav-menu.open .nav-sub { display: grid; gap: 2px; }
.nav-sub .nav-icon { display: inline; width: 1.4em; text-align: center; }

@media (max-width: 1060px) {
  .menu-btn { display: grid; place-items: center; }
  .nav-icon { display: inline; width: 1.4em; text-align: center; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 8px 16px 14px; background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px; font-size: 1rem; }
  /* on phones the Tools sections are simply listed under a heading */
  .nav-menu-btn { pointer-events: none; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 14px 12px 4px; }
  .nav-menu-btn .caret, .nav-menu-btn .nav-icon { display: none; }
  .nav-sub { display: grid !important; position: static; box-shadow: none; border: none; padding: 0; padding-inline-start: 8px; min-width: 0; }
}
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px; border-top: 1px solid var(--border); }

/* Home */
.hero { text-align: center; padding: 36px 0 24px; }
.hero h1, .hero .h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 600px; }

.search { position: relative; max-width: 560px; margin: 24px auto 0; }
.search-icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; }
.search input {
  width: 100%; font: inherit; padding-block: 14px; padding-inline: 44px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.categories {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; margin-bottom: 8px;
  scrollbar-width: thin;
}
.cat {
  flex: none; font: inherit; font-size: .9rem; padding: 7px 14px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.cat:hover { color: var(--text); }
.cat[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.section-title { font-size: 1.05rem; margin: 28px 0 12px; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.card h3 { font-size: 1rem; margin: 12px 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: .88rem; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.chips { display: flex; align-items: center; gap: 8px; }
.chip {
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; color: #fff;
  padding: 4px 8px; border-radius: 6px; background: #6b7280;
}
.arrow { color: var(--muted); font-size: .9rem; }

/* Tool page */
.back { display: inline-block; margin: 8px 0 16px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }
.tool-head { text-align: center; margin-bottom: 24px; }
.tool-head .chips { justify-content: center; min-height: 27px; }  /* the script fills it in: reserved so the form does not jump down */
.tool-head h1, .tool-head .h1 { margin: 12px 0 4px; font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -.02em; }
.tool-head p { color: var(--muted); margin: 0; }

.panel {
  max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 18px;
}

.drop {
  border: 2px dashed var(--border); border-radius: 12px; padding: 32px 16px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible, .drop.dragging { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop p { margin: 4px 0; }
.drop-icon { font-size: 1.8rem; color: var(--accent); }
.hint { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }

.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; min-width: 0;
}
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.icon-btn {
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem;
  width: 28px; height: 28px; border-radius: 6px; flex: none;
}
.icon-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.options { display: grid; gap: 14px; }
.options:empty { display: none; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { margin: 0; }
select, .field input {
  font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}

.btn {
  font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-decoration: none; text-align: center; display: inline-block; overflow-wrap: anywhere;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(1.06); }

.progress .bar { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress .bar.indeterminate span { width: 35%; animation: slide 1.2s ease-in-out infinite; }
.progress p { margin: 8px 0 0; text-align: center; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.result { display: grid; gap: 10px; text-align: center; }
.result p { margin: 0; color: var(--success); font-weight: 600; }

.error { margin: 0; padding: 12px; border-radius: 10px; background: var(--error-soft); color: var(--error); }

/* QR page */
.tabs { display: flex; gap: 6px; justify-content: center; margin: 0 auto 20px; padding: 4px; width: fit-content;
  max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.tab { padding: 8px 16px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
/* Phone: content -> preview + download -> style. Desktop: preview + download stays on the right. */
.qr-layout {
  display: grid; gap: 18px; max-width: 980px; margin: 0 auto; align-items: start;
  grid-template-columns: minmax(0, 1fr);  /* never wider than the screen on phones */
  grid-template-areas: "content" "preview" "design";
}
.qr-content { grid-area: content; }
.qr-preview { grid-area: preview; }
.qr-design { grid-area: design; }
@media (min-width: 860px) {
  .qr-layout { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "content preview" "design preview"; }
  .qr-preview { position: sticky; top: 76px; }
}
.qr-layout .panel { max-width: none; margin: 0; }
.btn-big { width: 100%; font-size: 1.05rem; padding: 14px 20px; }
.success-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .success-note { background: #1b3320; color: #a5d6a7; } }
.field-label { font-weight: 600; font-size: .9rem; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.kind {
  font: inherit; font-size: .88rem; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.kind:hover { border-color: var(--accent); }
.kind[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.kind-icon { font-size: 1.3rem; line-height: 1; }
textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); resize: vertical; }
.field input[type="color"] { padding: 2px; height: 42px; cursor: pointer; }
.field input[type="file"] { padding: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.qr-style > summary, .advanced > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.qr-style > .options { margin-top: 12px; }
.advanced { border-top: 1px solid var(--border); padding-top: 10px; }
.advanced > .options { margin-top: 12px; }
.link-btn { font: inherit; font-size: .85rem; background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; justify-self: start; }
.qr-box {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border);
  background: #ffffff; padding: 12px; text-align: center;
}
.qr-box.checker { background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px; }
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-box .hint { color: #5d6475; padding: 0 16px; }
.qr-tip { margin: 0; text-align: center; }
.dl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-row .btn { flex: 1 1 80px; }
.warning { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff7e0; color: #7a5400; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .warning { background: #3a3016; color: #f3d48a; } }
.qr-results { display: grid; gap: 12px; }
.qr-results:empty { display: none; }
.qr-result { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.qr-result h3 { margin: 0; font-size: 1rem; }
.qr-result pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace;
  font-size: .9rem; background: var(--bg); padding: 10px; border-radius: 8px; }
#qr-read .panel { display: grid; gap: 16px; }

/* Text tools */
.text-body { max-width: 1080px; margin: 0 auto; display: grid; gap: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.text-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .text-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.text-options { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; }
.text-options .field { min-width: 200px; }
.text-options .field input[type="number"] { width: 110px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.text-info { text-align: end; }
.text-info.bad { color: var(--error); }
.text-body textarea { min-height: 160px; font-size: .95rem; line-height: 1.5; }
.text-body textarea[readonly] { background: var(--bg); }
.privacy-note { text-align: center; margin: 14px 0 0; }
.sub-title { font-size: .95rem; margin: 4px 0 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.stat strong { font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.top-words { margin: 0; padding-inline-start: 22px; columns: 2 220px; }
.top-words li { padding: 2px 0; break-inside: avoid; }
.top-words li span:first-child { font-weight: 600; margin-inline-end: 8px; }
.case-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.diff { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  min-height: 80px; max-height: 520px; overflow-y: auto; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; line-height: 1.6; }
.diff ins { background: #d7f5dd; color: #0f5132; text-decoration: none; border-radius: 3px; }
.diff del { background: #fde0e0; color: #8a1c1c; border-radius: 3px; }
@media (prefers-color-scheme: dark) { .diff ins { background: #1d4429; color: #b7f0c4; } .diff del { background: #4a1f22; color: #ffc9c9; } }
.diff-line { display: flex; gap: 10px; padding: 0 6px; border-radius: 4px; }
.diff-line.ins { background: #eefbf0; } .diff-line.del { background: #fdf0f0; }
@media (prefers-color-scheme: dark) { .diff-line.ins { background: #16301e; } .diff-line.del { background: #351719; } }
.diff-line ins, .diff-line del { background: none; }
.diff-mark { width: 1ch; flex: none; color: var(--muted); user-select: none; }
.md-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .md-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.md-layout textarea { font-family: ui-monospace, Consolas, monospace; min-height: 460px; }
.md-preview { width: 100%; min-height: 460px; height: 100%; border: 1px solid var(--border); border-radius: 10px; background: #ffffff; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 4px; }
.md-btn { width: auto; min-width: 34px; padding: 0 8px; border: 1px solid var(--border); font-weight: 700; }
.md-actions .btn { flex: 0 1 auto; }
.kv { border-collapse: collapse; width: 100%; font-size: .92rem; }
.kv th, .kv td { text-align: start; padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.kv th { width: 30%; color: var(--muted); font-weight: 600; }
.link-btn { margin-top: 4px; }

/* "Runs on your device" badges and notes */
.card { position: relative; }
.device-badge { display: inline-block; margin-top: 10px; font-size: .75rem; font-weight: 600; color: #0f766e; background: #ccfbf1;
  padding: 2px 8px; border-radius: 99px; }
@media (prefers-color-scheme: dark) { .device-badge { color: #5eead4; background: #134e4a; } }
.where-note { margin: 0; text-align: center; }

/* Developer tools */
.mono, .code-box { font-family: ui-monospace, Consolas, "Cascadia Mono", monospace; }
.code-box { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; min-height: 60px; font-size: .88rem; max-height: 420px; overflow: auto; }
.jwt-status, .cron-meaning { margin: 0; font-weight: 600; }
.jwt-status.good { color: var(--success); }
.jwt-status.bad, .cron-meaning.bad, td.bad { color: var(--error); }
.cron-input { font-size: 1.3rem; letter-spacing: .05em; }
.cron-meaning { font-size: 1.1rem; }
.cron-next { margin: 0; padding-inline-start: 22px; }
.now-box { font-size: 1.1rem; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.hash-table td:nth-child(2) { font-size: .85rem; }
.hash-table tr.match th, .hash-table tr.match td { background: #e8f5e9; color: #1b5e20; }
@media (prefers-color-scheme: dark) { .hash-table tr.match th, .hash-table tr.match td { background: #1b3320; color: #a5d6a7; } }
.btn-small { padding: 6px 10px; font-size: .85rem; }
.regex-view mark { background: #fde68a; color: #1b1f2a; border-radius: 3px; padding: 0 1px; }
.regex-view { max-height: 300px; }
#regex-table { font-size: .88rem; }
.grad-preview { height: 220px; border-radius: 14px; border: 1px solid var(--border); }
.grad-stops { display: grid; gap: 8px; }
.grad-stop { display: flex; gap: 10px; align-items: center; }
.grad-stop input[type="range"] { flex: 1 1 0; min-width: 60px; }
.grad-stop .hint { min-width: 64px; }
.grad-stop input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.grad-stop input[type="range"], .field input[type="range"] { width: 100%; accent-color: var(--accent); padding: 0; border: none; }

/* Calculators */
.calc-body { display: grid; gap: 16px; }
.calc-results .stat strong { font-size: 1.25rem; }
.stat-main { border-color: var(--accent); background: var(--accent-soft); grid-column: 1 / -1; }
.stat-main strong { font-size: 1.9rem !important; color: var(--accent); }
.calc-extra p { margin: 4px 0; }
.calc-note { margin: 0; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: end; }
.calc-table th:first-child, .calc-table td:first-child { text-align: start; }
.calc-table th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
#loan-table, #ci-table { max-height: 420px; overflow: auto; }
.pct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.pct-row input { width: 110px; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.pct-result { font-size: 1.15rem; color: var(--accent); }
.bmi-bar { position: relative; height: 12px; border-radius: 99px;
  background: linear-gradient(90deg, #60a5fa 0%, #60a5fa 14%, #22c55e 14%, #22c55e 40%, #f59e0b 40%, #f59e0b 60%, #ef4444 60%, #ef4444 100%); }
.bmi-marker { position: absolute; top: -5px; width: 4px; height: 22px; border-radius: 2px; background: var(--text); transform: translateX(-2px); }
.bmi-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.gpa-rows { display: grid; gap: 8px; }
.gpa-row, .gpa-head { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px 32px; gap: 8px; align-items: center; }
.gpa-row input, .gpa-row select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%; }

/* Social media tools */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.yt-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: grid; gap: 8px; padding-bottom: 12px; }
.yt-card > *:not(.yt-img) { margin: 0 12px; }
.yt-img { aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; overflow: hidden; }
.yt-img img { width: 100%; height: 100%; object-fit: contain; }
.yt-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.yt-card.missing { opacity: .55; }
.vt-video { width: 100%; max-height: 420px; background: #000; border-radius: 12px; }
.vt-scrub { display: flex; gap: 12px; align-items: center; }
.vt-scrub input { flex: 1; accent-color: var(--accent); }
.vt-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.vt-frames:empty { display: none; }
.vt-frame { padding: 0; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; display: grid; color: #fff; font: inherit; font-size: .75rem; }
.vt-frame:hover, .vt-frame:focus-visible { border-color: var(--accent); }
.vt-frame canvas { width: 100%; height: auto; display: block; }
.vt-frame span { padding: 2px 6px; text-align: start; background: rgba(0, 0, 0, .7); }
.vt-result { display: grid; gap: 10px; justify-items: start; }
.vt-result:empty { display: none; }
.vt-preview { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--border); }
.sc-list { display: grid; gap: 6px; }
.sc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; }
.sc-name { display: grid; min-width: 0; }
.sc-name .hint { font-size: .78rem; }
.sc-bar { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.sc-bar span { display: block; height: 100%; background: #16a34a; }
.sc-row.near .sc-bar span { background: #f59e0b; }
.sc-row.over { border-color: var(--error); }
.sc-row.over .sc-bar span { background: var(--error); }
.sc-row.over .sc-count { color: var(--error); font-weight: 600; }
.sc-row.sms .sc-bar span { background: var(--accent); }
.sc-count { font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
@media (max-width: 560px) { .sc-row { grid-template-columns: 1fr; gap: 6px; } }
.og-warnings { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.og-warnings li { padding: 8px 12px; border-radius: 8px; font-size: .92rem; }
.og-error { background: var(--error-soft); color: var(--error); }
.og-warn { background: #fff7e0; color: #7a5400; }
.og-info { background: var(--accent-soft); color: var(--text); }
.og-ok { background: #e8f5e9; color: #1b5e20; }
@media (prefers-color-scheme: dark) { .og-warn { background: #3a3016; color: #f3d48a; } .og-ok { background: #1b3320; color: #a5d6a7; } }
.og-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.og-fig { margin: 0; display: grid; gap: 6px; align-content: start; }
.og-fig figcaption { font-weight: 600; font-size: .85rem; color: var(--muted); }
.og-card { border: 1px solid #dadde1; border-radius: 10px; overflow: hidden; background: #fff; color: #1c1e21; font-family: system-ui, sans-serif; }
.og-text { display: grid; gap: 2px; padding: 10px 12px; min-width: 0; }
.og-text strong { font-size: .95rem; line-height: 1.3; }
.og-domain { font-size: .75rem; color: #65676b; }
.og-desc { font-size: .85rem; color: #65676b; }
.og-img-wide { width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; display: block; background: #e4e6eb; }
.og-img-square { width: 96px; height: 96px; object-fit: cover; flex: none; background: #e4e6eb; }
.og-noimg { display: grid; place-items: center; color: #8a8d91; font-size: .8rem; text-align: center; }
.og-fb .og-text { background: #f0f2f5; }
.og-x { border-radius: 16px; position: relative; }
.og-x-small, .og-wa-card { display: flex; }
.og-wa { background: #d9fdd3; border-radius: 10px; padding: 6px; display: grid; gap: 4px; }
.og-wa-card { background: #f0f0f0; border: none; border-radius: 8px; }
.og-wa-link { font-size: .85rem; color: #027eb5; overflow-wrap: anywhere; padding: 0 4px; }
.og-google { background: #fff; color: #202124; border-radius: 10px; padding: 12px 14px; border: 1px solid #dadce0; font-family: Arial, sans-serif; }
.og-g-site { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.og-g-site img { width: 26px; height: 26px; border-radius: 50%; background: #f1f3f4; padding: 4px; }
.og-g-site .hint { color: #4d5156; overflow-wrap: anywhere; }
.og-g-title { display: block; color: #1a0dab; font-size: 1.15rem; margin: 6px 0 2px; text-decoration: none; }
.og-google .og-desc { margin: 0; color: #4d5156; }

/* Generators */
.big-output { display: block; font-size: 1.5rem; font-weight: 600; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); overflow-wrap: anywhere; min-height: 1.5em; }
.meter { height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.meter span { display: block; height: 100%; transition: width .2s; }
.meter .weak { background: #dc2626; } .meter .fair { background: #f59e0b; } .meter .strong { background: #16a34a; } .meter .great { background: #0f766e; }
.more-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.more-list li span { margin-inline-end: 10px; overflow-wrap: anywhere; }
.fd-columns { display: grid; gap: 6px; }
.fd-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; }
.fd-col input, .fd-col select, .inv-item input, .sig-fields input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); width: 100%; }
.fd-preview { overflow-x: auto; max-width: 100%; }
.fd-table { font-size: .82rem; white-space: nowrap; }
.fd-table th, .fd-table td { text-align: start; }
.sig-layout, .inv-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .sig-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .inv-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .sig-side, .inv-side { position: sticky; top: 76px; }
}
.sig-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.sig-preview { background: #fff; color: #333; border: 1px solid var(--border); border-radius: 12px; padding: 18px; overflow-x: auto; }
.how-to { margin: 8px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: .9rem; }
.inv-items { display: grid; gap: 6px; }
.inv-item { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 32px; gap: 8px; align-items: center; }
.inv-head { margin-bottom: -2px; }
.inv-total { font-size: 1.3rem; }
.inv-preview { width: 100%; height: 760px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.cp-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cp-swatch { min-height: 220px; border-radius: 12px; padding: 12px; display: grid; align-content: end; gap: 4px; position: relative;
  border: 1px solid rgba(0, 0, 0, .08); }
.cp-swatch.locked { outline: 3px solid var(--accent); outline-offset: 2px; }
.cp-hex { font: inherit; font-size: 1.15rem; font-weight: 700; background: none; border: none; color: inherit; text-align: start; padding: 0; cursor: pointer; }
.cp-detail, .cp-contrast { font-size: .75rem; opacity: .85; }
.cp-lock { position: absolute; top: 10px; inset-inline-end: 10px; border: none; background: rgba(255, 255, 255, .75); border-radius: 8px; width: 34px; height: 34px;
  cursor: pointer; font-size: 1rem; }
.bc-box { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: grid; place-items: center; overflow-x: auto; }
.bc-box svg { max-width: 100%; height: auto; }
#bc-status.bad { color: var(--error); }
.tm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tm-team { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.tm-team ol { margin: 6px 0 0; padding-inline-start: 20px; }

/* ---- network & website tools */
.net-lookup { display: grid; gap: 10px; }
.net-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.net-row .field { flex: 1 1 280px; }
.net-input { width: 100%; }
.net-out { display: grid; gap: 14px; }
.net-out:empty { display: none; }
.net-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); }
.net-banner > div { display: grid; gap: 2px; }
.net-banner strong { font-size: 1.15rem; }
.net-banner span:not(.net-dot) { color: var(--muted); font-size: .92rem; }
.net-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.net-banner.up { background: #e8f5e9; border-color: #c8e6c9; } .net-banner.up .net-dot { background: #2e7d32; box-shadow: 0 0 0 4px #c8e6c9; }
.net-banner.warn { background: #fff7e0; border-color: #ffe7a3; } .net-banner.warn .net-dot { background: #d18b00; box-shadow: 0 0 0 4px #ffe7a3; }
.net-banner.down { background: var(--error-soft); border-color: #f6c9c9; } .net-banner.down .net-dot { background: var(--error); box-shadow: 0 0 0 4px #f6c9c9; }
.tagchip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 999px; font-size: .8rem; border: 1px solid var(--border);
  font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.tagchip.on { background: var(--accent-soft); border-color: transparent; font-weight: 600; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.table-scroll { overflow-x: auto; max-height: 560px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.table-scroll .calc-table th, .table-scroll .calc-table td { text-align: start; }
.dns-table td, .dns-table th, .port-table td, .port-table th { text-align: start !important; overflow-wrap: anywhere; }
.dns-table td:nth-child(3) { max-width: 520px; }
.risk { color: var(--error); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.bad { color: var(--error); }
.mono.small { font-size: .8rem; white-space: pre-wrap; opacity: .85; margin-top: 4px; }
.bin b { color: var(--accent); }
details.raw summary { cursor: pointer; color: var(--muted); }
details.raw pre { max-height: 420px; overflow: auto; white-space: pre-wrap; font-size: .8rem; }
.ip-card { display: grid; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.ip-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ip-big { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 700; overflow-wrap: anywhere; }
/* timing bars */
.tbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--border); min-width: 120px; }
.tbar-cell { width: 34%; }
.ph-dns { background: #0ea5e9; } .ph-connect { background: #f59e0b; } .ph-tls { background: #8b5cf6; } .ph-wait { background: #22c55e; } .ph-download { background: #64748b; }
.tlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); }
.tlegend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
/* security headers */
.grade-row { display: flex; align-items: center; gap: 14px; }
.grade { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; font-size: 1.7rem; font-weight: 800; color: #fff; flex: none; }
.g-A { background: #2e7d32; } .g-B { background: #7cb342; } .g-C { background: #f9a825; } .g-D { background: #ef6c00; } .g-F { background: #c62828; }
.sec-table .mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .8rem; color: #fff; }
.sec-table tr.pass .mark { background: #2e7d32; } .sec-table tr.part .mark { background: #f9a825; } .sec-table tr.fail .mark { background: #c62828; }
.sec-table th { width: 34%; color: var(--text); }
.sec-table td .mono { display: block; margin-top: 4px; font-size: .85rem; overflow-wrap: anywhere; }
.headers-table th { width: 28%; color: var(--text); }
.headers-table td { font-size: .85rem; }
/* redirect chain */
.hops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.hop { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; position: relative; }
.hop:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 25px; top: 44px; bottom: -10px; border-inline-start: 2px dashed var(--border); }
.hop-code { flex: none; width: 52px; text-align: center; padding: 6px 0; border-radius: 8px; font-weight: 700; font-size: .9rem; color: #fff; background: #64748b; }
.hop.s2 .hop-code { background: #2e7d32; } .hop.s3 .hop-code { background: #0369a1; } .hop.meta .hop-code { background: #7c3aed; font-size: .75rem; }
.hop.s4 .hop-code, .hop.s5 .hop-code { background: #c62828; }
.hop-body { display: grid; gap: 2px; min-width: 0; }
.hop-body a, .hop-body .mono { overflow-wrap: anywhere; }
.chain { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
/* status codes */
.code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.code-card { border: 1px solid var(--border); border-inline-start: 5px solid #64748b; border-radius: 10px; padding: 10px 14px; display: grid; gap: 4px; }
.code-card p { margin: 0; font-size: .92rem; }
.code-card.c1 { border-inline-start-color: #64748b; } .code-card.c2 { border-inline-start-color: #2e7d32; } .code-card.c3 { border-inline-start-color: #0369a1; }
.code-card.c4 { border-inline-start-color: #ef6c00; } .code-card.c5 { border-inline-start-color: #c62828; }
.code-head { display: flex; gap: 10px; align-items: baseline; }
.code-num { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.code-name { font-weight: 600; }
tr.blocked td:nth-child(2) { color: var(--error); font-weight: 600; } tr.allowed td:nth-child(2) { color: var(--success); font-weight: 600; }

/* ---- design tools */
.checker { background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 20px 20px; }
.color-pair { display: flex; gap: 8px; align-items: center; }
.color-pair input[type="color"] { width: 48px; height: 38px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); flex: none; }
.color-text { width: 9ch; }
.slider-field { min-width: 170px; }
.export-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.small-code { max-height: 140px; overflow: auto; font-size: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; }
/* color converter */
.cc-big { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cc-big > div:last-child { display: grid; gap: 4px; justify-items: start; }
.cc-big strong { font-size: clamp(1.2rem, 4vw, 1.8rem); overflow-wrap: anywhere; }
.cc-swatch { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); flex: none; }
.cc-swatch span { display: block; width: 100%; height: 100%; }
.cc-sample { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .85rem; }
.cc-shades { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.cc-shade { border: 2px solid transparent; border-radius: 8px; padding: 14px 4px; font: inherit; font-size: .75rem; cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.cc-shade.on { border-color: var(--text); }
/* contrast checker */
.ct-head { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 14px; }
@media (max-width: 600px) { .ct-head { grid-template-columns: 1fr; } }
.ct-ratio { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; align-content: center; gap: 4px; }
.ct-ratio strong { font-size: 2rem; font-variant-numeric: tabular-nums; }
.ct-ratio span { color: var(--muted); }
.ct-preview { border-radius: 12px; padding: 18px; border: 1px solid var(--border); }
.ct-btn { display: inline-block; margin-top: 6px; padding: 6px 14px; border: 2px solid; border-radius: 8px; font-weight: 600; }
.ct-table .mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: .8rem; color: #fff; }
.ct-table tr.pass .mark { background: #2e7d32; } .ct-table tr.fail .mark { background: #c62828; }
.ct-table th { width: 38%; color: var(--text); }
.ct-suggest { display: grid; gap: 8px; }
.ct-use { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; vertical-align: middle; }
.ct-use span { background: rgba(255, 255, 255, .85); color: #111; padding: 1px 6px; border-radius: 4px; font-size: .8rem; }
/* color blindness */
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cb-fig { margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cb-fig canvas { display: block; width: 100%; height: auto; }
.cb-fig figcaption { padding: 8px 10px; font-size: .88rem; }
.cb-swatches { display: flex; height: 90px; } .cb-swatches span { flex: 1; }
/* glass + soft UI */
.fx-stage { position: relative; height: 320px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.fx-blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.fx-blob.b1 { width: 180px; height: 180px; background: #f472b6; top: 30px; left: 12%; }
.fx-blob.b2 { width: 220px; height: 220px; background: #22d3ee; bottom: -40px; right: 14%; }
.fx-blob.b3 { width: 120px; height: 120px; background: #facc15; top: 50%; left: 55%; }
.fx-stage.no-blobs .fx-blob { display: none; }
.gl-card { position: relative; width: min(340px, 80%); padding: 26px; display: grid; gap: 6px; }
.gl-card p { margin: 0; }
.nm-stage { height: 360px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--border); }
.nm-box { display: grid; place-items: center; font-weight: 600; }
/* patterns + svg */
.pt-preview { height: 240px; border-radius: 14px; border: 1px solid var(--border); }
.pt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pt-tile { height: 74px; border-radius: 10px; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: end; padding: 4px; }
.pt-tile span { background: var(--surface); color: var(--text); font-size: .75rem; border-radius: 6px; padding: 1px 6px; }
.pt-tile.on { border-color: var(--accent); outline: 2px solid var(--accent); }
.svg-tool { display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .svg-tool { grid-template-columns: 1fr; } }
.svg-preview { border-radius: 14px; border: 1px solid var(--border); aspect-ratio: 1; display: grid; place-items: center; padding: 16px; }
.svg-preview svg { width: 100%; height: 100%; }
.wave-preview { border-radius: 14px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.wave-preview svg { display: block; width: 100%; height: auto; aspect-ratio: 1440 / 320; }
.grad-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.grad-tile { height: 64px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; display: flex; align-items: end; padding: 4px; }
.grad-tile span { background: rgba(255, 255, 255, .85); color: #111; font-size: .72rem; border-radius: 6px; padding: 1px 6px; }
/* fonts */
.fp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.fp-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.fp-sample h3 { margin: 0 0 6px; font-size: 1.6rem; line-height: 1.2; }
.fp-sample p { margin: 0; line-height: 1.6; }
.fp-meta { display: grid; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
/* pixel art */
.px-layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .px-layout { grid-template-columns: 1fr; } }
.px-board { border-radius: 10px; border: 1px solid var(--border); overflow: hidden; line-height: 0; }
.px-canvas { width: 100%; height: auto; image-rendering: pixelated; touch-action: none; cursor: crosshair; }
.px-swatches { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.px-swatch { aspect-ratio: 1; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px; cursor: pointer; }
.px-swatch.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.pixelated { image-rendering: pixelated; }
/* ascii */
.ascii-out { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: auto; max-height: 560px; font: 12px/1.1 ui-monospace, Consolas, "Cascadia Mono", monospace; background: #fff; color: #111; }
.ascii-out.dark { background: #0b1020; color: #e5e7eb; }
.ascii-out:empty { display: none; }
.ascii-gallery { display: grid; gap: 8px; }
.ascii-item { text-align: start; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 8px 12px; cursor: pointer; overflow-x: auto; font: inherit; }
.ascii-item pre { margin: 4px 0 0; font: 10px/1.1 ui-monospace, Consolas, monospace; }
/* favicons */
.fv-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fv-icon { margin: 0; display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.fv-icon > div { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 8px; flex: none; }
.fv-icon figcaption { display: grid; font-size: .85rem; min-width: 0; overflow-wrap: anywhere; }
.fv-browser { border-radius: 12px; overflow: hidden; border: 1px solid #d0d4da; font: 13px system-ui, sans-serif; }
.fv-browser.light { background: #dee1e6; color: #1f1f1f; } .fv-browser.dark { background: #202124; color: #e8eaed; border-color: #3c4043; }
.fv-tabbar { display: flex; gap: 2px; padding: 8px 8px 0; }
.fv-tab { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px 10px 0 0; width: 220px; max-width: 45%; }
.fv-tab span:not(.fv-dot) { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fv-tab i { font-style: normal; opacity: .6; font-size: 11px; }
.fv-browser.light .fv-tab.on { background: #fff; } .fv-browser.dark .fv-tab.on { background: #35363a; }
.fv-dot { width: 16px; height: 16px; border-radius: 50%; background: #9aa0a6; flex: none; }
.fv-addr { padding: 6px 10px; } .fv-addr span { display: block; border-radius: 99px; padding: 6px 14px; }
.fv-browser.light .fv-addr { background: #fff; } .fv-browser.light .fv-addr span { background: #f1f3f4; }
.fv-browser.dark .fv-addr { background: #35363a; } .fv-browser.dark .fv-addr span { background: #202124; }
.fv-bookmarks { display: flex; gap: 16px; padding: 4px 14px 8px; }
.fv-browser.light .fv-bookmarks { background: #fff; } .fv-browser.dark .fv-bookmarks { background: #35363a; }
.fv-bookmarks span { display: flex; gap: 6px; align-items: center; }
.fv-search { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; color: #202124; max-width: 640px; font-family: system-ui, sans-serif; }
.fv-site { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.fv-favicon { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; border: 1px solid #ecedef; display: grid; place-items: center; }
.fv-search .og-g-title { display: block; margin-top: 6px; color: #1a0dab; font-size: 20px; }
.fv-phones { display: flex; gap: 28px; padding: 24px; border-radius: 14px; background: linear-gradient(160deg, #1e3a8a, #7c3aed 60%, #db2777); flex-wrap: wrap; }
.fv-home { display: grid; justify-items: center; gap: 6px; color: #fff; font: 12px system-ui, sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.fv-home img { width: 64px; height: 64px; object-fit: cover; background: #fff; }
.fv-home.ios img { border-radius: 22%; } .fv-home.android img { border-radius: 50%; }
.fv-sizes { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.fv-sizes figure { margin: 0; display: grid; justify-items: center; gap: 4px; }
.fv-sizes figure > div { padding: 6px; border-radius: 6px; line-height: 0; }
/* banners + frames */
.bn-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.bn-canvas { width: 100%; height: auto; }
.pf-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .pf-layout { grid-template-columns: 1fr; } }
.pf-board { border-radius: 14px; border: 1px solid var(--border); padding: 10px; line-height: 0; }
.pf-canvas { width: 100%; height: auto; cursor: grab; touch-action: none; }

/* ---- audio & video */
.media-panel { display: grid; gap: 10px; margin: 6px 0 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.mp-audio { width: 100%; }
.mp-video { width: 100%; max-height: 420px; background: #000; border-radius: 10px; }
.mp-wave { width: 100%; height: 110px; border-radius: 8px; background: var(--accent-soft); cursor: pointer; }
.mp-controls { display: grid; gap: 8px; }
.mp-slider { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.mp-slider input { width: 100%; accent-color: var(--accent); }
.mp-silences { display: flex; flex-wrap: wrap; gap: 4px; }
.mp-silences .tagchip { cursor: pointer; background: #fde2e7; border-color: transparent; color: #9f1239; }
.wf-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.wf-canvas { width: 100%; height: auto; min-height: 60px; }
.mt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
@media (max-width: 760px) { .mt-layout { grid-template-columns: 1fr; } }
.mt-cover { width: 200px; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.se-tools { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.se-tools label { font-size: .9rem; }
.se-list { display: grid; gap: 6px; max-height: 620px; overflow-y: auto; }
.se-row { display: grid; grid-template-columns: 36px 120px 120px minmax(0, 1fr) 70px; gap: 6px; align-items: start; padding: 4px; border-radius: 8px; }
.se-row.has-issue { background: #fff7e0; }
.se-row textarea { min-height: 44px; }
.se-num { color: var(--muted); font-size: .85rem; padding-top: 8px; text-align: end; }
.se-time { font-size: .82rem; }
.se-actions { display: flex; gap: 2px; }
@media (max-width: 700px) { .se-row { grid-template-columns: 30px 1fr 1fr; } .se-row textarea { grid-column: 1 / -1; } .se-actions { grid-column: 1 / -1; } }
@media (prefers-color-scheme: dark) { .se-row.has-issue { background: #3a3016; } .mp-silences .tagchip { background: #4a1f2a; color: #fecdd3; } }
/* ---- SEO */
.serp { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; color: #202124; font-family: Arial, sans-serif; max-width: 652px; }
.serp.mobile { max-width: 400px; }
.serp-title { display: block; color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 6px 0 4px; }
.serp-desc { margin: 0; font-size: 14px; line-height: 1.58; color: #4d5156; }
.serp-desc b { color: #202124; }
.serp-wrap { display: grid; gap: 10px; }
.sg-pairs { display: grid; gap: 8px; }
.sg-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 32px; gap: 8px; align-items: start; }
.hl-row { grid-template-columns: 140px minmax(0, 1fr) 32px; }
.field.wide { grid-column: 1 / -1; }
.rg-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; margin: 8px 0; }
tr.lk-broken td:nth-child(2) { color: var(--error); font-weight: 600; } tr.lk-blocked td:nth-child(2) { color: #b45309; } tr.lk-ok td:nth-child(2) { color: var(--success); }
.hv-extract { margin: 6px 0 0; padding: 6px 8px; background: rgba(0, 0, 0, .05); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hv-extract mark { background: #fde047; color: #111; }
.heading-outline li { font-size: .9rem; }
@media (prefers-color-scheme: dark) {
  .net-banner.up { background: #16301e; border-color: #24502f; } .net-banner.up .net-dot { box-shadow: 0 0 0 4px #24502f; background: #66bb6a; }
  .net-banner.warn { background: #3a3016; border-color: #5a4a1c; } .net-banner.warn .net-dot { box-shadow: 0 0 0 4px #5a4a1c; background: #f3c14a; }
  .net-banner.down { border-color: #5a2a2f; } .net-banner.down .net-dot { box-shadow: 0 0 0 4px #5a2a2f; }
}

[hidden] { display: none !important; }

@media (max-width: 480px) {
  .panel { padding: 16px; }
  .hero { padding: 20px 0 16px; }
  .grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ languages --- */
.main-nav { order: 1; }
.lang-menu { order: 2; position: relative; flex: none; }
.menu-btn { order: 3; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px;
  color: var(--muted); font-size: .9rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary, .lang-menu summary:hover { color: var(--text); }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px; width: max-content; max-width: min(92vw, 360px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-list a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .92rem; }
.lang-list a:hover { background: var(--accent-soft); }
.lang-list a[aria-current] { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
@media (max-width: 1060px) { .lang-menu { margin-inline-start: auto; } .menu-btn { margin-inline-start: 0; } }

.lang-suggest {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 50; max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(20, 24, 40, .18);
}
.lang-suggest[hidden] { display: none; }
.lang-suggest span { flex: 1; }

/* "Free · No sign-up · Works on any device" */
.free-line { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: .85rem; }
.hero .free-line { justify-content: center; margin-top: 12px; }
.free-line li {
  padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.free-line li::before { content: "✓ "; }
.free-line li:first-child { background: #e7f6ec; color: #1b6e35; }
@media (prefers-color-scheme: dark) { .free-line li:first-child { background: #183424; color: #86d39c; } }

/* ------------------------------------------- about / how-to / FAQ part --- */
.about { max-width: 820px; margin: 40px auto 0; padding-top: 8px; border-top: 1px solid var(--border); }
.about h2 { font-size: 1.2rem; margin: 26px 0 10px; }
.about p { margin: 0 0 10px; }
.about .steps, .about .about-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .85rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; }
[dir="rtl"] .crumbs li:not(:last-child)::after { content: "‹"; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .88rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 14px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 2px; color: var(--muted); }

/* ------------------------------------------------------------- footer --- */
.footer-cols { max-width: 1120px; margin: 0 auto 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; text-align: start; }
.footer-cols h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; color: var(--muted); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-cols a { color: var(--muted); text-decoration: none; }
.footer-cols a:hover, .footer-cols a[aria-current] { color: var(--accent); }
.site-footer p { margin: 6px 0; }
@media (max-width: 640px) { .footer-cols { grid-template-columns: 1fr; } }

/* -------------------------------------------------- right-to-left pages --- */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] pre, [dir="rtl"] code, [dir="rtl"] kbd,
[dir="rtl"] input[type="url"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"], [dir="rtl"] input[type="color"] { direction: ltr; }
[dir="rtl"] pre { text-align: left; }

/* ======================================================================

/* ======================================================================
   Toolipedia — "app launcher on dark"
   A deep indigo canvas where every tool category glows in its own color,
   like a home screen full of colorful app icons. Dark is the identity;
   a light theme is available via :root[data-theme="light"].
   ====================================================================== */
@font-face { font-family: "TP Display"; font-weight: 500 700; font-display: swap;
  src: url(/vendor/fonts-2026-11/space-grotesk-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "TP Display Bold"; font-weight: 700; font-display: swap;
  src: url(/vendor/fonts-2026-11/space-grotesk-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "TP Sans"; font-weight: 400; font-display: swap;
  src: url(/vendor/fonts-2026-11/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "TP Sans"; font-weight: 600; font-display: swap;
  src: url(/vendor/fonts-2026-11/ibm-plex-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "TP Sans"; font-weight: 400; font-display: swap;
  src: url(/vendor/fonts-2026-11/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "TP Sans"; font-weight: 600; font-display: swap;
  src: url(/vendor/fonts-2026-11/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "TP Display AR"; font-weight: 700; font-display: swap;
  src: url(/vendor/fonts-2026-11/cairo-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --bg: #0b0d1a;
  --bg-2: #0e1120;
  --surface: #161a2e;
  --surface-2: #1e2238;
  --text: #eef0ff;
  --muted: #9aa0c2;
  --border: #272c47;
  --border-soft: #1f243b;
  --accent: #7c5cff;
  --accent-strong: #9a80ff;
  --accent-text: #0b0d1a;
  --accent-soft: #211d44;
  --success: #34d399;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lift: 0 18px 50px -20px rgba(0,0,0,.8);
  --sec: var(--accent);
  --font-display: "TP Display Bold", "TP Display AR", "TP Sans", system-ui, sans-serif;
  --font: "TP Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
}
:lang(ar) .brand, :lang(ar) h1, :lang(ar) .h1, :lang(ar) h2, :lang(ar) .section-title, :lang(fa) h1, :lang(fa) h2 { --font-display: "TP Display AR", "TP Sans", sans-serif; }

:root[data-theme="light"] {
  --bg: #f4f5fb; --bg-2: #eceef7; --surface: #ffffff; --surface-2: #f1f3fb; --text: #141829; --muted: #5a6180;
  --border: #e3e6f1; --border-soft: #edeff7; --accent: #6b46ff; --accent-strong: #5a34f5; --accent-text: #ffffff;
  --accent-soft: #eceaff; --success: #15803d; --shadow: 0 1px 2px rgba(20,24,40,.05); --shadow-lift: 0 18px 44px -20px rgba(40,44,90,.35);
}

/* Vivid category colors that glow on the dark canvas */
[data-group="pdf"]        { --sec: #ff5a5f; }
[data-group="documents"]  { --sec: #4f7bff; }
[data-group="images"]     { --sec: #b26bff; }
[data-group="media"]      { --sec: #ff4fa3; }
[data-group="social"]     { --sec: #ff8a3d; }
[data-group="qr"]         { --sec: #8b93b8; }
[data-group="text"]       { --sec: #2dd4bf; }
[data-group="dev"]        { --sec: #7c8aa8; }
[data-group="generators"] { --sec: #ffc247; }
[data-group="cv"]         { --sec: #2dd4bf; }
[data-group="calc"]       { --sec: #4ade80; }
[data-group="design"]     { --sec: #ff6bbc; }
[data-group="seo"]        { --sec: #9b8cff; }
[data-group="network"]    { --sec: #38bdf8; }
[data-group="converters"] { --sec: #a3e635; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(60% 55% at 18% -8%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%),
    radial-gradient(50% 45% at 100% 0%, color-mix(in srgb, #ff4fa3 18%, transparent), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px 64px; }
a { color: var(--accent-strong); }
h1, .h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 2px; }

/* ---------------------------------------------------------------- header --- */
.site-header { position: sticky; top: 0; z-index: 30; margin-bottom: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--border-soft); }
.header-inner { display: flex; align-items: center; gap: 14px; max-width: 1240px; margin: 0 auto; padding: 12px 20px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; flex: none; }
.brand .logo { width: 32px; height: 32px; border-radius: 10px; display: block; box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--accent) 70%, transparent); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.nav-icon { font-size: 1rem; line-height: 1; display: none; }
.menu-btn { display: none; font: inherit; font-size: 1.3rem; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.nav-menu { position: relative; }
.nav-menu-btn { font: inherit; font-size: .92rem; font-weight: 500; border: none; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 11px; }
.nav-menu-btn:hover, .nav-menu-btn.current { color: var(--text); background: var(--surface); }
.caret { font-size: .7rem; transition: transform .15s; }
.nav-menu.open .caret { transform: rotate(180deg); }
.nav-sub { display: none; position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lift); }
.nav-menu.open .nav-sub { display: grid; gap: 2px; }
.nav-sub .nav-icon { display: inline; width: 1.5em; text-align: center; }
.nav-sub .nav-link { color: var(--muted); }
.nav-sub .nav-link:hover { color: var(--text); }
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 11px; color: var(--muted); font-size: .9rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary, .lang-menu summary:hover { color: var(--text); }
.lang-list { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px; width: max-content; max-width: min(92vw, 360px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lift); }
.lang-list a { display: block; padding: 8px 11px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .92rem; }
.lang-list a:hover { background: var(--surface-2); }
.lang-list a[aria-current] { color: var(--accent-strong); font-weight: 600; background: var(--accent-soft); }

@media (max-width: 1060px) {
  .menu-btn { display: grid; place-items: center; margin-inline-start: auto; }
  .lang-menu { margin-inline-start: 0; order: 3; }
  .nav-icon { display: inline; width: 1.5em; text-align: center; }
  .main-nav { display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lift); max-height: calc(100vh - 70px); overflow-y: auto; }
  .main-nav.open { display: flex; }
  .nav-link { padding: 13px; font-size: 1rem; }
  .nav-menu-btn { pointer-events: none; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; padding: 14px 13px 4px; }
  .nav-menu-btn .caret, .nav-menu-btn .nav-icon { display: none; }
  .nav-sub { display: grid !important; position: static; box-shadow: none; border: none; padding: 0; padding-inline-start: 8px; min-width: 0; }
}

/* ------------------------------------------------------------------ hero --- */
.hero { text-align: center; padding: clamp(40px, 8vw, 88px) 0 clamp(28px, 5vw, 48px); }
.hero h1, .hero .h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.02; margin: 0 auto 16px; max-width: 16ch; font-weight: 700; letter-spacing: -.035em; }
.hero p { color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.18rem); max-width: 58ch; margin: 0 auto; }
[data-page="group"] .hero h1, [data-page="group"] .hero .h1 { max-width: none; }
.search { position: relative; max-width: 720px; margin: 30px auto 0; }
.search input { width: 100%; font: inherit; padding-block: 19px; padding-inline: 58px 22px; font-size: 1.1rem; border-radius: 999px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--text); box-shadow: var(--shadow-lift); }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-lift), 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 40px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
.search-icon { position: absolute; inset-inline-start: 22px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; place-items: center; }
.free-line { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: .92rem; }
.free-line li, .free-line li:first-child { background: none; padding: 0; color: var(--muted); font-weight: 500; }
.free-line li::before { content: "✓"; color: var(--success); font-weight: 700; margin-inline-end: 6px; }
.popular { margin: 26px auto 0; max-width: 860px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.popular-label { color: var(--muted); font-size: .88rem; margin-inline-end: 4px; }
.popular ul { list-style: none; margin: 0; padding: 0; display: contents; }
.popular a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 500; }
.popular a:hover { border-color: var(--accent); color: var(--accent-strong); }
[data-page="group"] .popular { display: none; }

/* --------------------------------------------- home: category rail + tiles --- */
.home-layout { display: block; margin-top: 10px; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 4px; margin: 0 0 20px; border: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: .9rem; font-weight: 500; padding: 8px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sec, var(--accent)); box-shadow: 0 0 10px color-mix(in srgb, var(--sec, var(--accent)) 80%, transparent); }
.cat::after { content: attr(data-count); font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; opacity: .8; }
.cat:not([data-group])::before { background: linear-gradient(135deg, var(--accent), #ff4fa3); }
.cat:hover { color: var(--text); border-color: color-mix(in srgb, var(--sec, var(--accent)) 60%, var(--border)); }
.cat[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--sec, var(--accent)) 16%, var(--surface)); border-color: color-mix(in srgb, var(--sec, var(--accent)) 55%, var(--border)); font-weight: 600; }

.section-title { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 38px 0 14px; letter-spacing: -.02em; }
.section-title::before { content: ""; width: 12px; height: 12px; border-radius: 5px; background: var(--sec); box-shadow: 0 0 16px color-mix(in srgb, var(--sec) 75%, transparent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; margin: 0; }
.card { position: relative; display: flex; align-items: flex-start; gap: 15px; padding: 17px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .16s;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, var(--accent)) 60%, transparent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c, var(--accent)) 50%, var(--border)); box-shadow: var(--shadow-lift); outline: none; }
.card:hover::after, .card:focus-visible::after { opacity: 1; }
.card-body { display: block; min-width: 0; }
.card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin: 2px 0 4px; line-height: 1.25; color: var(--text); }
.card p { margin: 0; font-size: .87rem; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* the colored app icon */
.tile { --c: var(--sec, var(--accent)); flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; text-align: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 62%, #ffffff), var(--c) 78%, color-mix(in srgb, var(--c) 72%, #000000));
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .02em; line-height: 1; padding: 4px; overflow: hidden;
  box-shadow: 0 8px 22px -8px var(--c), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 6px rgba(0,0,0,.25);
  text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tile[data-len="mid"] { font-size: .68rem; }
.tile[data-len="long"] { font-size: .55rem; letter-spacing: 0; word-break: break-word; }
.device-badge { display: inline-flex; margin-top: 9px; padding: 2px 9px; border-radius: 999px; font-size: .73rem; font-weight: 600; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
mark { background: color-mix(in srgb, #ffc247 42%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: 0 0 0 1px color-mix(in srgb, #ffc247 40%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 56px 0; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 11px; }
  .categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 8px; }
  .categories::-webkit-scrollbar { display: none; }
  .cat { white-space: nowrap; }
  .popular { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; margin-inline: -20px; padding-inline: 20px; }
  .popular::-webkit-scrollbar { display: none; }
  .popular-label { display: none; }
}

/* ------------------------------------------------------------- tool pages --- */
#tool, #text, #qr { max-width: 1040px; margin-inline: auto; }
#tool { max-width: 800px; }
.back { display: inline-block; margin: 18px 0 8px; color: var(--muted); text-decoration: none; font-size: .92rem; }
.back:hover { color: var(--text); }
.tool-head { text-align: center; margin: 10px 0 28px; }
.tool-head .chips { justify-content: center; min-height: 27px; }  /* the script fills it in: reserved so the form does not jump down */
.tool-head h1, .tool-head .h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; margin: 14px 0 10px; font-weight: 700; letter-spacing: -.035em; }
.tool-head p { font-size: 1.08rem; color: var(--muted); max-width: 62ch; margin-inline: auto; }
.tool-head .free-line { margin-top: 16px; }
.chip { font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #fff; padding: 4px 9px; border-radius: 7px; }
.arrow { color: var(--muted); }
.panel { max-width: none; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.drop { border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 18px; padding: clamp(30px, 6vw, 52px) 16px; text-align: center;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); transition: border-color .15s, background .15s; cursor: pointer; }
.drop:hover, .drop:focus-visible, .drop.dragging { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop.dragging { border-style: solid; }
.drop-icon { color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; }
#drop-title, .drop strong { display: inline-block; padding: 10px 20px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 86%, #000); color: #fff; font-weight: 600; margin-bottom: 4px; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 75%, transparent); }
#drop-sub { display: block; color: var(--muted); margin-top: 8px; }
.hint { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); min-width: 0; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.icon-btn { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; width: 30px; height: 30px; border-radius: 8px; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.options { display: grid; gap: 15px; }
.options:empty { display: none; }
.field { display: grid; gap: 6px; }
.field label, .field-label { font-weight: 600; font-size: .9rem; }
.field .hint { margin: 0; }
select, .field input, input[type="text"], input[type="number"], input[type="url"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="search"]:not(#search), textarea {
  font: inherit; width: 100%; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); min-height: 44px; }
select:focus, .field input:focus, textarea:focus, input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[type="color"] { min-height: 44px; height: 44px; padding: 4px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } input[type="color"]::-webkit-color-swatch { border: none; border-radius: 9px; } input[type="color"]::-moz-color-swatch { border: none; border-radius: 9px; }
.btn { font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 13px; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; text-align: center; display: inline-block; overflow-wrap: anywhere; }
.btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.btn-primary { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); border: none; color: #fff; box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--accent) 85%, transparent); }
.btn-primary:not(:disabled):hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-small { padding: 8px 14px; font-size: .88rem; }
.btn-big { width: 100%; font-size: 1.05rem; padding: 15px 20px; }
#convert-btn { width: 100%; padding: 15px 20px; font-size: 1.05rem; }
.progress .bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); transition: width .2s; }
.progress .bar.indeterminate span { width: 35%; animation: tp-slide 1.2s ease-in-out infinite; }
@keyframes tp-slide { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
.result { display: grid; gap: 10px; text-align: center; }
.result p:first-child { margin: 0; color: var(--success); font-weight: 600; font-size: 1.08rem; }
.error { margin: 0; padding: 13px; border-radius: 13px; background: color-mix(in srgb, #ff5a5f 15%, var(--surface)); color: #ff9a9e; border: 1px solid color-mix(in srgb, #ff5a5f 30%, transparent); }
.where-note { text-align: center; }
.tabs { display: flex; gap: 6px; justify-content: center; margin: 0 auto 22px; padding: 5px; width: fit-content; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.tab { padding: 9px 18px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.tab[aria-selected="true"] { background: var(--accent); color: #fff; }
.success-note { margin: 0; padding: 11px 13px; border-radius: 12px; background: color-mix(in srgb, var(--success) 15%, var(--surface)); color: var(--success); font-size: .9rem; }
.warning { margin: 0; padding: 11px 13px; border-radius: 12px; background: color-mix(in srgb, #ffc247 15%, var(--surface)); color: #ffd27a; }

/* --------------------------------------------- about: how-to, FAQ, related --- */
.about { max-width: 820px; margin: 60px auto 0; padding: 0; border-top: none; }
.crumbs { margin-bottom: 20px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin-inline-start: 6px; }
[dir="rtl"] .crumbs li:not(:last-child)::after { content: "‹"; }
.about h2 { font-size: 1.4rem; font-weight: 700; margin: 38px 0 14px; }
.about p { color: var(--muted); max-width: 68ch; }
.about .steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 10px; }
.about .steps li { counter-increment: step; display: flex; gap: 13px; align-items: flex-start; padding: 15px 17px; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; }
.about .steps li::before { content: counter(step); flex: none; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: #fff; font-weight: 700; font-size: .85rem; }
.about .about-list { padding: 0; list-style: none; display: grid; gap: 9px; }
.about .about-list li { position: relative; padding-inline-start: 28px; color: var(--muted); }
.about .about-list li::before { content: "✓"; position: absolute; inset-inline-start: 4px; color: var(--success); font-weight: 700; }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .88rem; }
.faq { display: grid; gap: 9px; border: none; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 19px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(1px); }
.faq details p { margin: 0; padding: 0 19px 17px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 9px; }
.link-list a { display: block; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); font-weight: 500; }
.link-list a:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------------------------------------------------------------- footer --- */
.site-footer { margin-top: 80px; background: var(--bg-2); border-top: 1px solid var(--border-soft); text-align: start; padding: 48px 20px 32px; color: var(--muted); font-size: .9rem; }
.footer-cols { max-width: 1240px; margin: 0 auto 20px; display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 28px; }
.footer-cols h2 { font-family: var(--font-display); font-size: 1rem; color: var(--text); margin: 0 0 10px; text-transform: none; letter-spacing: -.01em; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px 16px; }
.footer-cols a { color: var(--muted); text-decoration: none; }
.footer-cols a:hover, .footer-cols a[aria-current] { color: var(--accent-strong); }
.site-footer > p { max-width: 1240px; margin: 6px auto; }
.copyright { font-family: var(--font-display); }
@media (max-width: 640px) { .footer-cols { grid-template-columns: 1fr; } }

.lang-suggest { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 50; max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
.lang-suggest[hidden] { display: none; }
.lang-suggest span { flex: 1; }

/* -------------------------------------------------- right-to-left + motion --- */
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] pre, [dir="rtl"] code, [dir="rtl"] kbd, [dir="rtl"] input[type="url"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"], [dir="rtl"] input[type="color"] { direction: ltr; }
[dir="rtl"] pre { text-align: left; }
@media (prefers-reduced-motion: reduce) { .card, .drop, .btn, .faq summary::after { transition: none; } .card:hover { transform: none; } .progress .bar.indeterminate span { animation: none; } }

/* ---------------------------------------------------------- scrollbars --- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--muted) 40%, transparent); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 62%, transparent); }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; } }
/* ================================================================= CV builder === */
[data-group="cv"] { --sec: #0f766e; }
.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: start; }
.cv-right { position: sticky; top: 76px; }
@media (max-width: 900px) { .cv-layout { grid-template-columns: 1fr; } .cv-right { position: static; } }

.cv-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.cv-tab { flex: 1; font: inherit; font-weight: 600; font-size: .92rem; padding: 9px; border: none; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.cv-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.cv-panel { display: grid; gap: 14px; }
.cv-group-title { font-size: 1rem; font-weight: 700; margin: 8px 0 2px; }
.cv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .cv-row { grid-template-columns: 1fr; } }

.cv-rep { display: grid; gap: 12px; margin: 6px 0 10px; }
.cv-rep-item { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: var(--surface); }
.cv-rep-head { display: flex; justify-content: space-between; align-items: center; }
.cv-rep-n { font-weight: 600; font-size: .85rem; color: var(--muted); }
.cv-rep-btns { display: flex; gap: 2px; }
.cv-rep-item .field { display: grid; gap: 4px; }
.cv-rep-item :is(input, textarea).cv-half { width: 100%; }
.cv-rep-item .cv-row, .cv-rep-item > .field { margin: 0; }

.cv-phrases { border-top: 1px dashed var(--border); padding-top: 10px; }
.cv-bullets { display: grid; gap: 4px; margin-top: 8px; }
.cv-bullet { text-align: start; font: inherit; font-size: .85rem; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.cv-bullet:hover { border-color: var(--accent); color: var(--accent); }
.cv-extra { border: 1px solid var(--border); border-radius: 12px; padding: 4px 14px; }
.cv-extra summary { cursor: pointer; font-weight: 600; padding: 10px 0; }

/* preview */
.cv-preview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cv-tpl-name { font-weight: 600; color: var(--accent); }
.cv-preview-wrap { aspect-ratio: 1 / 1.414; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lift); background: #fff; }
.cv-preview { width: 100%; height: 100%; border: 0; display: block; }
.cv-export { display: grid; gap: 8px; margin-top: 14px; }
.cv-export-row { display: flex; gap: 8px; }
.cv-export-row .btn { flex: 1; }

/* gallery */
.cv-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cv-filter { font: inherit; font-size: .85rem; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; }
.cv-filter.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cv-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.cv-thumb { border: 2px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); cursor: pointer; overflow: hidden; display: grid; }
.cv-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.cv-thumb-box { aspect-ratio: 1 / 1.414; overflow: hidden; background: #fff; pointer-events: none; }
.cv-thumb-frame { width: 303%; height: 303%; border: 0; transform: scale(.33); transform-origin: top left; }
.cv-thumb-name { padding: 7px; font-size: .82rem; font-weight: 600; text-align: center; }

/* ============================================================ converters === */
.uc { display: grid; gap: 18px; }
.uc-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.uc-kinds .cat.uc-on { color: var(--text); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: var(--accent); font-weight: 600; }
.uc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.uc-col { flex: 1 1 180px; display: grid; gap: 6px; min-width: 0; }
.uc-col > label { font-weight: 600; font-size: .9rem; }
.uc-col .field { gap: 6px; }
.uc-amount { font-size: 1.25rem !important; font-weight: 600; }
.uc-swap { flex: none; height: 46px; padding: 0 16px; font-size: 1.15rem; }
.uc-out { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); display: grid; gap: 6px; }
.uc-result { font-family: var(--font-display); font-size: clamp(1.35rem, 3.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.uc .uc-result:empty { display: none; }
.uc-extra { margin: 0; color: var(--muted); font-weight: 600; }
.uc-extra:empty { display: none; }
.uc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.uc-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.uc .calc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.uc .calc-table th, .uc .calc-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); text-align: start; }
.uc .calc-table td:last-child { font-variant-numeric: tabular-nums; }
.uc .calc-table thead th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.uc .calc-table tbody th { color: var(--muted); font-weight: 500; width: 40%; }
.uc code { font-size: .95rem; overflow-wrap: anywhere; }
.sz-hit td { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 700; }
.tz-list { display: grid; gap: 8px; }
.tz-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.tz-row > div { flex: 1; min-width: 0; }
.tz-time { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }

/* ============================================================ calculators === */
.ce { display: grid; gap: 18px; }
.ce-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ce-inputs .ce-wide { grid-column: 1 / -1; }
.ce-inputs .field[hidden] { display: none; }
.ce-result { display: grid; gap: 14px; }
.ce-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); }
.ce-main-label { width: 100%; color: var(--muted); font-weight: 600; font-size: .9rem; }
.ce-main-value { font-family: var(--font-display); font-size: clamp(1.4rem, 3.6vw, 2.1rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ce-copy { margin-inline-start: auto; }
.ce-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ce-stats .stat { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.ce-stats .stat strong { font-family: var(--font-display); font-size: 1.1rem; overflow-wrap: anywhere; }
.ce-stats .stat span { color: var(--muted); font-size: .82rem; }
.ce .calc-table, .mx-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ce .calc-table th, .ce .calc-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); text-align: start; }
.mx-table { width: auto; }
.mx-table td { padding: 6px 14px; border: 1px solid var(--border-soft); text-align: end; font-variant-numeric: tabular-nums; }

/* scientific calculator */
.sc { max-width: 560px; margin-inline: auto; display: grid; gap: 14px; }
.sc-screen { padding: 16px 18px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--border); display: grid; gap: 4px; }
.sc-display { border: none !important; background: none !important; box-shadow: none !important; font-size: 1.15rem; text-align: end; padding: 0 !important; min-height: 0 !important; color: var(--muted); }
.sc-result { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.sc-result.sc-err { color: #ff9a9e; font-size: 1rem; font-weight: 500; }
.sc-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sc-key { font: inherit; font-weight: 600; padding: 13px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: .95rem; }
.sc-key:hover { border-color: var(--accent); }
.sc-key.sc-num { background: var(--surface); font-size: 1.1rem; }
.sc-key.sc-eq { grid-column: span 2; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); border: none; color: #fff; }
.sc-key.sc-mode { color: var(--accent-strong); }
.sc-history { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.sc-history li { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 420px) { .sc-pad { gap: 6px; } .sc-key { padding: 11px 2px; font-size: .85rem; } }

/* timers */
.timer { display: grid; gap: 16px; justify-items: center; text-align: center; }
.timer-face { font-family: var(--font-display); font-size: clamp(3.2rem, 14vw, 6.5rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-face.timer-done { color: var(--accent-strong); animation: tp-pulse 1s ease-in-out 5; }
@keyframes tp-pulse { 50% { opacity: .35; } }
.timer-presets, .timer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.timer .field { width: min(100%, 320px); text-align: start; }
.pomo-phase { font-weight: 700; color: var(--accent-strong); font-size: 1.1rem; }
.sw-laps { width: min(100%, 420px); margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sw-laps li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wc-card { display: grid; gap: 2px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.wc-city { color: var(--muted); font-weight: 600; font-size: .9rem; }
.wc-time { font-family: var(--font-display); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .timer-face.timer-done { animation: none; } }

/* ============================================================ text kit === */
.ft-input { font-size: 1.15rem !important; }
.ft-list { display: grid; gap: 8px; }
.ft-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.ft-name { color: var(--muted); font-size: .85rem; font-weight: 600; }
.ft-text { font-size: 1.15rem; overflow-wrap: anywhere; }
@media (max-width: 560px) { .ft-row { grid-template-columns: minmax(0, 1fr) auto; } .ft-name { grid-column: 1 / -1; } }
.np-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.np-bar select { width: auto; min-height: 36px; padding: 6px 10px; }
.np-area { min-height: 55vh; font-size: 16px; line-height: 1.6; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.inv-card { display: grid; gap: 6px; align-content: start; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.inv-card p { margin: 0; }
.ws-view { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); font-family: ui-monospace, Consolas, monospace; font-size: .95rem; line-height: 1.7; min-height: 80px; }
.ws-mark { color: var(--accent-strong); opacity: .75; }
.ws-bad { color: #ff7a80; font-weight: 700; font-size: .8em; }
.ui-char { font-size: 1.2rem; text-align: center !important; }
.ui-table td, .ui-table th { white-space: nowrap; }
.cf-bar { display: inline-block; width: 90px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--w), var(--surface-2) var(--w)); vertical-align: middle; }
.hw-canvas { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #fffdf6; }

/* ============================================================ dev kit === */
.csp-out { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.csp-row { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.csp-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.csp-srcs input[type="text"] { flex: 1 1 260px; min-height: 38px; }
.css-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .css-tool { grid-template-columns: 1fr; } }
.css-controls { display: grid; gap: 12px; }
.css-controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.css-side { display: grid; gap: 12px; position: sticky; top: 84px; }
.css-stage { min-height: 260px; display: grid; place-items: center; padding: 30px; border-radius: 18px; background: repeating-conic-gradient(#e9ebf3 0 25%, #ffffff 0 50%) 0 0 / 22px 22px; }
.css-box { width: 160px; height: 120px; background: #ffffff; border-radius: 16px; }
.css-box.css-flex, .css-box.css-grid { width: 100%; height: auto; min-height: 220px; padding: 12px; background: #f4f5fb; border: 2px dashed #b9bfd6; border-radius: 12px; }
.css-item { min-width: 44px; min-height: 44px; padding: 8px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #9a80ff, #7c5cff); color: #fff; font-weight: 700; }
.bz-canvas { width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 14px; background: var(--bg-2); touch-action: none; cursor: grab; }
.bz-track { position: relative; height: 54px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.bz-ball { position: absolute; top: 9px; left: 10px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ffc247, #ff8a3d); transition: left 900ms; }
.bz-ball.bz-end { left: calc(100% - 44px); }
.clamp-sample { margin: 0; font-family: var(--font-display); font-weight: 700; }
.svg-prev-box { min-height: 120px; display: grid; place-items: center; padding: 16px; border-radius: 14px; background: repeating-conic-gradient(#e9ebf3 0 25%, #ffffff 0 50%) 0 0 / 18px 18px; }
.svg-prev { max-width: 100%; max-height: 240px; }
.jd-added td:first-child { color: var(--success); font-weight: 700; }
.jd-removed td:first-child { color: #ff7a80; font-weight: 700; }
.jd-changed td:first-child { color: #ffc247; font-weight: 700; }
.chmod-grid { width: auto; }
.chmod-grid td { text-align: center !important; }
.chmod-grid input { width: 20px; height: 20px; accent-color: var(--accent); }
.gi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.rx-list { display: grid; gap: 10px; }
.rx-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.rx-src { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.rx-src code { overflow-wrap: anywhere; font-size: .85rem; color: var(--accent-strong); }
.rx-test { display: flex; gap: 10px; align-items: center; }
.rx-test input { flex: 1; min-height: 38px; }
.rx-res { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.rx-ok { color: var(--success); } .rx-no { color: #ff7a80; }

/* ---- image kit (photo editing on a canvas) ---- */
.ik-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 20px; align-items: start; }
.ik-controls { display: grid; gap: 12px; align-content: start; }
.ik-main { display: grid; gap: 12px; min-width: 0; }
.ik-stage { border-radius: 12px; border: 1px solid var(--border); padding: 10px; display: grid; place-items: center;
  background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.ik-preview { max-width: 100%; max-height: 70vh; height: auto; display: block; border-radius: 6px; touch-action: none; }
.ik-val { font-variant-numeric: tabular-nums; }
.ik input[type="range"] { width: 100%; }
.ik input[type="color"] { width: 56px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.ed-current { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); }
.ed-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.ef-input { font-size: 28px; width: 110px; text-align: center; }
.ef-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: end; }
.ef-grid figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.ef-grid figcaption { font-size: 12px; color: var(--muted); }
.ef-prev { image-rendering: pixelated; height: auto; }
.ex-gps th, .ex-gps td { color: var(--accent); }
@media (max-width: 760px) { .ik-layout { display: flex; flex-direction: column; } .ik-main { display: contents; } .ik-controls { order: 1; } .ik-main > .text-options, .ik-main > .btn-big { order: 2; } }

/* ---- file pickers as drop zones (ui.js wraps every <input type=file>) ---- */
.filedrop { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 18px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  color: var(--text); transition: border-color .15s, background .15s; }
.filedrop:hover, .filedrop:focus-within, .filedrop.dragging { border-color: var(--accent); background: var(--accent-soft); }
.filedrop.dragging { border-style: solid; }
.filedrop.has-file { border-style: solid; border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.filedrop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; font-size: 0; }
.filedrop-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent); background: var(--accent-soft); }
.filedrop-text { color: var(--muted); }
.filedrop-text strong { color: var(--accent); font-weight: 700; }
.filedrop-name { margin-inline-start: auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92em; color: var(--text); }
.filedrop-name:empty { display: none; }
@media (max-width: 560px) { .filedrop { flex-wrap: wrap; } .filedrop-name { max-width: 100%; margin-inline-start: 0; flex-basis: 100%; } }

/* ---- PDF kit (page grids, previews, signatures, compare) ---- */
.pk-load { display: grid; gap: 4px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.pk-card { position: relative; display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color .15s, transform .15s; }
.pk-card:hover, .pk-card:focus-visible { border-color: var(--accent); outline: none; }
.pk-thumb { width: 100%; aspect-ratio: 1 / 1.3; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: rgba(127,127,127,.12); }
.pk-thumb-c { max-width: 100%; max-height: 100%; height: auto; box-shadow: 0 1px 4px rgba(0,0,0,.35); transition: transform .2s; background: #fff; }
.pk-ph { width: 70%; height: 80%; border-radius: 4px; background: rgba(127,127,127,.2); }
.pk-num { font-size: 13px; font-weight: 700; color: var(--muted); }
.pk-mark .pk-card.is-marked { border-color: var(--accent); background: var(--accent-soft); }
.pk-mark .pk-card.is-marked::after { content: attr(data-mark); position: absolute; top: 10px; inset-inline-end: 10px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); }
.pk-order .pk-card { cursor: grab; }
.pk-card.is-drag { opacity: .4; }
.pk-card.is-over { border-color: var(--accent); transform: scale(1.03); }
.pk-tools { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.pk-tools .btn-small { padding: 2px 8px; min-width: 0; }
.pk-preview { display: grid; gap: 8px; }
.pk-prev { max-width: 100%; height: auto; display: block; box-shadow: 0 2px 12px rgba(0,0,0,.35); background: #fff; }
.pl-canvas { cursor: copy; touch-action: none; }
.pl-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pl-page { width: 70px; }
.pk-pages { display: grid; gap: 6px; }
.pk-action { display: grid; gap: 6px; }
.sg-make { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); }
.sg-pane { display: grid; gap: 8px; justify-items: start; }
.sig-pad { width: 100%; max-width: 720px; aspect-ratio: 10 / 3; height: auto; border-radius: 12px; border: 2px dashed var(--border); background: #fff; cursor: crosshair; touch-action: none; }
.ff-fields { display: grid; gap: 12px; max-width: 620px; }
.pk-diff { display: grid; gap: 4px; font-size: 15px; line-height: 1.5; }
.pk-hunk { margin: 14px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pk-same, .pk-chg, .pk-del, .pk-add { padding: 4px 10px; border-radius: 8px; border-inline-start: 4px solid transparent; }
.pk-same { color: var(--muted); }
.pk-chg { border-color: #ffc247; background: rgba(255,194,71,.08); }
.pk-del { border-color: #ef5350; background: rgba(239,83,80,.12); text-decoration: line-through; }
.pk-add { border-color: #2ecc71; background: rgba(46,204,113,.12); }
.pk-diff del { background: rgba(239,83,80,.3); color: inherit; text-decoration: line-through; border-radius: 3px; }
.pk-diff ins { background: rgba(46,204,113,.3); color: inherit; text-decoration: none; border-radius: 3px; }
.pl-nav .pl-page { width: 76px; min-width: 0; flex: 0 0 auto; padding-inline: 8px; }
.pk input[type="color"] { width: 56px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.pk input[type="range"] { width: 100%; }
.pk .dl-row .btn-small, .pk > .dl-row .btn { flex: 0 0 auto; }
.pk-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
.pk-tools { flex-wrap: nowrap; }
.pk-tools .btn-small { padding: 2px 6px; font-size: 13px; }

[data-group="everyday"] { --sec: #f97316; }
[data-group="arabic"] { --sec: #10b981; }

/* ---- second batch of kits (calcs2, timekit, langkit, devkit2, officekit, funkit, datakit, imgkit2, avkit) ---- */
.rs-k { align-self: end; font: 800 1.6rem var(--font-display, system-ui); color: var(--accent); padding-bottom: 6px; }
.of-chart svg, .dk-diagram svg { max-width: 100%; height: auto; }
.of-chart { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 8px; }
.fg-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fg-stage { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 6px; display: grid; place-items: center; }
.fg-canvas { width: 100%; max-width: 820px; height: auto; border-radius: 8px; touch-action: none; }
.dn-seq { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dn-seq code { overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }
.pn-grid td, .pn-grid th { text-align: center !important; }
/* periodic table */
.pt-wrap { overflow-x: auto; padding-bottom: 6px; }
.pt-grid { display: grid; grid-template-columns: repeat(18, minmax(40px, 1fr)); grid-auto-rows: 46px; gap: 3px; min-width: 780px; }
.pt-el { position: relative; border: 1px solid rgba(127,127,127,.25); border-radius: 6px; background: var(--surface); color: inherit; cursor: pointer; display: grid; place-items: center; padding: 0; }
.pt-el small { position: absolute; top: 2px; left: 4px; font-size: 9px; opacity: .7; }
.pt-el strong { font-size: 1.05rem; }
.pt-el:hover { transform: scale(1.12); z-index: 2; box-shadow: var(--shadow); }
.pt-dim { opacity: .18; }
.pt-alkali { background: #ff8a80; color: #3b0a0a; } .pt-alkaline { background: #ffcc80; color: #3b2300; } .pt-transition { background: #ffe082; color: #3b3000; } .pt-post { background: #b0bec5; color: #10212b; }
.pt-metalloid { background: #80cbc4; color: #062622; } .pt-nonmetal { background: #a5d6a7; color: #0b2a0d; } .pt-halogen { background: #81d4fa; color: #042233; } .pt-noble { background: #ce93d8; color: #2a0b30; }
.pt-lanthanide { background: #f48fb1; color: #3a0a1e; } .pt-actinide { background: #e6a1b5; color: #3a0a1e; }
.pt-info { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.pt-big { width: 130px; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; align-content: center; text-align: center; }
.pt-big small { font-size: .85rem; } .pt-big strong { font-size: 2.8rem; line-height: 1; } .pt-big span { font-size: .95rem; font-weight: 600; }

/* ---- time kit (prayer, qibla, hijri) ---- */
.tk-place { display: grid; gap: 10px; }
.tk-geo { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.tk-prayers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tk-prayer { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 2px; text-align: center; background: var(--surface); }
.tk-prayer span { font-weight: 600; } .tk-prayer small { color: var(--muted); font-size: 1rem; } .tk-prayer strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.tk-prayer.on, .tk-prayer.tk-now { border-color: var(--accent); background: var(--accent-soft); }
.tk-next { font-size: 1.1rem; font-weight: 700; text-align: center; padding: 10px; border-radius: 12px; background: var(--accent-soft); }
.tk-compass-wrap { display: grid; place-items: center; }
.tk-compass { width: min(360px, 100%); height: auto; }
.tk-ar { font-family: "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif; direction: rtl; font-size: 1.15rem; }
.tk-events { display: grid; gap: 10px; }
.tk-event { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; align-items: center; }
.tk-days { text-align: center; grid-row: span 2; grid-column: 2; } .tk-days b { font-size: 2rem; display: block; line-height: 1; } .tk-days small { color: var(--muted); }
.tk-tasbeeh { width: min(300px, 80vw); aspect-ratio: 1; border-radius: 50%; margin: 0 auto; border: 0; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; color: #fff; touch-action: manipulation;
  background: radial-gradient(circle at 30% 28%, #34d399, #059669 60%, #065f46); box-shadow: 0 10px 40px rgba(5,150,105,.45); }
.tk-tasbeeh strong { font-size: 3.6rem; line-height: 1; font-variant-numeric: tabular-nums; } .tk-tasbeeh:active { transform: scale(.97); } .tk-dhikr { font-size: 1.5rem; }
.tk-moon-big { font-size: 5rem; text-align: center; line-height: 1; }
.tk-moons { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.tk-moon-day { border: 1px solid var(--border); border-radius: 10px; padding: 4px; text-align: center; display: grid; } .tk-moon-day small { color: var(--muted); font-size: .7rem; } .tk-moon-day span { font-size: 1.5rem; }

/* ---- language kit ---- */
.lg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-kb { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.lg-kb-row { display: flex; gap: 5px; justify-content: center; }
.lg-key, .lg-wide, .lg-space { min-width: 38px; height: 44px; padding: 0 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 600 1.05rem system-ui, "Noto Sans Arabic", sans-serif; cursor: pointer; flex: 1 1 0; max-width: 56px; }
.lg-wide { max-width: 96px; flex: 1.6 1 0; font-size: .85rem; } .lg-space { max-width: none; flex: 6 1 0; }
.lg-key:hover, .lg-wide:hover, .lg-space:hover { background: var(--accent-soft); } .lg-key:active, .lg-wide:active { transform: translateY(1px); }
.lg-wide.shift, .lg-wide.on, .lg-wide.lg-on { background: var(--accent); color: var(--accent-text); }
.lg-key { position: relative; display: grid; place-items: center; } .lg-key small { position: absolute; top: 2px; inset-inline-end: 4px; font-size: .6rem; font-weight: 600; opacity: .55; }
.lg-key span { font-size: 1.15rem; }
.lg-kb-text { min-height: 120px; font-size: 1.3rem; }
.lg-emoji, .lg-symbols, .lg-kao { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.lg-kao { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.lg-em, .lg-sym { height: 44px; border: 1px solid transparent; border-radius: 10px; background: transparent; font-size: 1.6rem; cursor: pointer; } .lg-em:hover, .lg-sym:hover { background: var(--accent-soft); border-color: var(--border); }
.lg-sym { font-size: 1.3rem; } .lg-kao-btn { padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; }
.lg-kao-btn:hover { background: var(--accent-soft); } .lg-sym-group { display: grid; gap: 6px; }
.lg-picked { font-size: 1.6rem !important; text-align: center; }
.lg-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lg-sticky { position: sticky; top: 8px; z-index: 3; background: var(--surface); padding: 8px; border: 1px solid var(--border); border-radius: 12px; }
.lg-prev, .lg-wa, .lg-discord { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.lg-wa { background: #0b141a; color: #e9edef; } .lg-discord { background: #313338; color: #dbdee1; font-family: ui-monospace, Consolas, monospace; }
.lg-dc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dc-b, .dc-t, .dc-fg, .dc-bg { max-width: 160px; }
.lg-rsvp { text-align: center; font: 700 clamp(2rem, 8vw, 4rem) system-ui, "Noto Sans Arabic", sans-serif; padding: 40px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); min-height: 140px; display: grid; place-items: center; }
.lg-word { display: inline-block; padding: 4px 10px; margin: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.lg-words { display: flex; flex-wrap: wrap; gap: 4px; }
.lg-wordle { display: grid; grid-template-columns: repeat(5, 54px); gap: 6px; justify-content: center; }
.lg-tile { width: 54px; height: 54px; border-radius: 8px; border: 2px solid var(--border); text-transform: uppercase; font: 800 1.6rem system-ui; text-align: center; background: var(--surface); color: var(--text); cursor: pointer; }
.lg-green { background: #538d4e !important; border-color: #538d4e !important; color: #fff !important; } .lg-yellow { background: #b59f3b !important; border-color: #b59f3b !important; color: #fff !important; }

/* ---- developer kit 2 ---- */
.code-input, .av-mono { font-family: ui-monospace, "SF Mono", Consolas, monospace !important; font-size: .88rem; tab-size: 2; }
.dk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .dk-col { width: 56px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.dk-mini { display: grid; gap: 2px; font-size: .8rem; color: var(--muted); }
.dk-code, .dk-console { margin: 0; padding: 12px; border-radius: 12px; background: #0f1226; color: #dfe3ff; overflow: auto; max-height: 340px; font: .85rem/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.dk-hex { font-family: ui-monospace, Consolas, monospace; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
.dk-frame { width: 100%; height: 340px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.dk-prev, .dk-badge, .dk-btn-prev, .dk-loader-prev, .dk-kf-prev, .dk-ts-prev, .dk-filter-img, .dk-pg { display: grid; place-items: center; min-height: 180px; border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: repeating-conic-gradient(rgba(127,127,127,.09) 0 25%, transparent 0 50%) 50% / 20px 20px; overflow: hidden; }
.dk-filter-img { background: none; } .dk-filter-img img { max-width: 100%; max-height: 320px; border-radius: 10px; }
.dk-clip { position: relative; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 14px; padding: 20px; background: var(--surface); }
.dk-clip-shape { width: min(320px, 100%); aspect-ratio: 1; background: linear-gradient(135deg, #7c5cff, #ff4fa3); position: relative; }
.dk-handle { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: grab; touch-action: none; z-index: 2; }
.dk-layer { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.dk-ft { display: grid; gap: 4px; } .dk-totp { text-align: center; font: 800 clamp(2rem, 8vw, 3.4rem) ui-monospace, Consolas, monospace; letter-spacing: .12em; padding: 16px; border-radius: 14px; background: var(--accent-soft); }
.dk-diagram { overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 10px; }
.dk-log { font: .85rem ui-monospace, Consolas, monospace; max-height: 200px; overflow: auto; padding: 8px; }

/* ---- office kit ---- */
.of-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.of-col { border: 1px solid var(--border); border-radius: 14px; padding: 10px; background: var(--bg); display: grid; gap: 8px; min-height: 120px; align-content: start; }
.of-col-title { font-weight: 700 !important; background: transparent !important; border: 0 !important; padding: 2px 4px !important; } .of-count { font-size: .8rem; color: var(--muted); justify-self: end; margin-top: -30px; }
.of-card { background: var(--surface); border: 1px solid var(--border); border-inline-start: 5px solid var(--accent); border-radius: 10px; padding: 10px; display: flex; align-items: start; justify-content: space-between; gap: 6px; cursor: grab; box-shadow: var(--shadow); }
.of-card:active { cursor: grabbing; } .of-card span[contenteditable] { flex: 1; outline: none; overflow-wrap: anywhere; } .of-move { display: flex; gap: 2px; }
.of-add { border: 1px dashed var(--border); background: transparent; color: var(--muted); border-radius: 10px; padding: 8px; cursor: pointer; } .of-add:hover { color: var(--accent); border-color: var(--accent); }
.of-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.of-todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); border-inline-start: 5px solid var(--border); }
.of-todo-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); } .of-todo-text { flex: 1; overflow-wrap: anywhere; }
.of-p3 { border-inline-start-color: #ef4444; } .of-p2 { border-inline-start-color: #f59e0b; } .of-p1 { border-inline-start-color: #22c55e; } .of-done .of-todo-text { text-decoration: line-through; opacity: .55; }
.of-matrix { width: 100%; border-collapse: collapse; } .of-matrix th, .of-matrix td { padding: 6px; border: 1px solid var(--border); text-align: center; }
.of-cell-in { width: 100%; min-width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; } .of-num { width: 64px; padding: 6px; text-align: center; }
.of-total th, .of-total td { background: var(--accent-soft); font-weight: 700; }

/* ---- fun / device tests ---- */
.fn-zone { width: 100%; min-height: 220px; display: grid; place-items: center; text-align: center; border: 2px dashed var(--border); border-radius: 16px; background: var(--surface); color: var(--text); font: 700 1.3rem system-ui; cursor: pointer; user-select: none; touch-action: manipulation; }
.fn-zone:active { background: var(--accent-soft); } .fn-mouse { min-height: 260px; cursor: crosshair; }
.fn-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; font-size: .9rem; }
.fn-mbtns, .fn-pbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-mbtn, .fn-pbtn { min-width: 52px; padding: 8px 10px; text-align: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; }
.fn-mbtn.fn-on, .fn-pbtn.fn-on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.fn-pbtn { opacity: calc(.45 + var(--v, 0) * .55); }
.fn-pad { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 12px; }
.fn-axes { display: flex; gap: 24px; flex-wrap: wrap; } .fn-stick { position: relative; width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); }
.fn-stick span { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--accent); }
.fn-screen { min-height: 420px; border-radius: 14px; border: 1px solid var(--border); display: grid; place-items: center; position: relative; cursor: pointer; overflow: hidden; background: #000; color: #fff; }
.fn-screen:fullscreen { border-radius: 0; min-height: 100vh; } .fn-sharp { padding: 20px; color: #111; text-align: left; } .fn-sharp p { margin: 4px 0; }
.fn-hint { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: .8rem; color: rgba(127,127,127,.9); pointer-events: none; }
.fn-touch, .fn-level { width: 100%; max-width: 560px; height: auto; margin: 0 auto; display: block; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); touch-action: none; }
.fn-big { text-align: center; font: 800 clamp(2.4rem, 9vw, 4.5rem) var(--font-display, system-ui); font-variant-numeric: tabular-nums; }
.fn-speed { text-align: center; font: 900 clamp(4rem, 18vw, 9rem)/1 var(--font-display, system-ui); font-variant-numeric: tabular-nums; color: var(--accent); }
.fn-flash { min-height: 320px; border-radius: 16px; border: 1px solid var(--border); background: #fff; }
.fn-bracket { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 14px; align-items: stretch; }
.fn-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 170px; } .fn-round h4 { margin: 0; text-align: center; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.fn-match { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.fn-team { padding: 8px 10px; border: 0; background: transparent; color: var(--text); text-align: start; cursor: pointer; border-bottom: 1px solid var(--border); } .fn-team:last-child { border-bottom: 0; } .fn-team:hover:not(:disabled) { background: var(--accent-soft); } .fn-team:disabled { opacity: .55; cursor: default; }
.fn-win { background: var(--accent) !important; color: var(--accent-text) !important; font-weight: 700; } .fn-champ { padding: 14px; text-align: center; font-weight: 800; font-size: 1.15rem; border: 2px solid #f59e0b; border-radius: 12px; background: rgba(245,158,11,.12); }
.fn-rr { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; } .fn-rr ul { margin: 6px 0 0; padding-inline-start: 18px; }
.fn-cc-wrap { display: grid; gap: 10px; } .fn-cc { min-height: 150px; border-radius: 18px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; touch-action: manipulation; }
.fn-cc-top { transform: rotate(180deg); } .fn-cc-t { font: 800 clamp(2.6rem, 12vw, 5rem) ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; } .fn-cc.fn-on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } .fn-cc.fn-out { background: #ef4444; color: #fff; }
.fn-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; } .fn-team-box { border-radius: 18px; padding: 16px; color: #fff; display: grid; gap: 10px; justify-items: center; }
.fn-team-name { text-align: center; font-weight: 700; font-size: 1.1rem; background: rgba(255,255,255,.18) !important; border: 0 !important; color: inherit !important; border-radius: 8px; padding: 6px; width: 100%; }
.fn-pts { font: 900 clamp(3rem, 12vw, 6rem)/1 var(--font-display, system-ui); } .fn-mid { display: grid; gap: 10px; align-content: center; justify-items: center; } .fn-clock { font: 800 2rem ui-monospace, Consolas, monospace; } .fn-period { display: flex; gap: 8px; align-items: center; }
.fn-ball { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font: 900 3.4rem system-ui; color: #fff; background: radial-gradient(circle at 30% 28%, #ff8a3d, #e5484d 70%); box-shadow: 0 8px 30px rgba(229,72,77,.4); }
.fn-board { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; } .fn-board span { text-align: center; padding: 4px 0; border-radius: 5px; font-size: .75rem; background: var(--bg); color: var(--muted); } .fn-board .fn-on { background: var(--accent); color: var(--accent-text); font-weight: 800; }
.fn-arena { position: relative; height: 380px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; cursor: crosshair; user-select: none; }
.fn-target { position: absolute; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, #ef4444 19% 38%, #fff 39% 58%, #ef4444 59%); cursor: crosshair; }
.fn-buzzers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } .fn-buzz { min-height: 150px; border: 0; border-radius: 18px; color: #fff; display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; font-weight: 700; touch-action: manipulation; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.fn-buzz strong { font-size: 2.2rem; } .fn-buzz.fn-win { outline: 5px solid #fff; transform: scale(1.04); } .fn-buzz.fn-out { opacity: .35; }
.fn-breath-wrap { display: grid; place-items: center; gap: 14px; min-height: 320px; align-content: center; } .fn-breath { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #67e8f9, #6366f1); transition: transform 1s ease-in-out; box-shadow: 0 0 60px rgba(99,102,241,.45); }
.fn-breath-label { font: 700 1.6rem var(--font-display, system-ui); text-align: center; }
.fn-ring { width: min(280px, 80vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), var(--border) 0); position: relative; }
.fn-ring::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); } .fn-ring > * { position: relative; }
@media (max-width: 640px) { .fn-score { grid-template-columns: 1fr; } .dn-seq { grid-template-columns: 1fr; } .pt-info { grid-template-columns: 1fr; } .dk-grid2 { grid-template-columns: 1fr; } }

/* ---- data kit ---- */
.dt-input { display: grid; gap: 10px; } .dt-input textarea, .dt-cols textarea { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .85rem; white-space: pre; }
.dt-table { max-height: 420px; } .dt-edit { max-height: 520px; } .dt-edit th { vertical-align: top; min-width: 120px; } .dt-edit td { padding: 0; }
.dt-cell, .dt-edit input.dt-cell { width: 100%; min-width: 130px; border: 0 !important; padding: 7px 10px !important; background: transparent !important; box-shadow: none !important; color: inherit; font: inherit; border-radius: 0 !important; } .dt-cell:focus, .dt-edit input.dt-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft) !important; }
.dt-head { font-weight: 700; } .dt-colbtns { display: flex; gap: 2px; justify-content: flex-end; } .dt-rown { white-space: nowrap; min-width: 54px; } .dt-rown span { color: var(--muted); font-size: .8rem; margin-inline-end: 6px; }
.dt-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; } .dt-plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; } .an-sel { width: 100%; }
.dt-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; } .dt-col { display: grid; gap: 6px; } .dt-col-head { display: flex; justify-content: space-between; align-items: center; } .dt-col textarea { width: 100%; }
.dt-a strong { color: #ef4444; } .dt-b strong { color: #22c55e; } .dt-both strong { color: var(--accent); }
.dt-pivot .dt-total td, .dt-pivot .dt-total th { background: var(--accent-soft); font-weight: 700; } .dt-chart { background: #fff; }
.dt-tree { font: .88rem/1.7 ui-monospace, Consolas, monospace; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); max-height: 460px; overflow: auto; }
.dt-node > summary { cursor: pointer; } .dt-kids { padding-inline-start: 18px; border-inline-start: 1px dashed var(--border); margin-inline-start: 6px; } .dt-leaf { overflow-wrap: anywhere; }
.dt-key { color: #7c3aed; } .dt-type { color: var(--muted); } .dt-val { padding: 0 4px; border-radius: 4px; } .dt-val:focus { outline: 1px solid var(--accent); background: var(--accent-soft); }
.dt-string { color: #059669; } .dt-number { color: #d97706; } .dt-boolean { color: #2563eb; } .dt-null { color: var(--muted); font-style: italic; } .dt-hit { background: #fde047; color: #000; border-radius: 3px; }
.dt-path { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); } .dt-errs { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }

/* ---- image kit 2 ---- */
.ih-hist { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #14141c; } .sv-holder { min-height: 220px; background: #fff; }
.sv-holder svg { max-width: 100%; height: auto; }

/* ---- third batch: names, games, developer and writing kits ---- */
.nk-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.nk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.nk-card { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 12px 14px; }
.nk-card:hover { border-color: var(--accent); }
.nk-main { cursor: pointer; display: grid; gap: 3px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nk-main strong { font-size: 1.05rem; } .nk-main small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.nk-star { font-size: 1.2rem; color: #f59e0b; } .nk-img { image-rendering: pixelated; justify-self: start; }
.nk-kept { display: grid; gap: 8px; } .nk-kept-card { background: var(--accent-soft); }
.gm-best td { background: var(--accent-soft); font-weight: 700; }
.gm-braille { display: flex; flex-wrap: wrap; gap: 6px; } .gm-bchar { display: grid; place-items: center; min-width: 40px; padding: 4px; border: 1px solid var(--border); border-radius: 8px; } .gm-bchar b { font-size: 1.5rem; line-height: 1.1; } .gm-bchar small { color: var(--muted); }
.gm-sudoku { display: grid; grid-template-columns: repeat(9, 1fr); width: min(460px, 100%); margin: 0 auto; border: 3px solid var(--text); border-radius: 6px; overflow: hidden; background: var(--surface); }
.gm-cell { width: 100%; aspect-ratio: 1; padding: 0; text-align: center; font: 700 clamp(1rem, 4.5vw, 1.5rem) system-ui; border: 1px solid var(--border) !important; border-radius: 0 !important; background: transparent !important; color: var(--text); box-shadow: none !important; }
.gm-cell:nth-child(3n) { border-right: 2px solid var(--text) !important; } .gm-cell:nth-child(n+19):nth-child(-n+27), .gm-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid var(--text) !important; }
.gm-cell:nth-child(9n) { border-right: 1px solid var(--border) !important; } .gm-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft) !important; }
.gm-solved { color: #10b981 !important; }
.gm-cubenet { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(9, 1fr); gap: 2px; width: min(480px, 100%); margin: 0 auto; }
.gm-sticker { aspect-ratio: 1; border: 1px solid rgba(0,0,0,.45); border-radius: 4px; cursor: pointer; font: 800 .85rem system-ui; color: #111; padding: 0; } .gm-center { cursor: default; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.gm-pal { display: flex; gap: 8px; justify-content: center; } .gm-swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.4); } .gm-swatch.gm-on { border-color: var(--accent); transform: scale(1.12); }
.gm-moves { display: grid; gap: 10px; } .gm-movelist { display: flex; flex-wrap: wrap; gap: 6px; } .gm-move { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); font: 700 1.05rem ui-monospace, Consolas, monospace; } .gm-move.gm-done { opacity: .4; text-decoration: line-through; } .gm-move.gm-now { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.gm-boggle { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: min(360px, 100%); margin: 0 auto; } .gm-bcell { aspect-ratio: 1; text-align: center; text-transform: uppercase; font: 800 clamp(1.3rem, 6vw, 2rem) system-ui; padding: 0; border-radius: 10px; background: #f7e7b4 !important; color: #3b2a00 !important; border: 2px solid #c9a227 !important; } .gm-bcell.gm-path { background: #86efac !important; border-color: #16a34a !important; }
.gm-wordgroup { display: grid; gap: 6px; } .gm-words { display: flex; flex-wrap: wrap; gap: 6px; } .gm-word { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font-size: .9rem; } .gm-word:hover { background: var(--accent-soft); border-color: var(--accent); }
.gm-q { margin: 6px 0 10px; font-size: 1.3rem; } .gm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; } .gm-opt { text-align: start; padding: 14px; } .gm-opt.gm-right { background: #22c55e !important; border-color: #22c55e !important; color: #fff !important; } .gm-opt.gm-wrong { background: #ef4444 !important; border-color: #ef4444 !important; color: #fff !important; }
.gm-bigword { text-align: center; font: 800 clamp(1.8rem, 7vw, 3.4rem) var(--font-display, system-ui); padding: 36px 12px; border: 2px dashed var(--border); border-radius: 18px; min-height: 140px; display: grid; place-items: center; overflow-wrap: anywhere; }
.gm-icelist { display: grid; gap: 8px; } .gm-iceq { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.gm-tt { display: grid; gap: 8px; } .gm-ttrow { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 1.05rem; } .gm-ttrow.gm-lie { background: rgba(239,68,68,.15); border-color: #ef4444; } .gm-ttrow.gm-true { background: rgba(34,197,94,.13); border-color: #22c55e; }
.gm-order { font-size: 1.2rem; line-height: 1.9; }
.gm-rps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } .gm-rpsbtn { font-size: 1.1rem !important; }
.gm-cyl { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; } .gm-chamber { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--border); font-weight: 800; background: var(--surface); } .gm-chamber.gm-fired { opacity: .35; } .gm-chamber.gm-cur { border-color: var(--accent); background: var(--accent-soft); }
.gm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; } .gm-stat { border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; display: grid; gap: 2px; background: var(--surface); } .gm-stat strong { font-size: 2rem; } .gm-stat small { color: var(--muted); } .gm-stat em { font-size: .75rem; color: var(--muted); font-style: normal; }
.gm-room { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; background: var(--surface); } .gm-room h4 { margin: 0 0 6px; } .gm-room p { margin: 4px 0; }
.gm-acro { display: grid; gap: 10px; } .gm-acrolines p { margin: 6px 0; font-size: 1.15rem; } .gm-acrolines strong { color: var(--accent); font-size: 1.6rem; margin-inline-end: 1px; }
.d3-code { font-family: ui-monospace, "SF Mono", Consolas, monospace !important; font-size: .85rem; }
.d3-hooks { display: grid; gap: 10px; } .d3-hook { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: var(--surface); } .d3-hook summary { cursor: pointer; } .d3-m { display: inline-block; min-width: 54px; text-align: center; padding: 1px 8px; border-radius: 6px; background: #6366f1; color: #fff; font-size: .8rem; } .d3-m.d3-POST { background: #16a34a; } .d3-m.d3-GET { background: #0ea5e9; } .d3-m.d3-DELETE { background: #ef4444; } .d3-m.d3-PUT, .d3-m.d3-PATCH { background: #f59e0b; }
.d3-pre { margin: 4px 0 8px; padding: 10px; border-radius: 10px; background: #0f1226; color: #dfe3ff; overflow: auto; max-height: 280px; font: .82rem/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; } .d3-hook h4 { margin: 8px 0 2px; font-size: .85rem; color: var(--muted); }
.d3-wrap { overflow-wrap: anywhere; white-space: pre-wrap; text-align: start !important; }
.d3-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .d3-issues li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); } .d3-error { background: rgba(239,68,68,.12); border-color: #ef4444 !important; } .d3-warn { background: rgba(245,158,11,.12); border-color: #f59e0b !important; } .d3-info { background: var(--accent-soft); }
.d3-frame { width: 100%; height: 320px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.d3-canvas { width: 100%; max-width: 420px; height: auto; border-radius: 10px; border: 1px solid var(--border); background: #fff; } .d3-slide, .d3-qm { max-width: 380px; }
.d3-logo { border: 1px solid var(--border); border-radius: 12px; background: repeating-conic-gradient(rgba(127,127,127,.12) 0 25%, transparent 0 50%) 50% / 20px 20px; padding: 10px; } .d3-logo svg { width: 100%; height: auto; display: block; }
.d3-emotes { display: flex; flex-wrap: wrap; gap: 18px; } .d3-emotes figure { margin: 0; text-align: center; } .d3-checker { image-rendering: auto; background: repeating-conic-gradient(rgba(127,127,127,.2) 0 25%, transparent 0 50%) 50% / 16px 16px; border-radius: 8px; } .d3-emotes figcaption { font-size: .8rem; color: var(--muted); }
.d3-embed { border-radius: 10px; background: #313338; color: #dbdee1; padding: 14px; } .d3-dmsg strong { display: block; margin-bottom: 6px; } .d3-dembed { background: #2b2d31; border-radius: 4px; padding: 10px 12px; display: grid; gap: 4px; margin-top: 6px; } .d3-dembed small { color: #949ba4; } .d3-dfield { display: grid; } .d3-dfield b { font-size: .85rem; } .d3-dimg { max-width: 100%; border-radius: 6px; margin-top: 6px; }
.d3-reddit { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--surface); min-height: 200px; overflow: auto; } .d3-reddit h1 { font-size: 1.5rem; } .d3-reddit h2 { font-size: 1.3rem; } .d3-reddit blockquote { margin: 6px 0; padding: 2px 12px; border-inline-start: 4px solid var(--border); color: var(--muted); } .d3-reddit code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; } .d3-reddit pre { background: #0f1226; color: #dfe3ff; padding: 10px; border-radius: 8px; overflow: auto; } .d3-reddit table { border-collapse: collapse; } .d3-reddit th, .d3-reddit td { border: 1px solid var(--border); padding: 4px 10px; }
.d3-spoiler { background: var(--text); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 3px; } .d3-spoiler.d3-shown { background: var(--accent-soft); color: inherit; }
.d3-pp { text-align: center; padding: 10px; } .d3-ppbtn, .d3-bmc { display: inline-block; padding: 12px 26px; border-radius: 8px; font: 700 1rem system-ui; text-decoration: none; } .d3-ppbtn { background: #ffc439; color: #111; } .d3-bmc { color: #fff; }
.d3-speed { text-align: center; font: 900 clamp(4rem, 16vw, 8rem)/1 var(--font-display, system-ui); font-variant-numeric: tabular-nums; color: var(--accent); } .d3-barwrap { padding: 4px 0; } .d3-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; } .d3-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.wk-list { display: grid; gap: 8px; } .wk-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.wk-canvas { width: 100%; max-width: 420px; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; } .wk-cite { display: grid; gap: 8px; } .wk-ref { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); line-height: 1.6; padding-inline-start: 2.5em; text-indent: -1.5em; }
.wk-issue { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: var(--surface); } .wk-issue code { font-size: .85rem; overflow-wrap: anywhere; } .wk-repeat, .wk-word, .wk-article { border-inline-start: 4px solid #ef4444; } .wk-spacing, .wk-capital, .wk-punct { border-inline-start: 4px solid #f59e0b; } .wk-passive, .wk-long { border-inline-start: 4px solid #6366f1; }
.dl-checks { gap: 6px 18px; align-items: center; } .dl-checks .check { flex: 0 0 auto; }
@media (max-width: 640px) { .gm-opts { grid-template-columns: 1fr; } .nk-grid { grid-template-columns: 1fr 1fr; } }

/* ---- AV kit ---- */
.av-tunerbox { display: grid; gap: 6px; justify-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.av-bignote { text-align: center; font: 900 clamp(3.4rem, 14vw, 6.5rem)/1 var(--font-display, system-ui); transition: color .15s; } .av-bignote.av-ok { color: #10b981; } .av-bignote.av-warn { color: #ef4444; }
.av-gauge { width: min(480px, 100%); height: auto; } .av-graph { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.av-strings { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; } .av-string { min-width: 52px; text-align: center; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); font-weight: 700; background: var(--surface); } .av-string.av-hit { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.av-piano { position: relative; display: flex; height: 190px; user-select: none; touch-action: none; border-radius: 0 0 12px 12px; overflow: hidden; border: 1px solid var(--border); background: #111; padding-top: 0; }
.av-white { flex: 1 1 0; position: relative; background: linear-gradient(#fff, #e9e9ee); border-inline-end: 1px solid #bbb; border-radius: 0 0 8px 8px; cursor: pointer; display: grid; align-items: end; justify-items: center; color: #555; font-size: .7rem; padding-bottom: 6px; } .av-white.av-down { background: linear-gradient(#c7d2fe, #a5b4fc); }
.av-black { position: absolute; top: 0; width: calc(100% / 21 * 0.62); height: 62%; background: linear-gradient(#222, #000); border-radius: 0 0 6px 6px; z-index: 2; cursor: pointer; box-shadow: 0 3px 5px rgba(0,0,0,.5); transform: translateX(-50%); } .av-black.av-down { background: linear-gradient(#4338ca, #1e1b4b); }
.av-chords { display: flex; flex-wrap: wrap; gap: 12px; } .av-chord { margin: 0; text-align: center; } .av-chord svg { border-radius: 8px; border: 1px solid var(--border); }
.av-chordrow, .av-notepick { display: flex; flex-wrap: wrap; gap: 6px; } .av-chordbtn { white-space: pre-line; min-width: 64px; } .av-pick.av-on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } .av-pick { min-width: 52px; }
.av-circlebox { display: grid; grid-template-columns: minmax(280px, 440px) 1fr; gap: 20px; align-items: center; } .av-circle svg { width: 100%; height: auto; }
.av-seg { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; cursor: pointer; } .av-minor { fill: var(--bg); } .av-near { fill: var(--accent-soft); } .av-sel { fill: var(--accent) !important; }
.av-seg-t { fill: var(--text); font: 700 18px system-ui; pointer-events: none; } .av-small { font-size: 13px; } .av-sel + .av-seg-t { fill: var(--accent-text); }
.av-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .av-choice.av-right { background: #22c55e; border-color: #22c55e; color: #fff; } .av-choice.av-wrong { background: #ef4444; border-color: #ef4444; color: #fff; }
.av-notetable { max-height: 480px; } .av-blackrow th, .av-blackrow td { background: rgba(127,127,127,.1); }
.av-drums { display: grid; gap: 6px; overflow-x: auto; } .av-drum-row { display: grid; grid-template-columns: 88px repeat(16, minmax(26px, 1fr)); gap: 4px; align-items: center; min-width: 560px; } .av-drum-name { font-size: .82rem; font-weight: 600; }
.av-step { height: 34px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 0; } .av-step.av-beat { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); } .av-step.av-on { background: var(--accent); border-color: var(--accent); } .av-step.av-now { outline: 2px solid #f59e0b; outline-offset: 1px; }
.av-spkrow { display: flex; gap: 20px; justify-content: center; } .av-spk { width: 110px; height: 150px; border-radius: 14px; display: grid; place-items: center; font: 800 2rem system-ui; color: var(--muted); border: 2px solid var(--border); background: var(--surface); transition: all .1s; } .av-spk.av-on { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 60%, transparent); }
.av-testbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
@media (max-width: 720px) { .av-circlebox { grid-template-columns: 1fr; } .av-piano { height: 150px; } }

/* ---- media kit ---- */
.mk-meter { width: 100%; height: auto; border-radius: 12px; background: rgba(127,127,127,.08); }
.mk-time { font: 700 2.4rem/1 ui-monospace, "SF Mono", Consolas, monospace; text-align: center; font-variant-numeric: tabular-nums; }
.mk-ctrls { justify-content: center; }
.mk-list { display: grid; gap: 12px; }
.mk-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.mk-audio { width: 100%; }
.mk-video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.mk-mirror { transform: scaleX(-1); }
.mk-good { border-color: #2ecc71 !important; color: #2ecc71; }
.mk-bad { border-color: #ef5350 !important; color: #ef5350; }
.mk-big { display: flex; align-items: baseline; justify-content: center; gap: 6px; font: 800 clamp(3rem, 12vw, 6rem)/1 var(--font-display, system-ui); text-align: center; font-variant-numeric: tabular-nums; }
.mk-big input { width: 4.2em; font: inherit; text-align: center; background: transparent; border: 0; border-bottom: 2px solid var(--border); color: inherit; }
.mk-big-input { width: 3.2em !important; }
.mk-unit { font-size: 1.1rem; color: var(--muted); text-align: center; }
.mk-pad { width: min(320px, 80vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; border: 0; font: 800 2rem system-ui; color: #fff; cursor: pointer; touch-action: manipulation;
  background: radial-gradient(circle at 30% 30%, #9b8cff, #7c5cff 60%, #4b2fd6); box-shadow: 0 10px 40px rgba(124,92,255,.45); transition: transform .08s; }
.mk-pad.mk-hit { animation: mk-hit .18s; }
@keyframes mk-hit { 50% { transform: scale(.94); } }
.mk-dots { display: flex; gap: 14px; justify-content: center; padding: 10px; }
.mk-dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(127,127,127,.25); transition: background .05s, transform .05s; }
.mk-dot.mk-first { outline: 2px solid var(--accent); outline-offset: 3px; }
.mk-dot.mk-on { background: var(--accent); transform: scale(1.25); }

/* ---- colour kit ---- */
.ck-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.ck-in { display: flex; gap: 8px; align-items: center; }
.ck-in input[type="color"] { width: 48px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); flex: none; }
.ck-hex { font-family: ui-monospace, Consolas, monospace; max-width: 170px; }
.ck-bad { border-color: #ef5350 !important; }
.ck-sw { min-width: 86px; min-height: 52px; padding: 6px 8px; border: 1px solid rgba(127,127,127,.25); border-radius: 10px; cursor: pointer; font: 600 12px ui-monospace, Consolas, monospace; display: grid; place-items: end start; }
.ck-big { min-width: 150px; min-height: 110px; font-size: 14px; }
.ck-mix { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ck-op { font-size: 1.6rem; color: var(--muted); }
.ck-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-step { display: grid; gap: 2px; justify-items: center; font-size: 11px; }
.ck-tones .ck-sw { min-width: 54px; min-height: 44px; }
.ck-tonal { display: grid; gap: 6px; margin-bottom: 8px; }
.ck-wheel-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.ck-wheel { width: min(360px, 100%); height: auto; cursor: crosshair; }
.ck-grid-wrap { overflow-x: auto; }
.ck-grid { border-collapse: collapse; }
.ck-grid th { padding: 4px; }
.ck-grid .ck-sw { min-width: 70px; min-height: 36px; }
.ck-cell { min-width: 84px; height: 64px; text-align: center; border: 1px solid rgba(127,127,127,.2); }
.ck-cell strong { display: block; font-size: 20px; }
.ck-cell small { font: 600 11px ui-monospace, Consolas, monospace; }
.ck-fail { outline: 2px dashed rgba(239,83,80,.65); outline-offset: -4px; }
.ck-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.ck-name { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; text-align: start; }
.ck-name code { margin-inline-start: auto; color: var(--muted); font-size: 11px; }
.ck-dot { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(127,127,127,.3); flex: none; }
.ck-shadows { display: flex; flex-wrap: wrap; gap: 26px; padding: 26px; background: #f4f5fb; border-radius: 14px; }
.ck-card { width: 120px; height: 84px; background: #fff; color: #333; display: grid; place-items: center; }
.ck-bar { height: 40px; border-radius: 10px; margin-top: 8px; display: flex; overflow: hidden; }
.ck-bar-tall { height: 64px; }
.ck-gtext { font-family: system-ui, "Segoe UI", "Noto Sans Arabic", sans-serif; line-height: 1.2; -webkit-background-clip: text; background-clip: text; color: transparent; overflow-wrap: anywhere; padding: 6px 0; }
.ck-cvd { display: grid; grid-template-columns: minmax(160px, 220px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ck-chip { width: 44px; height: 30px; border-radius: 6px; display: inline-block; }
.ck-ok { color: #2ecc71; font-weight: 700; } .ck-no { color: #ef5350; font-weight: 700; }
.ck-random { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ck-rand { min-height: 200px; border-radius: 14px; display: grid; align-content: end; gap: 4px; padding: 12px; }
.ck-rand-hex { background: none; border: 0; color: inherit; font: 800 18px ui-monospace, Consolas, monospace; cursor: pointer; text-align: start; padding: 0; }
@media (max-width: 600px) { .ck-cvd { grid-template-columns: 1fr; } }

/* ---- link kit ---- */
.lk-out { white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }
.lk-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; word-break: break-all; }
.lk-link a { flex: 1; min-width: 0; }
.lk-list { display: grid; gap: 8px; }
.lk-list strong { min-width: 90px; }
.lk-tips { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.lk-inbox { display: grid; gap: 12px; }
.lk-mail { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; color: #222; border: 1px solid #e3e3ea; font: 14px Arial, sans-serif; }
.lk-desktop { grid-template-columns: 160px 1fr auto; align-items: center; }
.lk-desktop > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-phone { max-width: 360px; }
.lk-row1 { display: flex; justify-content: space-between; }
.lk-pre { color: #666; }
.lk-marked { padding: 14px; border-radius: 12px; border: 1px solid var(--border); line-height: 1.6; }
.lk-marked mark { background: rgba(239,83,80,.3); color: inherit; border-radius: 3px; padding: 0 2px; }
.lk-frame { width: 100%; min-height: 260px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.lk-phone-frame { max-width: 390px; height: 640px; margin: 0 auto; display: block; border-radius: 28px; border: 8px solid #222; }
.lk-thread { display: grid; gap: 10px; }
.lk-post { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); white-space: pre-wrap; }
.lk-post p { margin: 0 0 8px; }
.lk-post-foot { display: flex; justify-content: space-between; align-items: center; }
.lk-rows { display: grid; gap: 6px; }
.lk-chapter { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; }
.lk-vcard { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #ff4fa3); color: #fff; max-width: 360px; }
.lk-ig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 480px; }
.lk-ig-cell { background-size: cover; background-position: center; aspect-ratio: 3 / 4; position: relative; cursor: grab; border-radius: 2px; }
.lk-ig-11 .lk-ig-cell { aspect-ratio: 1; }
.lk-ig-cell span { position: absolute; top: 6px; inset-inline-start: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.lk-panels { display: grid; gap: 8px; }
.lk-panel { width: 320px; max-width: 100%; height: auto; }
@media (max-width: 600px) { .lk-desktop { grid-template-columns: 1fr; } .lk-chapter { grid-template-columns: 84px 1fr auto; } }

/* ---- printables ---- */
.pr-stage { padding: 14px; }
.pr-prev { max-width: 100%; height: auto; box-shadow: 0 2px 14px rgba(0,0,0,.35); background: #fff; }
.pr-times { display: grid; grid-template-columns: repeat(var(--n), minmax(28px, 1fr)); gap: 2px; overflow-x: auto; font-variant-numeric: tabular-nums; }
.pr-times span { padding: 6px 2px; text-align: center; border-radius: 6px; background: rgba(127,127,127,.08); font-size: 14px; }
.pr-times .pr-h { background: var(--accent); color: #fff; font-weight: 800; }
.pr-times .pr-hl { background: var(--accent-soft); outline: 1px solid var(--accent); }
.pr-flash { min-height: 220px; width: 100%; max-width: 520px; margin: 0 auto; display: grid; place-items: center; padding: 20px; border-radius: 18px; border: 2px solid var(--border);
  background: var(--surface); color: var(--text); font: 800 clamp(1.6rem, 6vw, 2.6rem)/1.2 system-ui, "Noto Sans Arabic", sans-serif; cursor: pointer; }
.pr-flash.pr-back { background: var(--accent-soft); color: var(--accent); }
.pr-table { display: grid; gap: 12px; }
.pr-hand { display: grid; gap: 6px; }
.pr-cards { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-card { width: 54px; height: 76px; border-radius: 8px; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 6px rgba(0,0,0,.25); display: grid; place-items: center; align-content: center; font: 700 18px Georgia, serif; }
.pr-card i { font-style: normal; font-size: 22px; line-height: 1; }

/* ---- everyday ---- */
.ev-clock { font: 800 clamp(3rem, 14vw, 7rem)/1 ui-monospace, Consolas, monospace; text-align: center; font-variant-numeric: tabular-nums; }
.ev-big { font: 800 clamp(2.4rem, 10vw, 4.6rem)/1.1 system-ui; text-align: center; font-variant-numeric: tabular-nums; }
.ev-ring { padding: 20px; border-radius: 18px; text-align: center; background: var(--accent-soft); border: 2px solid var(--accent); animation: ev-flash 1s infinite; }
@keyframes ev-flash { 50% { border-color: transparent; } }
.ev-list { display: grid; gap: 8px; }
.ev-alarm { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); }
.ev-alarm strong { font: 800 1.4rem ui-monospace, Consolas, monospace; }
.ev-alarm span { flex: 1; }
.ev-tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ev-counter { display: grid; gap: 10px; justify-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--border); }
.ev-name { text-align: center; font-weight: 700; }
.ev-count { font: 800 clamp(3rem, 12vw, 5rem)/1 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ev-plus, .ev-minus { min-width: 84px; min-height: 64px; font-size: 2rem !important; }
.ev-words { padding: 16px; border-radius: 14px; border: 1px solid var(--border); font: 500 1.35rem/1.9 system-ui, "Noto Sans Arabic", sans-serif; display: flex; flex-wrap: wrap; gap: 4px 10px; max-height: 9.8em; overflow: hidden; }
.ev-ok { color: #2ecc71; } .ev-bad { color: #ef5350; text-decoration: line-through; } .ev-cur { background: var(--accent-soft); border-radius: 6px; padding: 0 4px; } .ev-wrong { background: rgba(239,83,80,.25); }
.ev-type { font-size: 1.3rem; padding: 12px; }
.ev-zone { width: 100%; min-height: 300px; border-radius: 18px; border: 0; font: 800 clamp(1.4rem, 5vw, 2.4rem) system-ui; color: #fff; cursor: pointer; touch-action: manipulation; }
.ev-idle, .ev-result, .ev-early { background: #4b5bd6; } .ev-wait { background: #d62839; } .ev-go { background: #1fa855; }
.ev-ruler-wrap { margin-inline: -20px; overflow: hidden; }
.ev-ruler { width: 100%; height: 140px; display: block; }
.ev-card { border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); max-width: 100%; }
.ev-protractor { max-width: 100%; height: auto; touch-action: none; cursor: grab; }
.ev-kinfo { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); font-family: ui-monospace, Consolas, monospace; }
.ev-kinfo strong { font-size: 1.8rem; }
.ev-kb { display: grid; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.ev-krow { display: flex; gap: 5px; min-width: 640px; }
.ev-key { flex: 1; min-width: 0; padding: 10px 2px; text-align: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font: 600 12px system-ui; white-space: nowrap; overflow: hidden; }
.ev-key.ev-seen { background: rgba(46,204,113,.18); border-color: #2ecc71; }
.ev-key.ev-down { background: var(--accent); color: #fff; transform: translateY(1px); }
.ev-wheel-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ev-wheel-box { flex: 1 1 360px; position: relative; display: grid; gap: 10px; justify-items: center; }
.ev-wheel { width: min(520px, 100%); height: auto; cursor: pointer; }
.ev-wheel-side { flex: 1 1 260px; display: grid; gap: 10px; }
.ev-winner { min-height: 2.4em; font: 800 1.8rem system-ui, "Noto Sans Arabic", sans-serif; display: flex; gap: 10px; align-items: center; }
.ev-decide { min-height: 140px; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 18px; background: var(--accent-soft); text-align: center; }
.ev-decide strong { font: 800 clamp(2rem, 8vw, 3.4rem) system-ui, "Noto Sans Arabic", sans-serif; }
.ev-pop { animation: ev-pop .3s; }
@keyframes ev-pop { 0% { transform: scale(.9); opacity: .4; } }
.ev-countdown { --ec: #7c5cff; padding: 26px 16px; border-radius: 20px; text-align: center; background: linear-gradient(135deg, var(--ec), color-mix(in srgb, var(--ec) 40%, #1e1b4b)); color: #fff; }
.ev-countdown h2 { margin: 6px 0 14px; font-size: clamp(1.4rem, 5vw, 2.2rem); }
.ev-ec-emoji { font-size: 3rem; }
.ev-ec-units { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ev-ec-units div { min-width: 76px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.16); display: grid; }
.ev-ec-units strong { font: 800 clamp(1.8rem, 7vw, 3rem)/1 system-ui; font-variant-numeric: tabular-nums; }
.ev-stats { display: grid; gap: 6px; }

/* ---- fourth batch: wd- (wordkit), dk- (docskit) */
.wd-styles { display: grid; gap: 8px; margin: 10px 0; } .wd-style { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, rgba(255,255,255,.04)); }
.wd-style-text { all: unset; cursor: pointer; font-size: 1.35rem; line-height: 1.5; word-break: break-word; } .wd-style-text:hover, .wd-style-text:focus-visible { color: var(--accent, #7aa2ff); }
.wd-hist { margin: 4px 0 0; padding-left: 20px; color: var(--muted, #9aa); display: grid; gap: 4px; }
.wd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 14px 0; }
.wd-card { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(160deg, #241a4a, #0f1030); color: #f1e9ff; } .wd-card small { opacity: .75; letter-spacing: .08em; text-transform: uppercase; }
.wd-card-art { width: 84px; height: 130px; display: grid; place-items: center; font: 800 2rem Georgia, serif; border: 2px solid #d9b45b; border-radius: 10px; color: #d9b45b; background: radial-gradient(circle at 50% 30%, rgba(217,180,91,.25), transparent 70%); } .wd-rev .wd-card-art { transform: rotate(180deg); } .wd-card p { margin: 0; font-size: .92rem; opacity: .9; }
.wd-ball { all: unset; cursor: pointer; display: grid; place-items: center; width: 220px; height: 220px; margin: 14px auto; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #4a4a58, #0a0a10 62%); color: #fff; text-align: center; font: 700 1rem system-ui; padding: 52px 38px; box-sizing: border-box; box-shadow: 0 14px 40px rgba(0,0,0,.5); } .wd-ball:focus-visible { outline: 3px solid var(--accent, #7aa2ff); }
.wd-ball span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #1d2a6b; padding: 10px; box-sizing: border-box; font-size: .95rem; line-height: 1.25; } .wd-shake { animation: wd-shake .7s; } @keyframes wd-shake { 0%,100% { transform: translate(0); } 15% { transform: translate(-12px, 6px) rotate(-6deg); } 30% { transform: translate(12px, -6px) rotate(6deg); } 45% { transform: translate(-10px, -4px) rotate(-4deg); } 60% { transform: translate(10px, 4px) rotate(4deg); } 80% { transform: translate(-4px, 2px); } }
.wd-target { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 100%; min-height: 220px; margin: 10px 0; border: 3px dashed var(--accent, #7aa2ff); border-radius: 18px; cursor: pointer; font: 700 1.2rem system-ui; text-align: center; padding: 16px; user-select: none; touch-action: manipulation; } .wd-target:focus-visible { outline: 3px solid var(--accent, #7aa2ff); } .wd-hit { background: rgba(122,162,255,.22); }
.wd-tones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; margin: 12px 0; } .wd-tone { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; }
.wd-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; } .wd-preset { aspect-ratio: 1; border: 2px solid transparent; border-radius: 10px; cursor: pointer; padding: 0; } .wd-preset.wd-on { border-color: var(--accent, #7aa2ff); outline: 2px solid var(--accent, #7aa2ff); outline-offset: 1px; }
.wd-auth { border: 1px solid var(--border); border-left-width: 5px; border-radius: 12px; padding: 4px 14px 10px; margin: 12px 0; } .wd-auth h3 { margin: 10px 0 6px; } .wd-auth ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .wd-auth.wd-ok { border-left-color: #2fbf71; } .wd-auth.wd-warn { border-left-color: #f0b429; } .wd-auth.wd-bad { border-left-color: #e5484d; } .wd-auth li.wd-bad strong { color: #e5484d; } .wd-auth li.wd-warn strong { color: #f0b429; } .wd-auth li.wd-ok strong { color: #2fbf71; } .wd-auth .hint { word-break: break-word; }
.dk textarea#dk-out { font: 0.92rem/1.5 ui-monospace, Consolas, monospace; min-height: 340px; }.dk .ik-controls { min-width: 0; } .dk .ik-controls .cv-row > * { min-width: 0; } .dk .ik-controls input, .dk .ik-controls select { min-width: 0; max-width: 100%; box-sizing: border-box; }
.rb-tools { display: flex; flex-wrap: wrap; gap: 6px; } .rb-tool.rb-on { background: var(--accent, #7aa2ff); color: #0b0d12; border-color: transparent; }
.rb-canvas { touch-action: none; max-width: 100%; height: auto; } .rb-stage { min-height: 200px; }

/* ---- ad slots (preview boxes now; real AdSense units later) */
.ad-slot { display: block; margin: 26px auto; max-width: 970px; text-align: center; }
.ad-label { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #8a93a6); margin-bottom: 4px; }
.ad-demo { display: grid; gap: 4px; place-content: center; min-height: 250px; border: 2px dashed rgba(122,162,255,.5); border-radius: 14px; background: repeating-linear-gradient(135deg, rgba(122,162,255,.06) 0 14px, rgba(122,162,255,.12) 14px 28px); color: var(--muted, #8a93a6); }
.ad-demo strong { font-size: 1rem; color: var(--text, #e8ecf5); } .ad-demo small { font-size: .78rem; }
.ad-mid .ad-demo { min-height: 280px; }
.ad-rail { display: none; position: fixed; top: 110px; width: 160px; margin: 0; z-index: 5; }
.ad-rail .ad-demo { min-height: 600px; }
@media (min-width: 1640px) { .ad-rail { display: block; } .ad-left { left: calc(50% - 620px - 190px); } .ad-right { right: calc(50% - 620px - 190px); } }
@media print { .ad-slot { display: none !important; } }

.ad-top { max-width: 728px; margin: 16px auto 20px; } .ad-top .ad-demo { min-height: 90px; padding: 6px 12px; }
@media (max-width: 600px) { .ad-top .ad-demo { min-height: 100px; } }

/* ---- About, Contact, Privacy, Terms */
.info-page { max-width: 780px; margin: 32px auto 0; }
.info-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 18px; }
.info-page p, .info-page li { line-height: 1.7; }
.info-page a { color: var(--accent); }

.contact-form { display: grid; gap: 14px; margin: 18px 0 26px; max-width: 620px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact-form input, .contact-form textarea { font: inherit; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .ok { color: #2fbf71; }

/* ---- Embed on your site (button under a tool) and the embedded view (?embed=1) ---- */
.embed-wrap { margin: 0 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.embed-box { width: 100%; max-width: 760px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.embed-box h2 { font-size: 1.05rem; margin: 0 0 6px; }
.embed-box textarea { width: 100%; box-sizing: border-box; margin: 8px 0 10px; padding: 10px; font: .82rem/1.45 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); resize: vertical; direction: ltr; text-align: left; }
.embed-more { margin-inline-start: 10px; font-size: .92rem; }
.embed-demo { display: block; width: 100%; max-width: 780px; height: 560px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
body.embed .site-header, body.embed .site-footer, body.embed #about, body.embed .back, body.embed .free-line, body.embed #tool-chips,
body.embed .lang-suggest, body.embed #lang-suggest, body.embed .consent, body.embed #tool-desc, body.embed #text-desc { display: none !important; }
body.embed main { padding-top: 8px; padding-bottom: 8px; }
body.embed .tool-head { margin-bottom: 8px; }
.embed-credit { display: block; margin: 14px 0 4px; text-align: center; font-size: .8rem; color: var(--muted); text-decoration: none; }
.embed-credit:hover { color: var(--accent); text-decoration: underline; }

.about a.btn, .info-page a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.about a.btn-primary, .info-page a.btn-primary { color: var(--accent-text); }
