@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0A0A0A;
  --bg-elev: #131316;
  --bg-elev2: #1A1A1E;
  --border: #262626;
  --text: #F4F4F5;
  --text-dim: #B0B0B5;
  --accent: #9D4EDD;
  --accent-2: #9D4EDD;
  --accent-ink: #FFFFFF;
  --danger: #ff6b6b;
  --ok: #4ade80;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --display: "Montserrat", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body { min-height: 100vh; }
h1, h2, h3, h4, h5, h6, .brand-name { font-family: var(--display); }

button { font-family: inherit; cursor: pointer; }

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 max(32px, calc((100% - 1136px) / 2));
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  justify-self: start;
  transition: opacity 0.15s ease;
}
.brand:hover { opacity: 0.85; }
.brand-stack {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-author {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.footer-author {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.brand .logo {
  display: inline-flex;
  width: 30px; height: 30px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' rx='8' fill='%239D4EDD'/><path d='M16 5.2 L25.5 8 L16 10.8 L6.5 8 Z' fill='%23FFFFFF'/><path d='M16 13.2 L25.5 16 L16 18.8 L6.5 16 Z' fill='%23FFFFFF'/><path d='M16 21.2 L25.5 24 L16 26.8 L6.5 24 Z' fill='%23FFFFFF'/></svg>") center / contain no-repeat;
  border-radius: 8px;
  color: transparent;
  font-size: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.15s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--text);
}
.nav-link.active,
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link.active::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar-actions a.primary-btn { text-decoration: none; display: inline-flex; align-items: center; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--bg-elev2);
  border-color: var(--accent);
}

.privacy-chip {
  font-size: 10px;
  color: var(--ok);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status-right-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.primary-btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.05s ease, opacity 0.2s ease;
}
.primary-btn:hover:not(:disabled) { opacity: 0.9; }
.primary-btn:active:not(:disabled) { transform: translateY(1px); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.primary-btn.full { width: 100%; padding: 11px; }

.ghost-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: background 0.15s ease;
}
.ghost-btn:hover { background: var(--bg-elev2); }

/* APP LAYOUT */
.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 56px);
}

/* SIDEBAR */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.tab {
  background: var(--bg-elev);
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  padding: 10px 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab:hover { background: var(--bg-elev2); color: var(--text); }
.tab.active {
  background: var(--bg-elev2);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.panel {
  display: none;
  padding: 18px 16px;
  overflow-y: auto;
  flex: 1;
}
.panel.active { display: block; }
.panel h2 {
  font-size: 14px;
  margin: 0 0 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.muted { color: var(--text-dim); font-size: 12px; margin: 0 0 12px; }

.row { margin-bottom: 12px; }
.row label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.row.inline label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.row input[type=number],
.row input[type=text],
.row select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.row input:focus, .row select:focus { border-color: var(--accent); }
.row input[type=color] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  padding: 2px;
}
.row input[type=range] {
  width: 100%;
  accent-color: var(--accent);
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-row > button { flex: 1; }

.scale-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.chip {
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 4px;
  border-radius: 6px;
  font-size: 12px;
}
.chip:hover { border-color: var(--accent); }

/* DROPZONE */
.dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--bg-elev2);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: rgba(157, 78, 221, 0.06);
}
.dz-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.7; }
.dz-text { font-size: 13px; margin-bottom: 4px; }
.dz-hint { color: var(--text-dim); font-size: 11px; }

.meta-block {
  margin-top: 14px;
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  color: var(--text-dim);
}
.meta-row span:last-child { color: var(--text); font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* FILTERS */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.filter-card {
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.05s ease;
}
.filter-card:hover { border-color: var(--accent); }
.filter-card:active { transform: scale(0.98); }
.filter-card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #444, #666);
  border-radius: 5px;
  margin-bottom: 5px;
}
.filter-card .name { font-size: 11px; color: var(--text); }

/* PRESETS */
.presets-container { margin-top: 6px; }
.preset-group {
  margin-bottom: 14px;
}
.preset-group-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.preset-group-title .pg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.preset-list { display: flex; flex-direction: column; gap: 5px; }
.preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.preset-item:hover {
  border-color: var(--accent);
  background: rgba(157, 78, 221, 0.06);
}
.preset-item .name { font-size: 12px; }
.preset-item .dims {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
}

