/* ========================================================================
   Webtools — shared styles
   Playful & colorful aesthetic
   ====================================================================== */

:root {
  --cream: #FFF6E8;
  --cream-2: #FBEDD3;
  --ink: #1B1B2F;
  --ink-soft: #4A4A63;
  --ink-mute: #8A8AA0;
  --paper: #FFFFFF;
  --line: #1B1B2F;

  --yellow: #FFC93C;
  --yellow-soft: #FFE39A;
  --pink: #FF6FA5;
  --pink-soft: #FFC8DD;
  --mint: #5DD4A4;
  --mint-soft: #B9EFD7;
  --sky: #6CA8FF;
  --sky-soft: #CCDEFF;
  --lilac: #B594FF;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-hard: 6px 6px 0 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 0 var(--ink);
  --shadow-hard-xs: 3px 3px 0 0 var(--ink);

  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(255, 201, 60, 0.18), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255, 111, 165, 0.14), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(93, 212, 164, 0.16), transparent 50%);
}

::selection { background: var(--yellow); color: var(--ink); }

/* ===== Typography ===================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(40px, 6vw, 76px); line-height: 0.95; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; }
h3 { font-size: 22px; line-height: 1.2; }

p { margin: 0; }

a { color: var(--ink); text-decoration: none; }

.mono { font-family: var(--font-mono); }

/* ===== Layout shell =================================================== */

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: var(--ink);
  border-radius: 12px;
  position: relative;
  display: inline-grid;
  place-items: center;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  box-shadow: var(--shadow-hard-xs);
  transform: rotate(-4deg);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -6px -6px auto auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-pill {
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
}
.nav-pill:hover { background: var(--cream-2); color: var(--ink); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: var(--shadow-hard-xs);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-back:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 0 var(--ink); }
.btn-back svg { width: 14px; height: 14px; }

/* ===== Home: hero ===================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: end;
  padding: 36px 0 56px;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 20px; } }

.hero-title {
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.92;
}
.hero-title .blob {
  display: inline-block;
  background: var(--yellow);
  padding: 0 14px;
  border-radius: 14px;
  transform: rotate(-2deg);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
}
.hero-title .blob.pink { background: var(--pink); color: var(--ink); transform: rotate(2deg); }
.hero-title .blob.mint { background: var(--mint); transform: rotate(-1.5deg); }

.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 460px;
  margin-top: 22px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
  text-align: right;
}
@media (max-width: 820px) { .hero-meta { align-items: flex-start; text-align: left; } }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 820px) { .chip-row { justify-content: flex-start; } }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-weight: 600;
}
.chip.y { background: var(--yellow-soft); }
.chip.p { background: var(--pink-soft); }
.chip.m { background: var(--mint-soft); }

/* ===== Tools grid ===================================================== */

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 20px;
}
.section-label::before, .section-label::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--ink);
  opacity: 0.12;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 24px 24px 22px;
  min-height: 320px;
  box-shadow: var(--shadow-hard);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.tool-card:hover {
  transform: translate(-4px, -4px) rotate(-0.4deg);
  box-shadow: 10px 10px 0 0 var(--ink);
}
.tool-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.tool-card h3 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.tool-card p {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 18px;
}
.tool-card .open {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
}
.tool-card .open svg { width: 14px; height: 14px; }

.tool-card .icon {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  transform: rotate(-6deg);
}
.tool-card .icon.pink { background: var(--pink); }
.tool-card .icon.mint { background: var(--mint); }
.tool-card .icon.sky  { background: var(--sky); }

.tool-card .icon svg { width: 30px; height: 30px; color: var(--ink); }

.tool-card .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.tool-card .meta-row .chip {
  font-size: 11px;
  padding: 4px 10px;
}

.tool-card::after {
  /* decorative corner blob */
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--yellow-soft);
  z-index: 0;
}
.tool-card.pink::after { background: var(--pink-soft); }
.tool-card.mint::after { background: var(--mint-soft); }
.tool-card > * { position: relative; z-index: 1; }

/* ===== Footer band ==================================================== */

