@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../fonts/tektur-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

:root {
  --font-body: 'Space Grotesk', 'Segoe UI', Inter, 'Noto Sans', Arial, sans-serif;
  --font-display: 'Tektur', 'Arial Black', 'Segoe UI', sans-serif;
  --bg-a: #f2f7ff;
  --bg-b: #e8fff8;
  --ink: #09121e;
  --ink-soft: #344459;
  --brand-blue: #1d67ff;
  --brand-cyan: #00cfff;
  --brand-mint: #15e39a;
  --brand-orange: #ff8f2f;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.95);
  --line: rgba(7, 18, 30, 0.14);
  --line-strong: rgba(7, 18, 30, 0.26);
  --shadow-soft: 0 18px 40px rgba(12, 26, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(12, 26, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  background:
    radial-gradient(circle at 8% 12%, rgba(0, 207, 255, 0.17), transparent 34%),
    radial-gradient(circle at 94% 8%, rgba(29, 103, 255, 0.15), transparent 32%),
    radial-gradient(circle at 78% 90%, rgba(21, 227, 154, 0.14), transparent 38%),
    linear-gradient(168deg, var(--bg-a), var(--bg-b));
  overflow-x: hidden;
}

body.palette-open,
body.nav-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: 0.2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(7, 18, 30, 0.08) 0,
      rgba(7, 18, 30, 0.08) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(7, 18, 30, 0.06) 0,
      rgba(7, 18, 30, 0.06) 1px,
      transparent 1px,
      transparent 48px
    );
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.44;
}

.shape-a {
  width: 360px;
  height: 360px;
  right: -90px;
  top: -130px;
  background: radial-gradient(circle, rgba(0, 207, 255, 0.88), rgba(29, 103, 255, 0.28));
}

.shape-b {
  width: 320px;
  height: 320px;
  left: -85px;
  bottom: -130px;
  background: radial-gradient(circle, rgba(255, 143, 47, 0.45), rgba(21, 227, 154, 0.36));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.88rem 1.2rem;
  backdrop-filter: blur(14px);
  background: rgba(246, 251, 255, 0.8);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(18, 38, 63, 0.2);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
  color: #11305d;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(0, 207, 255, 0.12);
  border-color: rgba(0, 207, 255, 0.45);
  transform: translateY(-1px);
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.93rem;
  letter-spacing: 0.015em;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
  transform: translateY(-1px);
  background: rgba(0, 207, 255, 0.13);
  border-color: rgba(0, 207, 255, 0.45);
}

.language-wrap select {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.45rem 0.72rem;
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

main {
  width: min(1120px, 94%);
  margin: 1.8rem auto 2.9rem;
}

.hero {
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 255, 0.88)),
    var(--panel);
  box-shadow: var(--shadow-strong);
}

.tag {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.78rem;
  border: 1px solid rgba(0, 207, 255, 0.45);
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #04466f;
  background: linear-gradient(130deg, rgba(0, 207, 255, 0.2), rgba(21, 227, 154, 0.14));
}

h1 {
  margin: 0 0 0.8rem;
  line-height: 1.08;
  font-size: clamp(2.05rem, 5.9vw, 3.9rem);
  letter-spacing: -0.018em;
}

.lead {
  margin: 0;
  max-width: 74ch;
  color: var(--ink-soft);
}

.signal-row {
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signal-row li {
  padding: 0.36rem 0.66rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 103, 255, 0.28);
  background: rgba(255, 255, 255, 0.86);
  color: #0a4e7a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cta-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.78rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0.66rem 1.06rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 12px 26px rgba(19, 70, 166, 0.34);
}

.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--line-strong);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled,
button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.stats {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.82rem;
}

.stats li {
  padding: 0.66rem 0.94rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.stats strong {
  margin-inline-end: 0.32rem;
  font-size: 1.18rem;
  color: #064a75;
}

.panel {
  margin-top: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(244, 250, 255, 0.88)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  margin: 0 0 0.42rem;
}

.panel p {
  margin: 0;
  color: var(--ink-soft);
}

.grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  position: relative;
  padding: 0.96rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.87);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(0, 207, 255, 0);
  transition: border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 31, 52, 0.13);
}

