:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #111827;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #d9e0e8;
  --line-strong: #c3ccd6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #e7f5f2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 28rem),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 34rem);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.42);
  outline-offset: 3px;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
.shell { min-height: 100vh; }

.topbar {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(217, 224, 232, 0.9);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #101828 0%, #1f2937 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
  color: #fff;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.menu-wrap {
  position: relative;
}

.menu-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.menu-button:hover, .menu-button:focus-visible { background: var(--surface-soft); border-color: #aeb8c5; }
.menu-button span { background: var(--ink); border-radius: 999px; display: block; height: 2px; width: 18px; }

.nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  max-height: min(640px, calc(100vh - 96px));
  min-width: min(520px, calc(100vw - 36px));
  overflow: hidden;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
}

.nav.is-open { display: grid; gap: 10px; }

.menu-search {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.menu-search label {
  color: #344054;
  display: block;
  font-size: 12px;
  font-weight: 760;
  margin-bottom: 7px;
}

.menu-search input {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

.menu-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.menu-featured {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 10px;
}

.nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #475467;
  display: block;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 11px;
}

.nav a:hover, .nav a:focus-visible { background: var(--surface-soft); border-color: var(--line); color: var(--ink); }

.menu-tools {
  display: grid;
  gap: 12px;
  max-height: min(390px, calc(100vh - 300px));
  overflow-y: auto;
  padding-right: 4px;
}

.menu-group {
  display: grid;
  gap: 4px;
}

.menu-group h2 {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  margin: 4px 0 2px;
  text-transform: uppercase;
}

.menu-group a {
  align-items: center;
  display: grid;
  gap: 3px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 54px;
}

.menu-group a span, .menu-group a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-group a small {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 650;
}

.menu-empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 12px;
  text-align: center;
}

.main {
  margin: 0 auto;
  max-width: 1188px;
  padding: clamp(30px, 6vw, 64px) clamp(18px, 4vw, 34px) 64px;
}

.hero {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  margin-bottom: 38px;
}

.eyebrow {
  align-items: center;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 780;
  gap: 8px;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.eyebrow::before { background: var(--accent); border-radius: 999px; content: ""; height: 8px; width: 8px; }

.hero h1, .tool-title h1 {
  font-size: clamp(38px, 5.8vw, 72px);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
  max-width: 820px;
}

.tool-title h1 { max-width: 920px; }

.hero p, .tool-title p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
  margin: 18px 0 0;
  max-width: 680px;
}

.search-panel, .tool-panel, .output-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel { align-self: start; padding: 20px; }

.search-panel label, .field label {
  color: #344054;
  display: block;
  font-size: 13px;
  font-weight: 740;
  margin-bottom: 8px;
}

.search, .field input, .field select, .field textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  width: 100%;
}

.search { min-height: 50px; padding: 0 14px; }
.search::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--subtle); }
.search:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.stats { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }

.stat {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
}

.stat strong { display: block; font-size: 25px; line-height: 1; }
.stat span { color: var(--muted); display: block; font-size: 12px; margin-top: 6px; }

.filter-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.filter-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 720;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.filter-chip span {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 760;
}

.filter-chip:hover {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-chip.is-active span {
  color: rgba(255, 255, 255, 0.72);
}

.filter-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 0 0 2px;
}

.section-title {
  align-items: end;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 38px 0 14px;
  padding-top: 24px;
}

.section-title h2 { font-size: 20px; letter-spacing: 0; margin: 0; }
.section-title span { color: var(--muted); font-size: 13px; font-weight: 650; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 154px;
  padding: 18px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.card:hover, .card:focus-visible {
  background: #fff;
  border-color: rgba(15, 118, 110, 0.48);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.card-top { align-items: center; display: flex; gap: 10px; justify-content: space-between; }

.pill {
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 780;
  padding: 5px 8px;
}

.card-action { color: var(--subtle); font-size: 12px; font-weight: 740; }
.card h3 { font-size: 17px; letter-spacing: 0; line-height: 1.24; margin: 15px 0 10px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.48; margin: 0; }

.tool-title { border-bottom: 1px solid var(--line); padding-bottom: 28px; }

.tool-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.68fr);
  margin-top: 28px;
}