.foot-band {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
}
@media (max-width: 820px) { .foot-band { grid-template-columns: 1fr; } }
.foot-band h4 {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 8px;
}
.foot-band p { color: rgba(255,246,232,.7); font-size: 14px; }
.foot-band .ft-stat { display: flex; flex-direction: column; gap: 4px; }
.foot-band .ft-stat .n {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--yellow);
  letter-spacing: -0.03em;
}
.foot-band .ft-stat.pink .n { color: var(--pink); }
.foot-band .ft-stat.mint .n { color: var(--mint); }
.foot-band .ft-stat .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,246,232,.6);
}

/* ===== Tool page ====================================================== */

.tool-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 0 28px;
}
.tool-header .badge {
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  display: grid;
  place-items: center;
  transform: rotate(-4deg);
  box-shadow: var(--shadow-hard-sm);
}
.tool-header h1 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1;
}
.tool-header .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.tool-header .lede {
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 8px;
  max-width: 560px;
}

.workspace {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 3px solid var(--ink);
  background: var(--cream-2);
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.tab:not(:last-child) { border-right: 3px solid var(--ink); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -3px;
  width: 50px;
  height: 6px;
  background: var(--yellow);
  border-radius: 4px;
}
.tab .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-mute);
}
.tab[aria-selected="true"] .dot { background: var(--yellow); }
.tab .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(27,27,47,.08);
  color: var(--ink-soft);
}
.tab[aria-selected="true"] .count { background: var(--yellow); color: var(--ink); }

.panels { padding: 24px; }
.panel { display: none; }
.panel[data-active="true"] { display: block; }

/* ===== Input panel ==================================================== */

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.input-meta .lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.input-meta .counters {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.input-meta .counters b { color: var(--ink); font-weight: 600; }

.textbox {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  padding: 18px 20px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  outline: none;
  transition: box-shadow .12s ease, transform .12s ease;
}
.textbox:focus {
  background: var(--paper);
  box-shadow: var(--shadow-hard-xs);
  transform: translate(-1px, -1px);
}
.textbox.mono { font-family: var(--font-mono); font-size: 14px; line-height: 1.6; }

.examples {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.examples .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 4px;
}
.example-chip {
  font-size: 13px;
  padding: 7px 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 500;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.example-chip:hover {
  background: var(--yellow-soft);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-xs);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-xs);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 0 var(--ink);
}
.btn:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ink);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn svg { width: 16px; height: 16px; }

.btn-submit { background: var(--yellow); }
.btn-stop { background: var(--pink); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: var(--cream-2); box-shadow: none; transform: none; }

.action-spacer { flex: 1; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--cream-2);
  color: var(--ink-soft);
}
.status-pill .led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-mute);
}
.status-pill[data-state="running"] { background: var(--yellow-soft); color: var(--ink); }
.status-pill[data-state="running"] .led { background: var(--yellow); animation: pulse 1.2s ease-in-out infinite; }
.status-pill[data-state="done"] { background: var(--mint-soft); color: var(--ink); }
.status-pill[data-state="done"] .led { background: var(--mint); }
.status-pill[data-state="stopped"] { background: var(--pink-soft); color: var(--ink); }
.status-pill[data-state="stopped"] .led { background: var(--pink); }
.status-pill[data-state="error"] { background: #FFD9D9; color: var(--ink); }
.status-pill[data-state="error"] .led { background: #E63946; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.55; }
}

/* ===== Result panel =================================================== */

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.result-toolbar .left {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.result-toolbar .right { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-hard-xs);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-family: var(--font-body);
  color: var(--ink);
}
.btn-tool:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.btn-tool:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-tool.copied { background: var(--mint); }
.btn-tool svg { width: 14px; height: 14px; }

.result-box {
  min-height: 240px;
  max-height: 460px;
  overflow-y: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--cream);
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.55;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-mute) transparent;
}
.result-box::-webkit-scrollbar { width: 10px; }
.result-box::-webkit-scrollbar-track { background: transparent; }
.result-box::-webkit-scrollbar-thumb { background: var(--ink-mute); border-radius: 999px; border: 2px solid var(--cream); }
.result-box.has-content { border-style: solid; background: var(--paper); }
.result-box.has-content::-webkit-scrollbar-thumb { border-color: var(--paper); }