.card:hover::after {
  border-color: rgba(0, 207, 255, 0.4);
}

.card h3 {
  margin: 0 0 0.3rem;
}

.mini-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.faq-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.9rem;
}

.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.tool-help-intro {
  margin-top: 0.4rem;
}

.tool-help-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.tool-help-steps {
  margin: 0;
  padding-inline-start: 1.1rem;
  color: var(--ink-soft);
  display: grid;
  gap: 0.42rem;
}

.tool-help-faq {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.12rem;
}

.tool-help-faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.66rem 0.8rem;
}

.tool-help-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.tool-help-faq p {
  margin-top: 0.45rem;
}

.ops-panel {
  border-top: 1px solid rgba(14, 116, 144, 0.22);
}

.ops-grid {
  margin-top: 0.9rem;
}

.ops-card {
  display: grid;
  gap: 0.34rem;
}

.ops-card h3 {
  margin: 0;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.ops-card p {
  margin: 0;
}

.ops-resource-list {
  margin-top: 0.1rem;
  display: grid;
  gap: 0.42rem;
}

.ops-resource-list li {
  margin: 0;
}

.tool-card {
  display: grid;
  gap: 0.62rem;
}

.track-card {
  display: grid;
  gap: 0.52rem;
}

.track-card .playbook-list {
  margin-top: 0.12rem;
}

.tool-meta {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0b5f95;
  font-weight: 700;
}

.tool-card .btn {
  width: fit-content;
}

.tool-explorer {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.tool-toolbar {
  display: grid;
  gap: 0.8rem;
  padding: 0.96rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.tool-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: end;
}

.tool-search-field,
.tool-filter-field {
  display: grid;
  gap: 0.35rem;
}

.tool-search-field {
  flex: 1 1 280px;
}

.tool-filter-field {
  flex: 0 1 220px;
}

.tool-input-label,
.tool-chip-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b5f95;
  font-weight: 700;
}

.tool-search-input,
.tool-filter-select,
.tool-palette-input {
  width: 100%;
  padding: 0.7rem 0.82rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font: inherit;
}

.tool-search-input:focus,
.tool-filter-select:focus,
.tool-palette-input:focus,
.tool-chip:focus,
.tool-palette-item:focus,
.nav-toggle:focus {
  outline: 2px solid rgba(29, 103, 255, 0.35);
  outline-offset: 2px;
}

.tool-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tool-toolbar-actions .btn.ghost.is-active,
.tool-save-btn.is-active {
  color: #0a4e7a;
  background: rgba(29, 103, 255, 0.14);
  border-color: rgba(29, 103, 255, 0.38);
}

.tool-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.tool-status-summary,
.tool-status-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.tool-chip-groups {
  display: grid;
  gap: 0.8rem;
}

.tool-chip-group {
  display: grid;
  gap: 0.45rem;
}

.tool-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(29, 103, 255, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: #0a4e7a;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.tool-chip.is-empty {
  border-style: dashed;
  color: var(--ink-soft);
  cursor: default;
}

.tool-catalog-grid {
  margin-top: 0;
}

.tool-card.is-hidden {
  display: none;
}

.tool-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.tool-card.is-favorite::after {
  border-color: rgba(29, 103, 255, 0.3);
}

.tool-save-btn {
  min-width: 6.6rem;
}

.tool-empty-state {
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(7, 18, 30, 0.2);
  background: rgba(255, 255, 255, 0.72);
}

.tool-empty-state[hidden] {
  display: none;
}

.tool-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(7, 18, 30, 0.42);
  backdrop-filter: blur(8px);
}

.tool-palette-overlay.is-open {
  display: flex;
}

.tool-palette {
  width: min(760px, 100%);
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(247, 251, 255, 0.96);
  box-shadow: var(--shadow-strong);
}

