:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-elevated: rgba(255, 255, 255, 0.84);
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111318;
  --muted: #626978;
  --border: rgba(17, 19, 24, 0.12);
  --border-strong: rgba(17, 19, 24, 0.2);
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --blue: #2563eb;
  --amber: #b7791f;
  --coral: #dd4b39;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --max: 1160px;
  --header-height: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101114;
  --bg-elevated: rgba(24, 25, 30, 0.82);
  --surface: #18191e;
  --surface-soft: #202229;
  --text: #f4f4f5;
  --muted: #a3a7b3;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.16);
  --blue: #60a5fa;
  --amber: #f4b740;
  --coral: #fb7165;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-y: scroll;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 320px),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

main {
  min-height: calc(100vh - var(--header-height));
  contain: layout paint;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100% - 32px, var(--max));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.16), transparent),
    var(--text);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: var(--surface-soft);
  color: var(--text);
}

.theme-toggle,
.nav-toggle,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.tool-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.theme-toggle:hover,
.nav-toggle:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.tool-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.theme-toggle {
  padding: 0 13px;
  font-weight: 700;
  background: var(--surface-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  gap: 4px;
  background: var(--surface-soft);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: var(--text);
  transition: transform 160ms ease, opacity 160ms ease;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.section,
.hero,
.page-head,
.tool-page {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - var(--header-height) - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 56px;
}

.hero-content {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3.2rem, 9vw, 7.2rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

h3 {
  font-size: 1.08rem;
}

.hero-copy,
.page-copy,
.section-copy,
.tool-copy,
.card-copy {
  color: var(--muted);
}

.hero-copy {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.proof-item {
  min-height: 78px;
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.proof-item strong {
  font-size: 1.28rem;
  line-height: 1;
}

.proof-item span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .primary-button {
  color: #071312;
}

.secondary-button {
  background: var(--surface);
}

.ghost-button {
  background: transparent;
}

.product-preview {
  position: relative;
  min-height: 460px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), transparent 42%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--coral);
}

.preview-dot:nth-child(2) {
  background: var(--amber);
}

.preview-dot:nth-child(3) {
  background: var(--accent);
}

.preview-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 14px;
  height: calc(100% - 52px);
}

.preview-rail,
.preview-main,
.preview-mini {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-rail {
  padding: 14px;
}

.preview-chip {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.preview-chip.is-selected {
  color: var(--text);
  background: var(--accent-soft);
}

.preview-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 16px;
}

.preview-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-value {
  font-size: 2rem;
  font-weight: 850;
}

.preview-meter {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.preview-meter span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.preview-keypad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.preview-keypad span,
.preview-mini {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}

.preview-keypad span:nth-child(4n),
.preview-keypad span:last-child {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .preview-keypad span:nth-child(4n),
[data-theme="dark"] .preview-keypad span:last-child {
  color: #071312;
}

.preview-mini {
  min-height: 62px;
  border-style: dashed;
}

.section {
  padding: 42px 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 460px;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-copy {
  max-width: 620px;
  margin: 10px 0 0;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.tool-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tool-card {
  min-height: 182px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-card::after {
  content: "";
  height: 2px;
  width: 42px;
  margin-top: auto;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.28;
  transition: width 180ms ease, opacity 180ms ease;
}

.tool-card h3,
.tool-card p {
  overflow-wrap: anywhere;
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.tool-card:hover::after,
.tool-card:focus-visible::after {
  width: 72px;
  opacity: 0.85;
}

.tool-card[hidden] {
  display: none;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  font-weight: 850;
}

.tool-icon.blue {
  color: var(--blue);
}

.tool-icon.amber {
  color: var(--amber);
}

.tool-icon.coral {
  color: var(--coral);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.card-copy {
  margin: 0;
  font-size: 0.96rem;
}

.tool-card-footer {
  color: var(--accent);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 850;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.filter-button:active {
  transform: translateY(1px);
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.feature-item {
  min-height: 142px;
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 72px),
    var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.feature-item::before {
  content: "";
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.62;
}

.feature-item:nth-child(2)::before {
  background: var(--blue);
}

.feature-item:nth-child(3)::before {
  background: var(--amber);
}

.feature-item h3 {
  font-size: 1rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-strip a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-weight: 800;
}

.category-strip a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.search-box {
  position: relative;
  width: min(100%, 520px);
}

.search-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.empty-results {
  margin: 18px 0 0;
  color: var(--muted);
}

.ad-slot {
  min-height: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.ad-slot span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ad-slot.tall {
  min-height: 340px;
  height: 340px;
  align-content: center;
}

.page-head {
  min-height: 260px;
  padding: 58px 0 28px;
}

.page-head h1 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.page-copy {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.tool-page {
  min-height: 460px;
  padding: 34px 0 58px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 20px;
  align-items: start;
}

.tool-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.tool-shell-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.tool-shell-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.tool-copy {
  margin: 8px 0 0;
}

.tool-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.field > input,
.field > select,
.generated-output,
.result-output {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field > input,
.field > select {
  padding: 0 12px;
}

.field > input:focus,
.field > select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field > input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.related-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.related-link {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.related-link span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.related-link:hover,
.related-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.check-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.tool-button {
  min-height: 48px;
  padding: 0 16px;
  background: var(--surface);
  font-weight: 850;
}

.tool-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .tool-button.primary {
  color: #071312;
}

.tool-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.generated-output,
.result-output {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  word-break: break-word;
  font-weight: 800;
}

.result-output.large {
  min-height: 96px;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
}

.status-line {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.calculator {
  display: grid;
  gap: 14px;
}

.calc-display {
  min-height: 92px;
  display: flex;
  align-items: end;
  justify-content: end;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.calc-display output {
  width: 100%;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 850;
  line-height: 1;
  text-align: right;
  word-break: break-all;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.calc-key {
  aspect-ratio: 1.2 / 1;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.calc-key:hover,
.calc-key:focus-visible {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.calc-key.operator {
  color: var(--accent);
}

.calc-key.action {
  color: var(--coral);
}

.calc-key.equal {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .calc-key.equal {
  color: #071312;
}

.calc-key.zero {
  aspect-ratio: 1.2 / 1;
}

.metric-fields[hidden],
.us-fields[hidden] {
  display: none;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat {
  min-height: 86px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat strong {
  font-size: 1.25rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.about-panel,
.principle-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.about-panel {
  padding: 22px;
}

.about-panel p {
  margin: 12px 0 0;
  color: var(--muted);
}

.principle-list {
  display: grid;
}

.principle {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.principle:last-child {
  border-bottom: 0;
}

.principle p {
  margin: 0;
  color: var(--muted);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.content-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
}

.content-panel section {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.content-panel section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.content-panel p,
.content-panel li {
  margin: 0;
  color: var(--muted);
}

.content-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-item span {
  color: var(--muted);
  font-weight: 800;
}

.contact-item a {
  color: var(--accent);
  font-weight: 850;
  word-break: break-word;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq-item h3 {
  margin-bottom: 8px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.textarea-field {
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.textarea-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.qr-output {
  min-height: 236px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.qr-output canvas,
.qr-output img {
  width: min(100%, 220px);
  height: auto;
}

.color-swatch {
  min-height: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tool-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.textarea-field {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.textarea-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.output-pre {
  min-height: 150px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.status-line {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-value-list {
  display: grid;
  gap: 12px;
}

.tool-value {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tool-value span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-value strong,
.tool-value code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1rem;
}

.color-swatch {
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.tool-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 24px;
  padding: 34px 0;
}

.footer-copy {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-title {
  margin: 0 0 12px;
  font-weight: 850;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 650;
}

.footer-links a:hover {
  color: var(--text);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 800;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

@media (max-width: 980px) {
  .hero,
  .tool-layout,
  .about-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
    gap: 34px;
  }

  .product-preview {
    min-height: 390px;
  }

  .tool-grid,
  .tool-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-band,
  .related-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ad-slot.tall {
    min-height: 140px;
    height: 140px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 60px;
  }

  .nav-shell {
    min-height: 60px;
    gap: 10px;
  }

  .nav-toggle {
    display: grid;
    width: 40px;
    min-height: 40px;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    justify-content: flex-start;
  }

  .theme-toggle {
    min-width: 58px;
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 0.74rem;
  }

  .hero {
    min-height: auto;
    padding: 36px 0 40px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .hero-actions,
  .section-header,
  .tool-shell-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-preview {
    min-height: 330px;
    padding: 12px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-rail {
    display: none;
  }

  .tool-grid,
  .tool-grid.compact,
  .form-grid,
  .stats-strip,
  .footer-shell,
  .hero-proof,
  .feature-band,
  .related-tools {
    grid-template-columns: 1fr;
  }

  .tool-panel,
  .tool-shell-head {
    padding: 16px;
  }

  .page-head {
    min-height: 220px;
  }

  .tool-page {
    min-height: 380px;
  }
}

@media (max-width: 430px) {
  .section,
  .hero,
  .page-head,
  .tool-page,
  .footer-shell,
  .nav-shell {
    width: min(100% - 24px, var(--max));
  }

  .brand span:last-child {
    display: none;
  }

  .nav-shell {
    width: min(100% - 18px, var(--max));
  }

  .nav-toggle {
    width: 38px;
    min-height: 38px;
  }

  .theme-toggle {
    min-width: 56px;
    min-height: 38px;
    padding: 0 10px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .calc-grid {
    gap: 8px;
  }

  .calc-key {
    min-height: 50px;
    font-size: 1rem;
  }

  .tool-card {
    min-height: 164px;
    padding: 15px;
  }

  .theme-toggle:hover,
  .nav-toggle:hover,
  .primary-button:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .icon-button:hover,
  .tool-button:hover,
  .tool-card:hover,
  .tool-card:focus-visible,
  .related-link:hover,
  .related-link:focus-visible {
    transform: none;
  }

  .result-output.large {
    font-size: 1.35rem;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .tool-button {
    width: 100%;
  }

  .control-row {
    align-items: stretch;
  }

  .filter-button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