.tool-panel, .output-panel { padding: clamp(20px, 3vw, 28px); }
.tool-panel::before, .output-panel::before {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.tool-panel::before { content: "Input"; }
.output-panel::before { content: "Output"; }
.tool-panel form { display: grid; gap: 16px; }
.field input, .field select, .field textarea { min-height: 48px; padding: 10px 12px; }
.field textarea { line-height: 1.48; min-height: 136px; resize: vertical; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.button {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 760;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button:hover, .button:focus-visible { background: #0b1220; border-color: #0b1220; box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14); transform: translateY(-1px); }
.button.secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover, .button.secondary:focus-visible { background: var(--surface-soft); border-color: #aeb8c5; box-shadow: none; }

.result-label { color: var(--muted); font-size: 13px; font-weight: 720; margin: 0 0 10px; }

.result {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 22px;
}

.result-list {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0;
  margin-top: 14px;
  overflow: hidden;
}

.result-item { display: flex; gap: 12px; justify-content: space-between; padding: 12px 14px; }
.result-item + .result-item { border-top: 1px solid var(--line); }
.result-item span:first-child { color: var(--muted); }
.result-item span:last-child { color: var(--ink); font-weight: 760; text-align: right; }
.copy-row { margin-top: 16px; }

.not-found {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.code-output { margin: 18px 0 0; }

.qr {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-flex;
  justify-content: center;
  margin: 0;
  padding: 12px;
}

.barcode { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0; max-width: 100%; overflow-x: auto; padding: 12px; }

.explainer {
  border-top: 1px solid var(--line);
  margin-top: clamp(34px, 6vw, 58px);
  padding-top: clamp(28px, 5vw, 44px);
}

.explainer > div:first-child {
  max-width: 780px;
}

.explainer .eyebrow {
  margin-bottom: 12px;
}

.explainer h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
  margin: 0;
}

.explainer p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 14px 0 0;
}

.explainer-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  overflow: hidden;
}

.explainer-grid > div {
  background: rgba(255, 255, 255, 0.72);
  padding: 18px;
}

.explainer-grid > div + div {
  border-left: 1px solid var(--line);
}

.explainer h3 {
  font-size: 15px;
  letter-spacing: 0;
  margin: 0;
}

.explainer-grid p {
  font-size: 14px;
  line-height: 1.55;
  margin-top: 9px;
}
.generated-code { display: block; max-width: 100%; }
.media-error { color: #b42318; font-size: 14px; margin: 0; }

@media (max-width: 860px) {
  .explainer-grid { grid-template-columns: 1fr; }
  .explainer-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .hero, .tool-layout { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { gap: 12px; min-height: 64px; padding-bottom: 10px; padding-top: 10px; }
  .nav { left: auto; max-height: calc(100vh - 84px); min-width: calc(100vw - 36px); right: 0; }
  .menu-featured { grid-template-columns: 1fr; }
  .menu-tools { max-height: calc(100vh - 330px); }
  .main { padding-top: 28px; }
  .grid, .row, .stats { grid-template-columns: 1fr; }
  .filter-bar { gap: 7px; }
  .filter-chip { flex: 1 1 auto; justify-content: center; }
  .hero h1, .tool-title h1 { font-size: 42px; }
  .hero p, .tool-title p { font-size: 16px; }
  .result { padding: 18px; }
}


.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 680;
  gap: 16px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1188px;
  padding: 24px clamp(18px, 4vw, 34px) 38px;
}

.site-footer a:hover, .site-footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.content-page {
  max-width: 860px;
}

.content-page h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
}

.content-intro {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
  margin: 18px 0 0;
  max-width: 760px;
}

.content-sections {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.content-sections section, .disclaimer {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.content-sections h2, .disclaimer h2 {
  font-size: 16px;
  letter-spacing: 0;
  margin: 0;
}

.content-sections p, .disclaimer p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  margin: 9px 0 0;
}

.disclaimer {
  border-color: #d8c49a;
  box-shadow: none;
  margin-top: 22px;
}

.disclaimer h2 {
  color: #7a4b00;
}

.disclaimer a {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}