.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 200px;
  color: var(--ink-mute);
}
.result-empty .badge {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px; background: var(--cream-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  border: 2.5px dashed var(--ink-mute);
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.result-empty .t { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink-soft); }
.result-empty .s { font-size: 13px; max-width: 320px; }

/* Streaming caret */
.caret {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--ink);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 0.85s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* Issue list for Checker */
.issue-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.issue {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 14px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.issue .ix {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid var(--ink);
  white-space: nowrap;
}
.issue.spelling .ix { background: var(--pink-soft); }
.issue.grammar .ix { background: var(--yellow-soft); }
.issue.style .ix { background: var(--mint-soft); }
.issue.punctuation .ix { background: var(--sky-soft); }
.issue .body .quote { font-family: var(--font-mono); font-size: 12.5px; }
.issue .body .quote del { text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
.issue .body .quote ins {
  text-decoration: none;
  background: var(--mint-soft);
  padding: 0 4px;
  border-radius: 4px;
}
.issue .body .why { font-size: 12px; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }
.issue .acc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

/* Validator status */
.val-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--mint-soft);
  margin-bottom: 16px;
}
.val-banner.invalid { background: #FFD9D9; }
.val-banner .icn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--paper);
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.val-banner .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.val-banner .sub { font-size: 13px; color: var(--ink-soft); }

.val-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 640px) { .val-stats { grid-template-columns: repeat(2, 1fr); } }
.val-stat {
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.val-stat .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.val-stat .l {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}

.json-pretty {
  margin: 0;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
}
.json-pretty .k { color: var(--yellow); }
.json-pretty .s { color: var(--mint); }
.json-pretty .n { color: var(--pink); }
.json-pretty .b { color: var(--sky); }
.json-pretty .nu { color: var(--lilac); }
.json-pretty .pn { color: rgba(255,246,232,.5); }

/* Generator ideas */
.idea-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.idea {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  transition: transform .15s ease;
}
.idea:hover { transform: translateY(-2px); }
.idea .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
}
.idea:nth-child(3n+1) .num { background: var(--yellow); }
.idea:nth-child(3n+2) .num { background: var(--pink); }
.idea:nth-child(3n+3) .num { background: var(--mint); }

.idea h4 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.idea p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.idea .tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.idea .tags .t {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-weight: 600;
}

/* Generator config row */
.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin: 16px 0 4px;
}
@media (max-width: 640px) { .config-row { grid-template-columns: 1fr; } }
.config {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.config .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.seg {
  display: flex;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.seg button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--ink-soft);
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}

/* Helpers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-hard-sm);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 1px; }


/* ========================================================================
   Dashboard layout (sidebar + topbar + main)
   ====================================================================== */

.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
}

/* ----- Sidebar ----- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  color: var(--cream);
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 3px solid var(--ink);
}
@media (max-width: 880px) {
  .sidebar { position: relative; height: auto; }
}
.sidebar .brand { color: var(--cream); font-size: 22px; }
.sidebar .brand-mark { background: var(--yellow); color: var(--ink); box-shadow: none; transform: rotate(-4deg); }
.sidebar .brand-mark::after { background: var(--pink); border-color: var(--cream); }

.side-section {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,246,232,.4);
  padding: 0 12px;
  margin-top: 4px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,246,232,.78);
  font-weight: 500;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  position: relative;
}
.side-item:hover { background: rgba(255,246,232,.06); color: var(--cream); }
.side-item .icn {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,246,232,.06);
  border: 1.5px solid transparent;
}
.side-item .icn svg { width: 14px; height: 14px; }
.side-item .pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,246,232,.08);
  color: rgba(255,246,232,.7);
}
.side-item[aria-current="page"] {
  background: var(--cream);
  color: var(--ink);
}
.side-item[aria-current="page"] .icn { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.side-item[aria-current="page"] .pill { background: var(--ink); color: var(--cream); }

/* ---- Sidebar dropdown groups ------------------------------------------ */
.side-group-btn {
  width: 100%;
  font-family: inherit;
  border: none;
  background: transparent;
  text-align: left;
}
.side-group-btn .cv {
  width: 14px; height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: .6;
  transition: transform .2s ease;
}
.side-group-btn .pill + .cv { margin-left: 8px; }
.side-group.open .side-group-btn .cv { transform: rotate(180deg); opacity: 1; }
.side-group.open > .side-group-btn { color: var(--cream); }