/* WORKSPACE */
.workspace {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 1px 1px, #2a2a2a40 1px, transparent 0) 0 0 / 24px 24px,
    var(--bg);
  overflow: hidden;
}
.canvas-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
#canvas {
  max-width: 100%;
  max-height: 100%;
  background:
    linear-gradient(45deg, #2a2f42 25%, transparent 25%),
    linear-gradient(-45deg, #2a2f42 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2f42 75%),
    linear-gradient(-45deg, transparent 75%, #2a2f42 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  box-shadow: var(--shadow);
  border-radius: 4px;
  display: block;
}
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  color: var(--text-dim);
}
.empty-state .big-icon { font-size: 64px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { margin: 0 0 4px; color: var(--text); font-weight: 600; }
.empty-state p { margin: 0; font-size: 13px; }

/* CROP OVERLAY */
.crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.crop-box {
  position: absolute;
  border: 2px dashed var(--accent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  cursor: move;
}
.handle {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
}
.handle.tl { top: -7px; left: -7px; cursor: nwse-resize; }
.handle.tr { top: -7px; right: -7px; cursor: nesw-resize; }
.handle.bl { bottom: -7px; left: -7px; cursor: nesw-resize; }
.handle.br { bottom: -7px; right: -7px; cursor: nwse-resize; }
.handle.t  { top: -7px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.handle.b  { bottom: -7px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.handle.l  { top: 50%; left: -7px; transform: translateY(-50%); cursor: ew-resize; }
.handle.r  { top: 50%; right: -7px; transform: translateY(-50%); cursor: ew-resize; }

/* STATUS BAR */
.statusbar {
  height: 28px;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev2);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }

/* SCROLLBARS */
.sidebar ::-webkit-scrollbar,
.panel::-webkit-scrollbar { width: 8px; }
.sidebar ::-webkit-scrollbar-thumb,
.panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar ::-webkit-scrollbar-track,
.panel::-webkit-scrollbar-track { background: transparent; }

/* RATER MODE TOGGLE */
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 14px;
  gap: 3px;
}
.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
}
.mode-btn:not(.active):hover { color: var(--text); }
.rater-mode { display: none; }
.rater-mode.active { display: block; }
.row label .hint {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.row textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.row textarea:focus { border-color: var(--accent); }

.dual-score {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.dual-score-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}
.dual-score-item span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.dual-score-item strong {
  font-size: 20px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text);
}
.check-list .ck-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}
.check-list li.pass .ck-icon { background: var(--ok); }
.check-list li.warn .ck-icon { background: #f59e0b; }
.check-list li.fail .ck-icon { background: var(--danger); }
.check-list .ck-val {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
}

/* RATER */
.rater-result {
  margin-top: 16px;
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.score-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    conic-gradient(var(--accent) calc(var(--score, 0) * 1%), rgba(255,255,255,0.08) 0);
  position: relative;
}
.score-circle::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--bg-elev2);
  border-radius: 50%;
}
.score-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.score-grade {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}
.score-summary {
  text-align: center;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
}
.score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.score-bar {
  display: grid;
  grid-template-columns: 90px 1fr 38px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
}
.score-bar .bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.score-bar .bar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.score-bar .bar-fill.mid { background: linear-gradient(90deg, #f59e0b, #facc15); }
.score-bar .val { text-align: right; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--text); }
.rater-h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 4px 0 8px;
}
.rater-suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rater-suggestions li {
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.rater-suggestions li.ok { border-left-color: var(--ok); }
.rater-suggestions li.warn { border-left-color: #f59e0b; }

.platform-fit {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pf-row {
  display: grid;
  grid-template-columns: 1fr 90px 38px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
}
.pf-row.best {
  border-color: var(--ok);
  background: rgba(74, 222, 128, 0.06);
}
.pf-row .pf-name { display: flex; align-items: center; gap: 6px; }
.pf-row .pf-best {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
  background: rgba(74, 222, 128, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
}
.pf-row .bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.pf-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.pf-row .bar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.pf-row .bar-fill.mid { background: linear-gradient(90deg, #f59e0b, #facc15); }
.pf-row .pf-val {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  text-align: right;
  color: var(--text);
}

/* RECENT */
.recent-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.recent-count {
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.recent-item {
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
  position: relative;
}
.recent-item:hover { border-color: var(--accent); }
.recent-item .r-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--bg);
}
.recent-item .r-meta {
  padding: 6px 8px;
  font-size: 10px;
  color: var(--text-dim);
}
.recent-item .r-name {
  font-size: 11px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-item .r-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px; height: 22px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border-radius: 50%;
  opacity: 0;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}
.recent-item:hover .r-del { opacity: 1; }
.recent-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 30px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.retention-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.5;
}
.retention-note strong { color: var(--ok); }

/* BLOG PAGE */
.blog-page { background: var(--bg); }
.blog-page-main { min-height: calc(100vh - 56px - 220px); }
.blog-hero {
  padding: 72px 24px 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(157, 78, 221, 0.12), transparent 70%),
    var(--bg);
  text-align: center;
}
.blog-hero-inner { max-width: 760px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(157, 78, 221, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.blog-hero h1 {
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 14px;
  background: linear-gradient(90deg, #fff, #FFE98A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero p {
  font-size: 16px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}
.blog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.blog-section-head h2 {
  font-size: 22px;
  margin: 0;
  color: var(--text);
}
.blog-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.filter-chip:hover { color: var(--text); border-color: var(--accent); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  border-color: transparent;
}
.blog-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 24px;
  font-size: 14px;
  max-width: 520px;
  margin: 0 auto;
}
.blog-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.75;
}
.blog-empty h2 {
  color: var(--text);
  font-size: 22px;
  margin: 0 0 8px;
}
.blog-empty p {
  margin: 0 0 22px;
  line-height: 1.6;
}
.blog-empty .primary-btn {
  display: inline-block;
  text-decoration: none;
}

/* BLOG SECTION (shared with home prior — kept for the dedicated page) */
.blog-section {
  background: var(--bg);
  padding: 56px 24px 64px;
}
.blog-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.blog-header {
  text-align: center;
  margin-bottom: 36px;
}
.blog-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.blog-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.blog-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.blog-thumb span { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.blog-body {
  padding: 16px 18px 18px;
}
.blog-tag {
  display: inline-block;
  background: rgba(157, 78, 221, 0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.blog-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}
.blog-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.blog-meta {
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* TOOL-SPECIFIC STYLES */
.empty-line {
  color: var(--text-dim);
  font-size: 13px;
  padding: 16px 4px;
  text-align: center;
  font-style: italic;
}
.check-list .ck-advice {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
}

/* UTM tool */
.utm-url-display {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
  line-height: 1.5;
}
.kv-grid { display: flex; flex-direction: column; gap: 4px; }
.kv-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}
.kv-row span:first-child { color: var(--text-dim); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.kv-row span:last-child { color: var(--text); word-break: break-all; }

/* EMAIL tool */
.char-meter {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin-top: 4px;
}
.inbox-preview {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.ip-row { display: flex; gap: 10px; align-items: flex-start; }
.ip-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink);
  font-weight: 700;
  flex-shrink: 0;
}
.ip-body { flex: 1; min-width: 0; }
.ip-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.ip-sender { color: var(--text); font-weight: 600; }
.ip-subject {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip-preview {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.score-row .score-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.score-bar { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 4px; transition: width 0.4s ease; }
.score-bar-fill.low { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.score-bar-fill.mid { background: linear-gradient(90deg, #f59e0b, #facc15); }
.verdict-row {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 14px;
}
.verdict-row.ok { border-left-color: var(--ok); }
.verdict-row.warn { border-left-color: #f59e0b; }
.verdict-row.bad { border-left-color: var(--danger); }
.muted-list {
  list-style: disc;
  padding-left: 22px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}
.muted-list strong { color: var(--text); }

/* COPY tool */
.variants { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.variant-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.variant-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  font-size: 12px; color: var(--text-dim);
}
.variant-fw { font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.ghost-btn.small { padding: 4px 10px; font-size: 11px; }
.slot { padding: 8px 0; border-top: 1px dashed var(--border); }
.slot:first-of-type { border-top: none; padding-top: 0; }
.slot-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.slot-name { letter-spacing: 0.02em; }
.slot-len.ok { color: var(--ok); }
.slot-len.warn { color: #f59e0b; }
.slot-len.over { color: var(--danger); font-weight: 600; }
.slot-val { font-size: 13px; color: var(--text); line-height: 1.5; }

/* PALETTE tool */
.palette-preview {
  display: flex; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  align-items: stretch;
  min-height: 110px;
}
.pal-thumb {
  max-height: 140px;
  max-width: 180px;
  border-radius: 6px;
  flex-shrink: 0;
}
.pal-stack { display: flex; flex-direction: column; flex: 1; border-radius: 6px; overflow: hidden; }
.pal-stack-block { flex: 1; }
.pal-color { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.pal-color-base {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.pal-meta { display: flex; flex-direction: column; gap: 2px; }
.pal-name { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.pal-hex { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; opacity: 0.85; }
.pal-contrast { display: flex; gap: 6px; }
.pal-contrast .badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  letter-spacing: 0.04em;
}
.pal-shades {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
}
.pal-shade {
  height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.pal-shade:hover { transform: scale(1.06); z-index: 1; position: relative; }

/* AUDIT tool */
.score-circle.hidden { display: none; }
.lp-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
}
.lp-cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.lp-cat-icon { font-size: 16px; }
.lp-cat-name { flex: 1; font-weight: 600; font-size: 13px; }
.lp-cat-score {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.lp-cat-score.ok { color: var(--ok); background: rgba(74, 222, 128, 0.12); }
.lp-cat-score.warn { color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.lp-cat-score.bad { color: var(--danger); background: rgba(255, 107, 107, 0.12); }
.lp-checks { padding: 10px 14px; }

/* AUDIT — fetch meta + platform quality scores */
.fetch-meta {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fm-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.fm-row span:last-child { color: var(--text); word-break: break-all; }
.fm-row .ok { color: var(--ok); }
.fm-row .warn { color: #f59e0b; }
.fm-row .fm-url { font-size: 10px; }

.platform-scores {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.ps-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.ps-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.ps-card.google::before { background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335); }
.ps-card.meta::before { background: linear-gradient(90deg, #1877F2, #4267B2); }
.ps-card.insta::before { background: linear-gradient(90deg, #F58529, #DD2A7B, #8134AF, #515BD4); }

.ps-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ps-logo {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.ps-logo.gp { background: linear-gradient(135deg, #4285F4, #34A853); }
.ps-logo.mp { background: #1877F2; font-family: Georgia, serif; }
.ps-logo.ip { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); font-size: 11px; }
.ps-info { flex: 1; min-width: 0; }
.ps-platform { font-weight: 700; font-size: 14px; color: var(--text); }
.ps-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.ps-big {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: 28px;
  color: var(--text);
}
.ps-big small { font-size: 14px; color: var(--text-dim); font-weight: 400; }
.ps-big.ok { color: var(--ok); }
.ps-big.warn { color: #f59e0b; }
.ps-big.bad { color: var(--danger); }
.ps-big-rank {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.05);
}
.ps-big-rank.ok { color: var(--ok); background: rgba(74, 222, 128, 0.14); }
.ps-big-rank.warn { color: #f59e0b; background: rgba(245, 158, 11, 0.14); }
.ps-big-rank.bad { color: var(--danger); background: rgba(255, 107, 107, 0.14); }

.ps-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.ps-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.ps-bar-fill.ok { background: linear-gradient(90deg, #4ade80, #22d3ee); }
.ps-bar-fill.warn { background: linear-gradient(90deg, #f59e0b, #facc15); }
.ps-bar-fill.bad { background: linear-gradient(90deg, #f59e0b, #ef4444); }

.ps-rank {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.ps-rank.ok { color: var(--ok); }
.ps-rank.warn { color: #f59e0b; }
.ps-rank.bad { color: var(--danger); }

.ps-factors {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-factor {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) 1fr 32px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text);
}
.psf-name { font-weight: 500; }
.psf-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.psf-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.psf-bar-fill.ok { background: var(--ok); }
.psf-bar-fill.warn { background: #f59e0b; }
.psf-bar-fill.bad { background: var(--danger); }
.psf-val {
  text-align: right;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-dim);
}
.psf-note {
  grid-column: 1 / -1;
  font-size: 10px;
  color: var(--text-dim);
  padding-left: 0;
  line-height: 1.5;
}
.ps-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
}
.ps-note strong { color: var(--text); }
.ps-note em { color: var(--accent); font-style: normal; }

/* CALENDAR tool */
.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.cal-range {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.cal-actions { display: flex; gap: 8px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cal-col {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.cal-col-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px 6px;
  border-bottom: 1px solid var(--border);
}
.cal-col-day { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.cal-col-date { font-size: 14px; font-weight: 700; color: var(--text); }
.cal-col-slots {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
  transition: background 0.15s ease;
}
.cal-col-slots.drop { background: rgba(157, 78, 221, 0.08); }
.cal-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--plat, var(--accent));
  border-radius: 6px;
  padding: 8px 10px;
  cursor: grab;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.cal-card.dragging { opacity: 0.45; }
.cal-card:hover { border-color: var(--accent); }
.cal-card-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.cal-card-time { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; color: var(--text); }
.cal-card-platform {
  padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: 9px; letter-spacing: 0.04em;
}
.cal-card-title { font-size: 12px; color: var(--text); line-height: 1.35; }
.cal-card-notes { font-size: 11px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }
.cal-add {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  margin: 0 8px 8px;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cal-add:hover { color: var(--accent); border-color: var(--accent); }
.bestpost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.bestpost-grid strong { color: var(--text); }

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.modal .field { margin-bottom: 12px; }
.modal label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.modal input, .modal select, .modal textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.modal textarea { resize: vertical; }

@media (max-width: 900px) {
  .cal-grid { grid-template-columns: repeat(2, 1fr); }
  .pal-shades { grid-template-columns: repeat(6, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
}

/* AI HUMANIZER */
.ai-control-row { display: flex; gap: 12px; }
.ai-control-row .field { margin-bottom: 0; }
@media (max-width: 720px) { .ai-control-row { flex-direction: column; } }

.ai-score-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.ai-score-ring-wrap {
  position: relative;
  width: 96px; height: 96px;
  flex-shrink: 0;
}
.ai-score-ring { width: 96px; height: 96px; }
.ai-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: 26px;
  color: var(--text);
  line-height: 1;
}
.ai-score-num small { font-size: 10px; color: var(--text-dim); font-weight: 400; margin-top: 2px; }
.ai-score-meta { flex: 1; }
.ai-score-label { font-size: 15px; font-weight: 700; margin-bottom: 4px; transition: color 0.3s; }
.ai-score-sub { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

.ai-dims {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.ai-dim-row {
  display: grid;
  grid-template-columns: 100px 1fr 30px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.ai-dim-name { color: var(--text-dim); }
.ai-dim-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.ai-dim-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s, background 0.3s;
}
.ai-dim-val {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 600;
  text-align: right;
}

.ai-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.ai-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.ai-tab:hover { color: var(--text); }
.ai-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.ai-tab-panel { display: none; }
.ai-tab-panel.active { display: block; }

.ai-highlight-box,
.ai-output-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  max-height: 480px;
  overflow-y: auto;
  word-wrap: break-word;
}

mark.mk-p0 { background: rgba(239, 68, 68, 0.28); color: #fca5a5; padding: 1px 3px; border-radius: 3px; cursor: help; }
mark.mk-p1 { background: rgba(245, 158, 11, 0.25); color: #fcd34d; padding: 1px 3px; border-radius: 3px; cursor: help; }
mark.mk-p2 { background: rgba(250, 204, 21, 0.18); color: #fde68a; padding: 1px 3px; border-radius: 3px; cursor: help; }
mark.mk-banned { background: rgba(168, 85, 247, 0.28); color: #d8b4fe; padding: 1px 3px; border-radius: 3px; cursor: help; }

.ai-comparison {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ai-score-pill {
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg);
}
.ai-arrow { color: var(--text-dim); }

.ai-issues {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
}
.ai-issue {
  display: flex;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
}
.ai-issue.p0 { border-left-color: #EF4444; }
.ai-issue.p1 { border-left-color: #F59E0B; }
.ai-issue.p2 { border-left-color: #FDE68A; }
.ai-issue.banned { border-left-color: #A855F7; }
.ai-issue-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 4px;
  align-self: flex-start;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-issue-tag.p0 { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.ai-issue-tag.p1 { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.ai-issue-tag.p2 { background: rgba(250, 204, 21, 0.18); color: #fde68a; }
.ai-issue-tag.banned { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; }
.ai-issue-body { flex: 1; min-width: 0; }
.ai-issue-label { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.ai-issue-phrase { font-size: 11px; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-dim); margin-bottom: 4px; word-break: break-word; }
.ai-issue-advice { font-size: 11px; color: var(--text-dim); }

.ai-diff-text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 480px;
  overflow-y: auto;
  word-wrap: break-word;
}
.d-old { background: rgba(239, 68, 68, 0.15); color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, 0.6); padding: 0 2px; border-radius: 2px; }
.d-new { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; padding: 0 3px; border-radius: 3px; border-bottom: 1px solid rgba(16, 185, 129, 0.45); }
.ai-rewritten { font-size: 13px; line-height: 1.85; color: var(--text); }

.ai-diff-legend {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 11px;
}
.ai-diff-legend span {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 600;
}

.ai-changes {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.ai-changes-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}
.ai-changes-summary::-webkit-details-marker { display: none; }
.ai-changes[open] .ai-changes-summary { border-bottom-color: var(--border); background: rgba(157, 78, 221, 0.04); }
.ai-changes-summary:hover { background: rgba(157, 78, 221, 0.06); }
.ai-changes-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-changes-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 320px;
  overflow-y: auto;
}
.ai-change-group {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.ai-change-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ai-change-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.ai-change-type-count {
  font-size: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.ai-change-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  padding: 4px 0;
  line-height: 1.5;
  flex-wrap: wrap;
}
.ai-change-from {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.5);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  max-width: 320px;
  word-break: break-word;
}
.ai-change-to {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  max-width: 320px;
  word-break: break-word;
}
.ai-change-arrow { color: var(--text-dim); font-weight: 600; }
.ai-change-count {
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ai-change-overflow {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  padding: 4px 0 0;
}
.ai-changes-empty {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #6ee7b7;
  margin-bottom: 12px;
}

/* BLOG POST ARTICLE */
.post-hero-image {
  width: 100%;
  max-width: 640px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.post-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  border: 1px solid var(--border);
}
.post-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.post-header { margin-bottom: 36px; }
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.post-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}
.post-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 24px;
  background: linear-gradient(90deg, #ffffff 0%, #FFE98A 65%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.post-author-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(157, 78, 221, 0.4);
}
.post-byline-text { display: flex; flex-direction: column; gap: 2px; }
.post-author { font-size: 14px; font-weight: 700; color: var(--text); }
.post-author-meta { font-size: 12px; color: var(--text-dim); }

.post-content {
  font-size: 16.5px;
  line-height: 1.78;
  color: #E7E7E7;
}
.post-content p { margin: 0 0 22px; }
.post-content p strong { color: var(--text); font-weight: 600; }
.post-content p strong a { color: inherit; }
.post-content a {
  color: var(--accent);
  text-decoration-color: rgba(157, 78, 221, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.post-content a:hover { text-decoration-color: var(--accent); }
/* Button-classed anchors inside post content (e.g. a skill page's download button)
   must keep their own text colour. Without this, .post-content a (accent) wins over
   .primary-btn's white and the label goes purple-on-purple, invisible. */
.post-content a.primary-btn { color: var(--accent-ink); text-decoration: none; }
.post-content a.primary-btn:hover { color: var(--accent-ink); }
.post-content a.ghost-btn { color: var(--text); text-decoration: none; }
.post-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}
.post-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
  color: var(--text);
  padding-top: 8px;
}
.post-content h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 40px 0 14px;
  color: var(--accent);
}
.post-signoff {
  margin-top: 32px;
  font-size: 16px;
  color: var(--text-dim);
  font-style: italic;
}
.post-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.post-share {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.post-share .primary-btn,
.post-share .ghost-btn { text-decoration: none; }

@media (max-width: 720px) {
  .post-title { font-size: 32px; }
  .post-content { font-size: 15.5px; }
  .post-content h2 { font-size: 22px; }
  .post-lede { font-size: 17px; }
}
.post-back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 18px;
  transition: color 0.15s ease;
}
.post-back:hover { color: var(--accent); }

/* BLOG INDEX (listing page) */
.blog-index {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 88px;
}
.blog-index-head {
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.blog-index-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-index-head h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 12px 0 14px;
  background: linear-gradient(90deg, #ffffff 0%, #FFE98A 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-index-head p {
  font-size: 16.5px;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
}

/* Category filter */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.blog-filter-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease, background 0.18s ease, border-color 0.15s ease;
  font-family: inherit;
}
.blog-filter-pill:hover { color: var(--text); border-color: var(--accent); }
.blog-filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.blog-empty {
  display: none;
  padding: 48px 4px;
  color: var(--text-dim);
  font-size: 15px;
}

/* Featured / latest post — large horizontal card */
.post-feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 56px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.post-feature:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.post-feature a { display: contents; color: inherit; text-decoration: none; }
.post-feature-media {
  position: relative;
  min-height: 340px;
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.18), rgba(157, 78, 221, 0.18));
}
.post-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-feature-body {
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-feature-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.post-feature-body h2 {
  font-size: 31px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}
.post-feature-body p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.post-feature-meta {
  font-size: 12px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin-bottom: 18px;
}
.post-feature-cta { font-size: 14px; font-weight: 700; color: var(--accent); }

/* Secondary posts row */
.blog-more-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 22px;
}
.blog-row { display: flex; flex-wrap: wrap; gap: 24px; }
.blog-row .blog-card { width: 340px; max-width: 100%; display: flex; flex-direction: column; }
.blog-row .blog-card a { text-decoration: none; color: inherit; display: block; }
.blog-row .blog-thumb {
  height: 188px;
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.18), rgba(157, 78, 221, 0.18));
  overflow: hidden;
  position: relative;
}
.blog-row .blog-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .blog-index-head h1 { font-size: 32px; }
  .post-feature { grid-template-columns: 1fr; }
  .post-feature-media { min-height: 210px; }
  .post-feature-body { padding: 30px 26px; }
  .post-feature-body h2 { font-size: 25px; }
  .blog-row .blog-card { width: 100%; }
}

/* HOME — section navigator (sticky pill bar between hero and content) */
.section-nav {
  position: sticky;
  top: 60px;
  z-index: 40;
  background: rgba(13, 15, 20, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.section-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  align-items: center;
}
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav-progress {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 0;
  margin-right: 6px;
  border-right: 1px solid var(--border);
  height: 26px;
}
.section-nav-progress .progress-track {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.section-nav-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  width: 0;
  transition: width 0.15s linear;
}
.section-nav-progress .progress-label {
  font-size: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-dim);
  font-weight: 600;
  min-width: 28px;
}
.section-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.2s ease, border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  background: transparent;
}
.section-nav-pill .pill-icon { font-size: 14px; line-height: 1; }
.section-nav-pill:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}
.section-nav-pill.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 4px 12px -4px rgba(157, 78, 221, 0.5);
}
.section-nav-arrow {
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.section-nav-arrow:hover { color: var(--text); border-color: var(--accent); }
.section-nav-arrow.left { margin-right: 4px; }
.section-nav-arrow.right { margin-left: 4px; }

/* Account for sticky top + section nav when jumping to anchors */
.home-section { scroll-margin-top: 120px; }
.home-stats { scroll-margin-top: 120px; }

@media (max-width: 720px) {
  .section-nav-arrow { display: none; }
  .section-nav-inner { padding: 10px 16px; }
}

/* ==========================================================
   HOME PAGE — Amit Gupta personal brand landing
   ========================================================== */
.home-page { background: var(--bg); }
.home-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* HERO */
.home-hero {
  position: relative;
  padding: 64px 0 84px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.home-hero-bg {
  position: absolute;
  inset: -200px 0 0 0;
  background:
    radial-gradient(700px 400px at 80% 20%, rgba(157, 78, 221, 0.18), transparent 70%),
    radial-gradient(900px 500px at 10% 0%, rgba(157, 78, 221, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(157, 78, 221, 0.12);
  border: 1px solid rgba(157, 78, 221, 0.3);
  padding: 5px 11px;
  border-radius: 999px;
}
.hero-location {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}
.hero-name {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #ffffff, #FFE98A 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
  margin: 0 0 6px;
}
.hero-tag {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 24px;
}
.hero-summary {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 0 28px;
}
.hero-summary strong { color: var(--text); font-weight: 600; }
.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-cta-row .primary-btn,
.hero-cta-row .ghost-btn {
  text-decoration: none;
}

.home-hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}
.photo-frame {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid rgba(157, 78, 221, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -20px rgba(157, 78, 221, 0.3);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.photo-glow {
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  filter: blur(40px);
  opacity: 0.25;
  z-index: 0;
  animation: photo-spin 18s linear infinite;
}
@keyframes photo-spin {
  to { transform: rotate(360deg); }
}

/* STATS */
.home-stats {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat { text-align: left; }
.stat-num {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: none;
  -webkit-text-fill-color: var(--text-dim);
  margin-left: 4px;
}
.stat-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* SHARED SECTION */
.home-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.home-section.alt { background: var(--bg-elev); }
.section-head {
  margin-bottom: 36px;
  max-width: 720px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 0;
  border-bottom: 1px solid var(--accent);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text);
}
.section-sub {
  font-size: 15px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}
.about-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 18px;
}
.about-text p strong { color: var(--accent); font-weight: 600; }
.about-text p em { color: var(--text); font-style: normal; font-weight: 500; }
.about-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.badge-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.badge-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.badge-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

/* FEATURED TOOLS */
.featured-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ft-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: block;
}
.ft-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px -16px rgba(157, 78, 221, 0.4);
}
.ft-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.ft-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ft-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}
.see-all {
  margin-top: 28px;
  text-align: center;
}
.see-all .ghost-btn { text-decoration: none; }

/* TIMELINE */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.4;
}
.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }
.t-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.timeline-item.highlight .t-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(157, 78, 221, 0.15);
}
.t-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.t-co {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.t-meta {
  font-size: 12px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.t-sub {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}
.role-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.role-list > li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(157, 78, 221, 0.5);
  border-radius: 10px;
  padding: 14px 16px;
}
.role-list strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.role-date {
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.role-list p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}
.role-blurb {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* COMPETENCIES */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.comp-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.comp-block h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: var(--accent);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* QUOTES */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.quote-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin: 0;
  position: relative;
}
.quote-card::before {
  content: "❝";
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 48px;
  color: var(--accent);
  opacity: 0.18;
  line-height: 1;
  font-family: Georgia, serif;
}
.quote-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 16px;
  font-style: italic;
}
.quote-card footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.quote-card footer strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.quote-card footer span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.contact-grid.two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin: 0 auto;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: block;
}
.contact-card:hover:not(.static) {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.contact-card.static { opacity: 0.85; cursor: default; }
.c-icon { font-size: 24px; margin-bottom: 10px; }
.c-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.c-value {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}

/* MOBILE */
@media (max-width: 900px) {
  .home-hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .home-hero-text { order: 2; }
  .home-hero-photo { order: 1; }
  .photo-frame { width: 220px; height: 220px; }
  .hero-name { font-size: 44px; }
  .hero-eyebrow-row { justify-content: center; }
  .hero-cta-row { justify-content: center; }
  .hero-summary { margin-left: auto; margin-right: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .featured-tools-grid { grid-template-columns: 1fr; }
  .comp-grid { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head h2 { font-size: 28px; }
  .home-section { padding: 48px 0; }
  .t-head { flex-direction: column; }
}

/* SHARED TOOL PAGE LAYOUT */
.tool-page { background: var(--bg); }
.tool-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}
.tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.tool-header h1 {
  font-size: 28px;
  margin: 0 0 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tool-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  max-width: 640px;
  line-height: 1.55;
}
.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.tool-grid.single { grid-template-columns: 1fr; }
.tool-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.tool-card h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 14px;
}
.tool-card h3 {
  font-size: 14px;
  margin: 16px 0 8px;
  color: var(--text);
}
.tool-card .field {
  margin-bottom: 12px;
}
.tool-card .field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.tool-card input[type="text"],
.tool-card input[type="url"],
.tool-card input[type="number"],
.tool-card select,
.tool-card textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.tool-card input:focus, .tool-card select:focus, .tool-card textarea:focus {
  border-color: var(--accent);
}
.tool-card textarea { resize: vertical; min-height: 90px; }
.btn-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn-stack > button, .btn-stack > a.primary-btn { flex: 1; min-width: 120px; text-decoration: none; }

/* PDF TOOLS — shared components */
.pdf-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 900px) {
  /* minmax(0,1fr) (not 1fr) so wide children — long <pre> output, etc. — can't
     force the column past the viewport. Must live AFTER the .tool-grid base rule
     so it wins (media queries add no specificity — source order decides). */
  .pdf-tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Tool output blocks must wrap, including long unbroken tokens (URLs, etc.) */
.tool-card pre { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }

.pdf-dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 36px 22px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pdf-dropzone:hover, .pdf-dropzone.drag {
  border-color: var(--accent);
  background: rgba(157, 78, 221, 0.05);
}
.pdf-dz-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.7; }
.pdf-dz-text { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.pdf-dz-hint { font-size: 12px; color: var(--text-dim); }

/* a11y: visually-hidden text for screen readers only */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* a11y: clear keyboard focus ring across tools */
.pdf-dropzone:focus-visible,
.app-card:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.filter:focus-visible {
  outline: 2px solid var(--accent, #9D4EDD);
  outline-offset: 2px;
}

.pdf-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}
.pdf-file-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto 28px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.pdf-file-row.dragging { opacity: 0.5; }
.pdf-file-row:hover { border-color: var(--accent); }
.pdf-file-handle { color: var(--text-dim); font-size: 14px; cursor: grab; }
.pdf-file-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-file-pages { font-size: 11px; color: var(--text-dim); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pdf-file-size { font-size: 11px; color: var(--text-dim); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pdf-file-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}
.pdf-file-remove:hover { color: var(--danger); }

.pdf-result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.pdf-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.pdf-stat-block {
  background: var(--bg-elev2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.pdf-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 4px;
}
.pdf-stat-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.pdf-stat-value.ok { color: var(--ok); }
.pdf-stat-value.bad { color: var(--danger); }

.pdf-progress {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}
.pdf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  transition: width 0.3s ease;
}

.pdf-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px;
}
.pdf-thumb {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.pdf-thumb img, .pdf-thumb canvas { width: 100%; height: auto; display: block; }
.pdf-thumb-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 600;
}
.pdf-thumb.selected { border-color: var(--accent); }
.pdf-thumb.deleted { opacity: 0.4; }
.pdf-thumb.deleted::after {
  content: "✕";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

.privacy-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--ok);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* FILTER BAR (apps page, registry-driven) */
.filter-bar {
  position: sticky;
  top: 60px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px;
  margin: 0 0 28px;
  background: rgba(13, 15, 20, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.5);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  font-family: inherit;
}
.filter:hover {
  background: rgba(157, 78, 221, 0.08);
  border-color: rgba(157, 78, 221, 0.5);
  transform: translateY(-1px);
}
.filter.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 4px 12px -4px rgba(157, 78, 221, 0.4);
}
.filter-count {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}
.filter.active .filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.empty-results {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 24px;
  font-size: 14px;
}
.empty-results .empty-icon { font-size: 38px; margin-bottom: 12px; }
.empty-results a { color: var(--accent); }

/* MINI TOOL CARDS (for blog cross-promo + homepage rows) */
.mini-tool-card {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-width: 240px;
  max-width: 320px;
}
.mini-tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.mini-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.mini-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* HOMEPAGE BANNER */
.home-banner {
  background: linear-gradient(90deg, rgba(157, 78, 221, 0.16), rgba(34, 211, 238, 0.12));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text);
  position: relative;
}
.home-banner-text strong { color: var(--accent); }
.home-banner a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.home-banner-dismiss {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}
.home-banner-dismiss:hover { color: var(--text); }
@media (max-width: 720px) {
  .home-banner { flex-direction: column; gap: 6px; padding: 10px 32px; text-align: center; }
  .home-banner-dismiss { top: 6px; transform: none; }
}

/* APPS PAGE */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.apps-category-nav {
  position: sticky;
  top: 60px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 18px;
  margin: 0 0 36px;
  background: rgba(13, 15, 20, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.5);
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.cat-pill:hover {
  background: rgba(157, 78, 221, 0.1);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.cat-pill-icon { font-size: 14px; line-height: 1; }
.cat-pill-count {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 8px;
  border-radius: 999px;
}
.cat-section {
  margin-bottom: 56px;
  scroll-margin-top: 160px;
}
.cat-section:last-of-type { margin-bottom: 0; }
.cat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cat-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 0;
  margin-bottom: 8px;
}
.cat-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.cat-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  max-width: 460px;
  text-align: right;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .apps-category-nav { padding: 10px 12px; gap: 4px; }
  .cat-pill { font-size: 11.5px; padding: 6px 11px; }
  .cat-head { flex-direction: column; align-items: flex-start; }
  .cat-sub { text-align: left; }
  .cat-title { font-size: 22px; }
}
.app-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}
.app-card.live:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.app-card.coming {
  opacity: 0.78;
  cursor: default;
}
.app-card.coming::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 14px,
    rgba(255, 255, 255, 0.015) 14px,
    rgba(255, 255, 255, 0.015) 28px
  );
  pointer-events: none;
}
.app-card-head {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: relative;
}
.app-icon {
  font-size: 42px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}
.app-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
.app-status.live {
  background: rgba(74, 222, 128, 0.95);
  color: #06281a;
}
.app-card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.app-card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text);
}
.app-card-body p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  flex: 1;
}
.app-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.app-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(157, 78, 221, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
}
.apps-footer-note {
  text-align: center;
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 13px;
}
.apps-footer-note a {
  color: var(--accent);
  text-decoration: none;
}
.apps-footer-note a:hover { text-decoration: underline; }

/* FOOTER */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 40px 24px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 32px;
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-col ul a {
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.footer-brand .logo {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 14px;
}
.footer-tag {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.footer-note {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0;
  line-height: 1.6;
}
.footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .sidebar { max-height: 50vh; }
  .workspace { min-height: 50vh; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 14px; height: 62px; }
  .top-nav { padding: 4px; }
  .nav-link { padding: 7px 13px; font-size: 13px; }
  .brand-name, .brand-author { display: none; }
  .privacy-chip { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 560px) {
  .quote-grid { grid-template-columns: 1fr; }
  /* compact the brand to just the logo so the nav + toolbar buttons fit */
  .brand-author { display: none; }
  .topbar { padding: 0 10px; gap: 6px; }
  .top-nav { gap: 0; }
  .nav-link { padding: 6px 9px; font-size: 13px; }
  /* drop the secondary Reset icon on phones — Download stays */
  .topbar-actions .icon-btn { display: none; }
  .topbar-actions .primary-btn { padding: 8px 12px; font-size: 13px; }
  .footer-inner { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(4, 1fr); }
}

/* ===================== PDF TOOLS — shared components (v2) ===================== */
/* Labelled form fields */
.pdf-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.pdf-field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.pdf-field-hint { font-weight: 400; color: var(--text-dim); font-size: 12px; }
.pdf-field input[type="text"],
.pdf-field input[type="number"],
.pdf-field input[type="password"],
.pdf-field select,
.pdf-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
}
.pdf-field input:focus-visible,
.pdf-field select:focus-visible,
.pdf-field textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.pdf-controls-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 6px;
}
.pdf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-top: 12px; cursor: pointer; }
.pdf-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Selectable thumbnails (delete / extract / organize) */
.pdf-thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pdf-thumb.del-thumb[aria-pressed="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger) inset; }
.pdf-thumb.del-thumb[aria-pressed="true"] img { opacity: 0.45; }
.pdf-thumb.is-deleted { border-style: dashed; }
.pdf-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Metadata editor */
.pdf-meta-fields { margin-top: 4px; }
.pdf-meta-read { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.pdf-meta-read-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.pdf-meta-read-key { color: var(--text-dim); }
.pdf-meta-read-val { color: var(--text); word-break: break-word; }

/* Word frequency list */
.pdf-freq-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.pdf-freq-row { display: grid; grid-template-columns: 120px 1fr 42px; align-items: center; gap: 10px; font-size: 13px; }
.pdf-freq-word { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-freq-bar { background: var(--bg); border-radius: 4px; height: 8px; overflow: hidden; }
.pdf-freq-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #9D4EDD); border-radius: 4px; }
.pdf-freq-count { color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }

/* Sign tool */
/* Narrow controls on the left, a big signing canvas on the right. */
.pdf-sign-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .pdf-sign-grid { grid-template-columns: minmax(0, 1fr); } }
.pdf-sign-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.pdf-sign-tab { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; padding: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pdf-sign-tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pdf-sign-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pdf-sign-canvas { width: 100%; max-width: 100%; background: #fff; border: 1px dashed var(--border); border-radius: 8px; touch-action: none; cursor: crosshair; }
.pdf-sign-pane { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pdf-sign-pane[hidden] { display: none; } /* class rule would otherwise beat the [hidden] UA default */
.pdf-sign-count { margin-top: 10px; font-size: 12px; color: var(--text-dim); }
.pdf-sign-prevhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pdf-sign-pager { display: flex; align-items: center; gap: 6px; }
.pdf-sign-pager .ghost-btn { padding: 4px 12px; font-size: 16px; line-height: 1; }
.pdf-sign-pager select { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.pdf-sign-preview { position: relative; display: block; }
.pdf-sign-preview canvas { width: 100%; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; cursor: crosshair; display: block; }
.pdf-sign-ghost { position: absolute; pointer-events: none; outline: 1px dashed var(--accent); background: rgba(157, 78, 221, 0.06); }
.pdf-sign-ghost img { width: 100%; height: 100%; display: block; }
.pdf-sign-ghost-del { pointer-events: auto; position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; border: 2px solid var(--card, #fff); cursor: pointer; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.pdf-sign-ghost-del:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===================== Legal page (privacy / terms) ===================== */
.legal-doc { max-width: 820px; }
.legal-doc h2 { margin-top: 38px; font-size: 1.5rem; }
.legal-doc h3 { margin-top: 26px; font-size: 1.08rem; color: var(--text); }
.legal-doc p, .legal-doc li { color: var(--text-dim); line-height: 1.7; font-size: 0.98rem; }
.legal-doc ul { margin: 10px 0 10px 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.legal-doc code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 0.85em; color: var(--text); }
.legal-meta { font-size: 0.9rem; color: var(--text-dim); border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.legal-tldr {
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; margin: 18px 0; color: var(--text-dim); line-height: 1.65; font-size: 0.95rem;
}
.legal-tldr strong { color: var(--text); }
.legal-foot { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); font-weight: 600; color: var(--text); }

/* ===================== Per-tool policy acceptance notice (injected) ===================== */
.policy-accept {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 14px 16px;
  margin: 0 auto;
  max-width: 760px;
  line-height: 1.5;
}
.policy-accept a { color: var(--accent); text-decoration: underline; }
.policy-accept a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===================== Learning Center (/learn) ===================== */
/* Hub landing */
.learn-hero-inner { max-width: 820px; }
.learn-sections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.learn-section-card {
  display: block; text-decoration: none; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
  transition: border-color .15s ease, transform .15s ease;
}
.learn-section-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.learn-section-card .ls-emoji { font-size: 26px; }
.learn-section-card h3 { margin: 10px 0 6px; font-size: 1.15rem; color: var(--text); }
.learn-section-card p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; margin: 0 0 10px; }
.learn-section-card .ls-count { font-size: 12px; color: var(--accent); font-weight: 600; }

/* Reference article */
.learn-doc { max-width: 760px; }
.learn-breadcrumb { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.learn-breadcrumb a { color: var(--text-dim); text-decoration: none; }
.learn-breadcrumb a:hover { color: var(--accent); }
.learn-breadcrumb .sep { opacity: 0.5; }
.learn-doc h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 14px; }
.learn-byline { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; }
.learn-byline a { color: var(--text-dim); }
.learn-answer {
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 16px 18px; margin: 0 0 26px; font-size: 1.05rem; line-height: 1.6; color: var(--text);
}
.learn-toc { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; }
.learn-toc strong { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.learn-toc ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.learn-toc a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; }
.learn-toc a:hover { color: var(--accent); }
.learn-doc h2 { font-size: 1.4rem; margin-top: 40px; scroll-margin-top: 90px; }
.learn-doc h3 { font-size: 1.08rem; margin-top: 24px; color: var(--text); }
.learn-doc p, .learn-doc li { color: var(--text-dim); line-height: 1.75; font-size: 1rem; }
.learn-doc ul, .learn-doc ol { margin: 12px 0 12px 1.2rem; display: flex; flex-direction: column; gap: 8px; }
.learn-doc strong { color: var(--text); }
.learn-doc code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 0.85em; color: var(--text); overflow-wrap: anywhere; word-break: break-word; }
.learn-formula { overflow-x: auto; }
.learn-doc a { color: var(--accent); }
/* tables */
.learn-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.learn-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 0.95rem; }
.learn-table th, .learn-table td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; color: var(--text-dim); vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
.learn-table th { background: var(--bg-elev); color: var(--text); font-weight: 600; }
/* formula callout */
.learn-formula { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 16px 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.95rem; color: var(--text); }
/* tool CTA */
.learn-tool-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(157, 78, 221,0.12), rgba(157, 78, 221,0.12));
  border: 1px solid var(--accent); border-radius: 14px; padding: 18px 20px; margin: 30px 0;
}
.learn-tool-cta .ltc-text strong { display: block; color: var(--text); font-size: 1.05rem; }
.learn-tool-cta .ltc-text span { color: var(--text-dim); font-size: 0.9rem; }
/* CTA button is an <a> inside .learn-doc, so .learn-doc a (accent color) was overriding
   .primary-btn's white text -> purple-on-purple, invisible. Restore white, no underline. */
.learn-doc a.primary-btn { color: #fff; text-decoration: none; display: inline-flex; align-items: center; }
.learn-doc a.primary-btn:hover { color: #fff; }
/* FAQ */
.learn-faq { margin-top: 36px; }
.learn-faq h2 { margin-bottom: 6px; }
.learn-faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.learn-faq summary { cursor: pointer; color: var(--text); font-weight: 600; font-size: 1rem; list-style: none; }
.learn-faq summary::-webkit-details-marker { display: none; }
.learn-faq summary::before { content: "+"; color: var(--accent); margin-right: 10px; font-weight: 700; }
.learn-faq details[open] summary::before { content: "–"; }
.learn-faq details p { margin-top: 10px; }
/* related + last-updated */
.learn-related { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 20px; }
.learn-related h2 { font-size: 1.1rem; margin: 0 0 12px; }
.learn-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.learn-related a { color: var(--accent); text-decoration: none; }
.learn-related a:hover { text-decoration: underline; }
.learn-updated { font-size: 12px; color: var(--text-dim); margin-top: 28px; }
@media (max-width: 700px) {
  .learn-sections { grid-template-columns: 1fr; }
  .learn-doc h1 { font-size: 1.6rem; }
}

/* ============================ SKILLS HUB ============================ */
.skills-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; }
.skills-filter .sf-pill {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.skills-filter .sf-pill:hover { color: var(--text); }
.skills-filter .sf-pill.active { color: #fff; border-color: var(--accent); background: rgba(157, 78, 221,0.16); }

.skill-type-group { margin-bottom: 48px; }
.skill-type-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.skill-type-head .sth-icon { font-size: 1.3rem; }
.skill-type-head h2 { font-size: 1.25rem; margin: 0; }
.skill-type-head .sth-blurb { color: var(--text-dim); font-size: 0.92rem; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.skill-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--badge, var(--accent));
  border-radius: 14px; padding: 20px; text-decoration: none; color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--badge, var(--accent)); }
.skill-badge {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--badge, var(--accent)); background: color-mix(in srgb, var(--badge, #9D4EDD) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge, #9D4EDD) 45%, transparent);
  border-radius: 999px; padding: 4px 10px; text-transform: uppercase;
}
.skill-title { font-size: 1.05rem; margin: 0; color: var(--text); }
.skill-desc { font-size: 0.92rem; color: var(--text-dim); margin: 0; line-height: 1.55; flex: 1; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { font-size: 11px; color: var(--text-dim); background: var(--bg-elev2); border-radius: 6px; padding: 3px 8px; }
.skill-cta { font-size: 13px; font-weight: 700; color: var(--badge, var(--accent)); margin-top: 2px; }

/* individual skill page action blocks */
.skill-action { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin: 26px 0; }
.skill-prompt-box { width: 100%; box-sizing: border-box; min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 14px; white-space: pre-wrap; resize: vertical; }
.skill-steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
.skill-steps li { position: relative; padding: 0 0 16px 44px; }
.skill-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 700px) {
  .skill-type-head { gap: 6px; }
  .skill-type-head .sth-blurb { flex-basis: 100%; }
}

/* "What this is" explainer on individual skill pages */
.skill-what { background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin: 22px 0 28px; }
.skill-what p { margin: 7px 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.55; }
.skill-what .sw-label { display: inline-block; min-width: 104px; color: var(--text); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 8px; vertical-align: baseline; }
@media (max-width: 560px) { .skill-what .sw-label { display: block; min-width: 0; margin-bottom: 2px; } }

/* ============ Site search (command palette) ============ */
.site-search-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px;
  padding: 7px 11px; border-radius: 9px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.site-search-btn:hover { border-color: var(--accent); color: var(--text); background: var(--bg-elev2); }
.site-search-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; color: var(--text); }
.site-search-btn .ss-ico { font-size: 13px; line-height: 1; }
.site-search-btn kbd {
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  background: var(--bg-elev2); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; color: var(--text-dim);
}
@media (max-width: 720px) {
  .site-search-btn .ss-btn-label, .site-search-btn kbd { display: none; }
}

/* ============ Unified header: hamburger + mobile sheet ============ */
/* Markup injected by search.js; mirrors home.css. Shown below 720px. */
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; background: transparent; border: 1px solid var(--border); border-radius: 9px; color: var(--text); cursor: pointer; transition: border-color 0.15s ease; }
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-nav { position: fixed; inset: 0; z-index: 900; display: none; background: rgba(8,8,10,0.6); }
.mobile-nav.show { display: block; }
.mobile-nav-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); display: flex; flex-direction: column; gap: 4px; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bg-elev); border-left: 1px solid var(--border); overflow-y: auto; transform: translateX(100%); transition: transform 0.22s cubic-bezier(0.2,0.7,0.2,1); }
.mobile-nav.show .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mobile-nav-head .mn-title { font: 700 12.5px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.mobile-nav-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border); border-radius: 9px; color: var(--text); font-size: 16px; cursor: pointer; }
.mobile-nav-close:hover { border-color: var(--accent); }
.mobile-nav-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-nav .m-search { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 14px; margin-bottom: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim); font: 500 15px var(--body); cursor: pointer; text-align: left; }
.mobile-nav .m-search:hover { border-color: var(--accent); color: var(--text); }
.mobile-nav .m-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-nav .m-link { display: flex; align-items: center; min-height: 48px; padding: 6px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font: 600 17px var(--display); border-bottom: 1px solid var(--border); }
.mobile-nav .m-link:last-of-type { border-bottom: none; }
.mobile-nav .m-link:hover { background: var(--bg-elev2); }
.mobile-nav .m-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-nav .m-link.active { color: var(--accent); }
.mobile-nav .m-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 14px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font: 700 15px var(--body); text-decoration: none; }
.mobile-nav .m-cta:hover { opacity: 0.9; }
.mobile-nav .m-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* desktop dropdown menus on Apps / Skills / Learn */
.top-nav .nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-item > .nav-link { display: inline-flex; align-items: center; }
.nav-caret { display: inline-flex; margin-left: 5px; color: var(--text-dim); transition: transform 0.15s ease; }
.nav-item.open .nav-caret { transform: rotate(180deg); }
.nav-item.open > .nav-link { color: var(--text); }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 238px;
  display: flex; flex-direction: column; gap: 2px; padding: 7px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  z-index: 60;
}
.nav-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.nav-item.open .nav-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.nav-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 44px; padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.nav-menu-item:hover { background: var(--bg-elev2); color: var(--text); }
.nav-menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-menu-all { margin-top: 5px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--accent); font-weight: 700; }

/* mobile accordion: same shortcuts inside the hamburger sheet */
.mobile-nav .m-group { border-bottom: 1px solid var(--border); }
.mobile-nav .m-group:last-of-type { border-bottom: none; }
.mobile-nav .m-row { display: flex; align-items: center; }
.mobile-nav .m-group .m-link { flex: 1; border-bottom: none; }
.mobile-nav .m-acc {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer; border-radius: 8px;
}
.mobile-nav .m-acc:hover { color: var(--text); }
.mobile-nav .m-acc:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mobile-nav .m-acc svg { transition: transform 0.18s ease; }
.mobile-nav .m-acc.open svg { transform: rotate(180deg); }
.mobile-nav .m-sub { display: flex; flex-direction: column; padding: 0 0 6px 12px; }
.mobile-nav .m-sublink { display: flex; align-items: center; min-height: 44px; padding: 4px 12px; color: var(--text-dim); text-decoration: none; font-size: 15px; }
.mobile-nav .m-sublink:hover { color: var(--text); }
.mobile-nav .m-sublink:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mobile-nav .m-sublink-all { color: var(--accent); font-weight: 700; }

@media (max-width: 720px) {
  .top-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-search-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel, .nav-menu, .nav-caret, .mobile-nav .m-acc svg { transition: none; }
}

.site-search-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 10, 16, 0.66); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
}
.site-search-overlay.show { display: flex; }
.site-search-modal {
  width: 100%; max-width: 640px; max-height: 72vh; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 64px -20px rgba(0,0,0,0.7); overflow: hidden;
}
.site-search-inputrow { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.site-search-inputrow .ss-search-ico { font-size: 16px; opacity: 0.7; }
.site-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 16px; padding: 2px 0;
}
.site-search-input::placeholder { color: var(--text-dim); }
.ss-esc {
  font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--text-dim);
  background: var(--bg-elev2); border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 8px; cursor: pointer;
}
.ss-esc:hover { color: var(--text); }
.site-search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.ss-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 11px;
  border-radius: 9px; cursor: pointer; scroll-margin: 8px;
}
.ss-item.active { background: var(--bg-elev2); }
.ss-badge {
  flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 3px 7px; border-radius: 6px; min-width: 62px; text-align: center;
  background: rgba(157, 78, 221,0.14); color: var(--accent);
}
.ss-badge-pdftool { background: rgba(249,115,22,0.16); color: #f9a063; }
.ss-badge-skill, .ss-badge-skills { background: rgba(157, 78, 221,0.16); color: #9D4EDD; }
.ss-badge-learn { background: rgba(16,185,129,0.15); color: #4ade9a; }
.ss-badge-blog { background: rgba(236,72,153,0.15); color: #f49ac8; }
.ss-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-title { color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-title mark { background: rgba(157, 78, 221,0.28); color: inherit; border-radius: 3px; padding: 0 1px; }
.ss-desc { color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-go { flex: none; color: var(--text-dim); font-size: 13px; opacity: 0; }
.ss-item.active .ss-go { opacity: 1; }
.ss-empty { padding: 22px 14px; text-align: center; color: var(--text-dim); font-size: 14px; }
.site-search-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-dim);
}
@media (max-width: 560px) {
  .site-search-overlay { padding: 6vh 10px 10px; }
  .ss-desc { display: none; }
  .site-search-foot span:first-child { display: none; }
}

/* Vote row (up/down arrows + counts) under the page byline. Hidden until /api/stats returns. */
.vote-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding: 9px 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; }
.vote-row .vh { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-weight: 700; font-size: 15px; }
.vote-arrow { background: none; border: none; color: var(--text-dim); font-size: 19px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px; transition: color 0.12s ease, background 0.12s ease; }
.vote-arrow:hover { color: var(--accent); background: var(--bg); }
.vote-row .vh.up .vote-arrow[aria-pressed="true"] { color: #10b981; }
.vote-row .vh.down .vote-arrow[aria-pressed="true"] { color: #ef4444; }
.vote-row .vsep { color: var(--border); }
.vote-row .vdl { color: var(--text-dim); font-weight: 500; font-size: 14px; }

/* ============ PDF SUITE (unified /pdf app) ============ */
.pdf-suite-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.pdf-suite-palette {
  position: sticky;
  top: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.pdf-op-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 10px;
}
.pdf-op-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pdf-op-list { display: flex; flex-direction: column; gap: 2px; }
.pdf-op-group-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 700;
  margin: 12px 6px 4px;
}
.pdf-op-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pdf-op-item:hover { background: rgba(157, 78, 221, 0.08); }
.pdf-op-item.pdf-op-active {
  background: rgba(157, 78, 221, 0.14);
  border-color: var(--accent);
}
.pdf-op-item .pdf-op-emoji { font-size: 15px; line-height: 1; }
.pdf-op-empty { color: var(--text-dim); font-size: 13px; padding: 10px 6px; }

.pdf-suite-work { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pdf-file-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 10px;
}
.pdf-file-tray:empty { display: none; }
.pdf-tray-tile {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 8px;
  cursor: grab;
  transition: border-color 0.12s ease, opacity 0.12s ease;
}
.pdf-tray-tile:hover { border-color: var(--accent); }
.pdf-tray-tile.dragging { opacity: 0.45; }
.pdf-tray-thumb {
  width: 100%;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elev);
  border-radius: 6px;
  overflow: hidden;
  font-size: 30px;
  margin-bottom: 6px;
}
.pdf-tray-thumb img, .pdf-tray-thumb canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.pdf-tray-meta { font-size: 11px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-tray-sub { font-size: 10px; color: var(--text-dim); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pdf-tray-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.pdf-tray-remove:hover { background: var(--danger); }

.pdf-suite-active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.pdf-suite-panel h2, .pdf-suite-result h2 { margin-top: 0; }
/* Wide tools (Sign) take the full work width; the result card stacks below. */
.pdf-suite-active.pdf-suite-wide { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 980px) {
  .pdf-suite-layout { grid-template-columns: minmax(0, 1fr); }
  .pdf-suite-palette {
    position: static;
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  .pdf-op-list { flex-direction: row; flex-wrap: wrap; }
  .pdf-op-group-label { width: 100%; }
  .pdf-op-item { width: auto; }
  .pdf-suite-active { grid-template-columns: minmax(0, 1fr); }
}