.tool-palette-header {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.tool-palette-title {
  margin: 0;
}

.tool-palette-close {
  width: auto;
}

.tool-palette-list {
  display: grid;
  gap: 0.6rem;
  max-height: min(60vh, 520px);
  overflow-y: auto;
}

.tool-palette-item {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  text-align: start;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.tool-palette-item-title {
  font-weight: 700;
}

.tool-palette-item-meta,
.tool-palette-empty {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.tool-palette-empty {
  margin: 0;
  padding: 0.8rem 0.1rem;
}

.blog-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.post-card {
  display: grid;
  gap: 0.62rem;
}

.post-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #1e5b86;
  font-weight: 600;
}

.article-hero h1 {
  max-width: 18ch;
}

.article-hero-rich h1 {
  max-width: 22ch;
}

.blog-hero-media {
  margin: 1rem 0 0;
}

.blog-hero-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: block;
}

.article-shell {
  padding: 1.05rem 1.2rem;
}

.playbook-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.playbook-side {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.playbook-list {
  margin: 0.7rem 0 0;
  padding-inline-start: 1.14rem;
  color: var(--ink-soft);
  display: grid;
  gap: 0.42rem;
}

.playbook-faq {
  margin-top: 0.8rem;
}

.visual-card img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
}

.playbook-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.playbook-card {
  display: grid;
  gap: 0.58rem;
}

.playbook-card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.playbook-mini-card {
  display: grid;
  gap: 0.5rem;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.breadcrumbs a {
  color: #0a5a8f;
  font-weight: 700;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.article-prose {
  max-width: 74ch;
}

.article-prose h2 {
  margin: 1.15rem 0 0.4rem;
  font-size: 1.24rem;
  line-height: 1.3;
}

.article-prose p {
  margin: 0;
}

.article-prose ul {
  margin: 0.7rem 0 0;
  padding-inline-start: 1.14rem;
  color: var(--ink-soft);
  display: grid;
  gap: 0.42rem;
}

.drop-zone {
  margin-top: 0.82rem;
  border: 2px dashed rgba(12, 103, 173, 0.4);
  border-radius: 17px;
  padding: 1rem;
  text-align: center;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.8), rgba(243, 252, 255, 0.72));
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragover {
  border-color: var(--brand-blue);
  background: rgba(0, 207, 255, 0.12);
  outline: none;
}

.file-input-hidden {
  display: none;
}

.hint {
  margin-top: 0.66rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.options-grid {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field span,
.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field input,
.field select,
.textarea-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.56rem 0.62rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.field input:focus,
.field select:focus,
.textarea-field textarea:focus,
.language-wrap select:focus {
  outline: 2px solid rgba(0, 207, 255, 0.45);
  outline-offset: 1px;
}

.field-inline {
  align-items: flex-start;
  justify-content: center;
}

.field-inline input[type='checkbox'] {
  width: auto;
  margin-top: 0.35rem;
  transform: scale(1.15);
}

.textarea-field textarea {
  resize: vertical;
  min-height: 120px;
}

.results-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0.86rem;
  display: grid;
  gap: 0.65rem;
}

.result-card h3 {
  margin: 0;
  font-size: 0.97rem;
  word-break: break-word;
}

.result-preview {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(146deg, #ffffff, #edf8ff);
}

.result-meta {
  display: grid;
  gap: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.result-meta p {
  margin: 0;
}

.hash-output {
  width: 100%;
  min-height: 92px;
  font: 500 0.85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

.qa-source-card h3 {
  margin: 0 0 0.52rem;
}

.qa-range-wrap {
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.qa-range-wrap input[type='range'] {
  width: 100%;
}

.qa-split-control {
  margin-top: 0.84rem;
}

.qa-metric-card {
  display: grid;
  gap: 0.35rem;
}

.qa-metric-card p {
  margin: 0;
}

.qa-metric-value {
  font-size: 1.25rem;
  color: #0b4f7e;
}

.qa-verdict-pass {
  color: #06714d;
}

.qa-verdict-review {
  color: #9b5d00;
}

.qa-verdict-fail {
  color: #ad1725;
}

.qa-canvas-wrap {
  background:
    linear-gradient(45deg, #e3e9ef 25%, transparent 25%, transparent 75%, #e3e9ef 75%),
    linear-gradient(45deg, #e3e9ef 25%, transparent 25%, transparent 75%, #e3e9ef 75%);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
}

#previewCanvas {
  cursor: grab;
}

#previewCanvas:active {
  cursor: grabbing;
}

.canvas-wrap {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.86);
}

.preview-canvas {
  display: block;
  width: 100%;
  max-height: 560px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #eef7ff);
}

.color-row {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.color-chip {
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  display: inline-block;
}

.preview-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.preview-block h3 {
  margin: 0 0 0.5rem;
}

.checkerboard {
  background:
    linear-gradient(45deg, #e3e9ef 25%, transparent 25%, transparent 75%, #e3e9ef 75%),
    linear-gradient(45deg, #e3e9ef 25%, transparent 25%, transparent 75%, #e3e9ef 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

.palette-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.palette-swatch {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.swatch-preview {
  border-radius: 11px;
  min-height: 84px;
  border: 1px solid rgba(7, 18, 30, 0.12);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.5rem;
}

.swatch-preview strong {
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  background: rgba(255, 255, 255, 0.66);
  border-radius: 8px;
  padding: 0.16rem 0.36rem;
}

.swatch-rgb,
.swatch-share {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.palette-output {
  margin-top: 0.9rem;
}

.favicon-snippet {
  margin-top: 0.9rem;
}

.table-wrap {
  margin-top: 0.8rem;
  overflow-x: auto;
}

.rename-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rename-table th,
.rename-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.58rem 0.66rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.rename-table th {
  font-size: 0.9rem;
  color: #0a456f;
  background: rgba(0, 207, 255, 0.08);
}

.rename-table tr:last-child td {
  border-bottom: 0;
}

.inline-link {
  color: #0a5a8f;
  font-weight: 700;
}

.site-footer {
  width: min(1120px, 94%);
  margin: 0 auto 2.2rem;
  padding-top: 1.12rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-links a {
  color: #0a5a8f;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.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;
}

.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.995);
  animation: rise 0.72s ease forwards;
}

#tools.reveal {
  animation-delay: 0.1s;
}

#trust.reveal {
  animation-delay: 0.08s;
}

#how.reveal {
  animation-delay: 0.16s;
}

#blog.reveal {
  animation-delay: 0.22s;
}

#why.reveal {
  animation-delay: 0.28s;
}

#faq.reveal {
  animation-delay: 0.34s;
}

#governance.reveal {
  animation-delay: 0.4s;
}

#value.reveal {
  animation-delay: 0.46s;
}

#final-cta.reveal {
  animation-delay: 0.52s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html[dir='rtl'] body {
  text-align: right;
}

html[dir='rtl'] .site-header {
  flex-direction: row-reverse;
}

html[dir='rtl'] .brand {
  flex-direction: row-reverse;
}

html[dir='rtl'] .cta-row {
  justify-content: flex-end;
}

@media (max-width: 920px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-header.nav-enhanced {
    position: sticky;
    gap: 0.75rem;
    align-items: center;
  }

  .site-header.nav-enhanced .nav-toggle {
    display: inline-flex;
  }

  .site-header.nav-enhanced nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    z-index: 31;
    order: 4;
    width: auto;
    padding: 0.75rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(248, 252, 255, 0.98);
    box-shadow: var(--shadow-soft);
    justify-content: stretch;
    flex-direction: column;
  }

  .site-header.nav-enhanced.is-nav-open nav {
    display: flex;
  }

  .site-header.nav-enhanced nav a {
    width: 100%;
    text-align: center;
  }

  .tool-toolbar-row,
  .tool-status {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-toolbar-actions {
    width: 100%;
  }

  .tool-toolbar-actions .btn {
    flex: 1 1 180px;
  }

  main,
  .site-footer {
    width: min(1120px, 95%);
  }

  .playbook-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-word {
    font-size: 0.96rem;
  }

  .site-header.nav-enhanced .language-wrap,
  .site-header.nav-enhanced .nav-toggle {
    width: 100%;
  }

  .site-header.nav-enhanced .nav-toggle {
    justify-content: center;
  }

  .btn {
    width: 100%;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-toolbar-actions .btn,
  .tool-card-actions .btn,
  .tool-chip,
  .tool-palette-close {
    width: 100%;
  }

  .tool-palette-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