.side-sub-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .22s ease;
}
.side-group.open .side-sub-wrap { grid-template-rows: 1fr; }
.side-sub-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 3px;
}
.side-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 19px;
  padding: 8px 12px;
  border-left: 1.5px solid rgba(255,246,232,.12);
  border-radius: 0 10px 10px 0;
  color: rgba(255,246,232,.62);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.side-sub:hover { background: rgba(255,246,232,.06); color: var(--cream); }
.side-sub.is-active { background: rgba(255,246,232,.1); color: var(--cream); }
.side-sub .sub-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}
.side-sub.is-active .sub-dot { background: var(--yellow); opacity: 1; }
.side-sub.is-soon {
  font-style: italic;
  cursor: default;
  opacity: .45;
}
.side-sub.is-soon:hover { background: transparent; color: rgba(255,246,232,.62); }

/* ---- Limit 2 Checker — page-specific bits ----------------------------- */
.lc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-threads {
  width: 72px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 9px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.lc-progress { margin: 6px 0 2px; }
.lc-progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.lc-progress-bar {
  height: 12px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
}
.lc-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--yellow);
  transition: width .2s ease;
}
.lc-box.has-content { max-height: 48vh; overflow-y: auto; padding: 0; }
.lc-list { display: flex; flex-direction: column; }
.lc-row {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 12px;
  border-bottom: 1.5px dashed rgba(0,0,0,.1);
  color: var(--ink);
  word-break: break-all;
}
.lc-row:last-child { border-bottom: none; }

/* ---- Endian Converter — page-specific bits ---------------------------- */
.ec-hint { font-size: 12.5px; color: var(--ink-mute); margin-top: 8px; }
.ec-hint b { color: var(--ink); font-weight: 600; }
.ec-error {
  display: none;
  margin-top: 14px;
  padding: 11px 15px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--pink);
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
}
.ec-stats {
  display: none;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.ec-stat {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px 14px;
  background: var(--cream);
}
.ec-stat .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.ec-stat .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.ec-table-wrap {
  display: none;
  margin-top: 16px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  overflow: auto;
  max-height: 52vh;
}
.ec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}
.ec-table thead th {
  position: sticky;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  text-align: left;
  padding: 10px 14px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ec-table tbody td {
  padding: 8px 14px;
  border-bottom: 1.5px dashed rgba(0,0,0,.12);
  color: var(--ink);
  white-space: nowrap;
}
.ec-table tbody tr:last-child td { border-bottom: none; }
.ec-table tbody tr:hover td { background: var(--yellow-soft); }
.ec-col-idx { color: var(--ink-mute); }
.ec-col-conv { color: #1c7d3e; font-weight: 600; }
.ec-col-bin { color: var(--ink-soft); font-size: 11px; white-space: normal; word-break: break-all; }

.ec-result { display: none; margin-top: 16px; }
.ec-rows {
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1.5px dashed rgba(0,0,0,.12);
}
.ec-row:last-child { border-bottom: none; }
.ec-row .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex-shrink: 0;
  width: 132px;
}
.ec-row .v {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  word-break: break-all;
  flex: 1;
}
.ec-row .v.big { font-weight: 700; }
.ec-copy {
  flex-shrink: 0;
  border: 2px solid var(--ink);
  background: var(--cream);
  border-radius: 999px;
  padding: 5px 13px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background .12s ease;
}
.ec-copy:hover { background: var(--yellow); }

.ec-info {
  margin-top: 18px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--cream);
  overflow: hidden;
}
.ec-info summary {
  padding: 13px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.ec-info summary::-webkit-details-marker { display: none; }
.ec-info summary::before { content: "\25B8  "; color: var(--ink-soft); }
.ec-info[open] summary::before { content: "\25BE  "; }
.ec-info-body {
  padding: 2px 18px 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.ec-info-body p { margin: 6px 0; }
.ec-info-body b { color: var(--ink); }
.ec-info-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--yellow-soft);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

/* ---- Packet Decoder — page-specific bits ------------------------------ */
.aes-badge {
  display: none;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--yellow-soft);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 13px;
  width: fit-content;
}
#crypto-config.is-dimmed { opacity: .4; pointer-events: none; }
.aes-out {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 80px;
  max-height: 56vh;
  overflow: auto;
  color: var(--ink);
}
.aes-out.is-error {
  border-color: #c0392b;
  background: var(--pink);
  font-weight: 600;
}
.aes-meta {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.aes-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--cream);
  color: var(--ink-soft);
}
.aes-pill b { color: var(--ink); font-weight: 700; }
.aes-seeds {
  margin-top: 16px;
  flex-direction: column;
  gap: 10px;
}
.aes-seed-row {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--cream);
}
.aes-seed-row.ok { border-color: #1c7d3e; }
.aes-seed-row.fail { opacity: .55; }
.aes-seed-row .head {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.aes-seed-row .head b { color: var(--ink); }
.aes-seed-row .prev {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
  margin-top: 5px;
}
.hl-token { color: #1c7d3e; font-weight: 600; }
.hl-key   { color: #9a6b00; font-weight: 600; }
.hl-hex   { color: #7a4fd0; }
.hl-muted { color: var(--ink-mute); }

/* ---- Send Card Sampah — page-specific bits ---------------------------- */
.sc-input {
  padding: 11px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: box-shadow .12s ease;
}
.sc-input:focus { box-shadow: var(--shadow-hard-xs); }
.sc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}
.sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--cream);
}
.sc-card {
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 11px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background .1s ease, color .1s ease;
}
.sc-card[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.sc-log {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 140px;
  max-height: 56vh;
  overflow: auto;
}
.sc-line { white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.sc-line.is-warning { color: #9a6b00; }
.sc-line.is-error { color: #c0392b; }
.sc-line.is-success { color: #1c7d3e; font-weight: 600; }
.sc-empty { color: var(--ink-mute); }

/* ---- Script Runner — page-specific bits ------------------------------- */
.sr-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 2px 0 14px;
}
.sr-req { color: #c0392b; }
#arg-form .field textarea.textbox { min-height: 110px; }

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,246,232,.06);
  border-radius: 14px;
  border: 1.5px solid rgba(255,246,232,.08);
}
.user-card .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pink);
  display: grid; place-items: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  border: 2px solid var(--ink);
}
.user-card .name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--cream); line-height: 1.15; }
.user-card .role { font-size: 11px; color: rgba(255,246,232,.55); font-family: var(--font-mono); letter-spacing: 0.08em; }
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: 1.5px solid rgba(255,246,232,.15);
  border-radius: 12px;
  color: rgba(255,246,232,.8);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-logout:hover { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.btn-logout svg { width: 14px; height: 14px; }

/* ----- Main ----- */
.main { display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: 2px solid rgba(27,27,47,.08);
  background: rgba(255,246,232,.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.app-topbar .crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.app-topbar .crumbs .sep { opacity: .4; }
.app-topbar .crumbs .here { color: var(--ink); font-weight: 600; }

.app-topbar .search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  flex: 1;
  max-width: 320px;
  margin-left: auto;
}
.app-topbar .search svg { width: 14px; height: 14px; }
.app-topbar .search input {
  border: none; background: transparent; outline: none;
  font: inherit; color: var(--ink); flex: 1; min-width: 0;
}
.app-topbar .icn-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
}
.app-topbar .icn-btn svg { width: 14px; height: 14px; }
.app-topbar .icn-btn .dot {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pink); border: 2px solid var(--cream);
}

.app-main {
  padding: 28px 32px 48px;
  max-width: 1280px;
  width: 100%;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}
.page-head .lede {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 6px;
  max-width: 540px;
}
.page-head .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.page-head .actions { display: flex; gap: 8px; }

/* ========================================================================
   Login screen
   ====================================================================== */

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 0;
}
@media (max-width: 880px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none !important; }
}

.login-form-side {
  display: flex;
  flex-direction: column;
  padding: 36px 56px;
  background: var(--cream);
  justify-content: space-between;
}
@media (max-width: 640px) { .login-form-side { padding: 28px 24px; } }
.login-form-side .brand { font-size: 22px; }
.login-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.login-form-wrap .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.login-form-wrap h1 {
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 0.95;
  margin-bottom: 8px;
}
.login-form-wrap h1 .blob {
  background: var(--yellow);
  padding: 0 10px;
  border-radius: 10px;
  display: inline-block;
  transform: rotate(-1.5deg);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.login-form-wrap .sub {
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 15px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input {
  padding: 13px 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: box-shadow .12s ease, transform .12s ease;
}
.field input:focus { box-shadow: var(--shadow-hard-xs); transform: translate(-1px, -1px); }
.field .hint { font-size: 12px; color: var(--ink-mute); }

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 18px;
}
.checkbox {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-soft); cursor: pointer;
  user-select: none;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox .box {
  width: 18px; height: 18px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  display: grid; place-items: center;
  transition: background .12s ease;
}
.checkbox input:checked ~ .box { background: var(--mint); }
.checkbox .box svg { width: 12px; height: 12px; opacity: 0; }
.checkbox input:checked ~ .box svg { opacity: 1; }

.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-xs);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-login:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 0 var(--ink); }
.btn-login svg { width: 16px; height: 16px; }

.login-meta {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}
.login-meta a { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--yellow); }

.login-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-mute); }

.login-art {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,201,60,.22), transparent 40%),
    radial-gradient(circle at 20% 90%, rgba(255,111,165,.22), transparent 45%),
    radial-gradient(circle at 70% 80%, rgba(93,212,164,.18), transparent 40%);
  pointer-events: none;
}
.login-art > * { position: relative; z-index: 1; }
.login-art .quote {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 420px;
}
.login-art .quote em {
  font-style: normal;
  background: var(--yellow);
  color: var(--ink);
  padding: 0 8px;
  border-radius: 8px;
  display: inline-block;
  transform: rotate(-1deg);
}
.login-art .quote .pink { background: var(--pink); transform: rotate(1deg); }
.login-art .who {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,246,232,.55);
  margin-top: 14px;
}

.login-art .stick-stack {
  position: absolute;
  inset: auto 0 32% 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.sticker {
  width: 120px; height: 120px;
  background: var(--yellow);
  border: 3px solid var(--cream);
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: var(--ink);
  margin: 0 -18px;
  box-shadow: 6px 6px 0 0 rgba(0,0,0,.4);
}
.sticker.b { background: var(--pink); transform: rotate(-6deg); }
.sticker.c { background: var(--mint); transform: rotate(8deg); margin-top: 18px; }
.sticker.a { transform: rotate(-2deg); margin-top: 6px; }
.sticker svg { width: 56px; height: 56px; }

.login-art .stat-row {
  display: flex;
  gap: 28px;
}
.login-art .stat .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.login-art .stat.y .n { color: var(--yellow); }
.login-art .stat.p .n { color: var(--pink); }
.login-art .stat.m .n { color: var(--mint); }
.login-art .stat .l {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,246,232,.5);
  margin-top: 6px;
}

/* ========================================================================
   Dashboard overview cards
   ====================================================================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-hard-xs);
}
.stat-card .l {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.stat-card .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-card .d {
  font-size: 12px; color: var(--ink-soft); margin-top: 6px;
}
.stat-card .accent {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
}
.stat-card .accent svg { width: 14px; height: 14px; color: var(--ink); }
.stat-card.y .accent { background: var(--yellow); }
.stat-card.p .accent { background: var(--pink); }
.stat-card.m .accent { background: var(--mint); }
.stat-card.s .accent { background: var(--sky); }
.stat-card .trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--mint-soft);
  margin-top: 10px;
  font-weight: 600;
}
.stat-card .trend.down { background: var(--pink-soft); }

.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

.panel-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-hard-xs);
}
.panel-card .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-card .head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel-card .head .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.tool-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .tool-tiles { grid-template-columns: 1fr; } }
.tool-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tool-tile:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--ink); background: var(--paper); }
.tool-tile .icn {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  background: var(--yellow);
}
.tool-tile .icn svg { width: 18px; height: 18px; }
.tool-tile.p .icn { background: var(--pink); }
.tool-tile.m .icn { background: var(--mint); }
.tool-tile h4 { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.tool-tile p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.tool-tile .go {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tool-tile .go svg { width: 11px; height: 11px; }

.activity {
  display: flex; flex-direction: column; gap: 10px;
}
.act-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--cream);
  border: 1.5px solid rgba(27,27,47,.08);
}
.act-row .dotbig {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  background: var(--yellow);
}
.act-row .dotbig.p { background: var(--pink); }
.act-row .dotbig.m { background: var(--mint); }
.act-row .dotbig svg { width: 12px; height: 12px; }
.act-row .title {
  font-size: 13px; font-weight: 600;
}
.act-row .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.act-row .time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

/* Adjust workspace to fit dashboard */
.workspace.in-dash { box-shadow: none; }
