/* =========================================================
   ONLINE TOOLS & CONVERTERS
   Main stylesheet for onlinetoolsandconverters.cc
   ========================================================= */

/* ---------- Design tokens ---------- */

:root {
  --forest: #123c36;
  --forest-dark: #0b2925;
  --forest-soft: #e5efea;
  --green: #176b57;
  --lime: #d6ef72;
  --lime-hover: #c9e65c;

  --ink: #182722;
  --muted: #64746d;
  --line: #dce5de;
  --paper: #f7f8f3;
  --white: #fff;

  --blue: var(--forest);
  --blue-600: var(--green);
  --purple: #7a8e45;

  --ok: #126b4e;
  --err: #b42318;

  --radius-xs: 8px;
  --radius-sm: 11px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(24, 39, 34, .045);
  --shadow-md: 0 12px 30px rgba(24, 39, 34, .09);

  --maxw: 1160px;

  --font:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  --mono:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}


/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .55em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.027em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: .92em;
}

pre {
  overflow: auto;
}

::selection {
  color: var(--forest-dark);
  background: var(--lime);
}

:focus-visible {
  outline: 3px solid rgba(23, 107, 87, .35);
  outline-offset: 3px;
}

.container {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  z-index: 1000;
  top: 0;
  left: -9999px;
  padding: 12px 16px;
  border-radius: 0 0 9px 0;
  background: var(--lime);
  color: var(--forest-dark);
  font-weight: 800;
}

.skip-link:focus {
  left: 0;
}


/* =========================================================
   HEADER AND NAVIGATION
   ========================================================= */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 243, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--forest);
  font-size: .99rem;
  font-weight: 850;
  letter-spacing: -.035em;
}

.brand:hover {
  color: var(--forest);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 41px;
  place-items: center;
  border-radius: 13px;
  background: var(--forest);
  color: var(--lime);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-text {
  line-height: 1.35;
}

.brand-text span {
  color: var(--green);
}

.nav-toggle,
.menu-toggle {
  display: none;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--forest);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 0;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--forest);
  content: "";
  transition: transform .18s ease, top .18s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 10px 13px;
  border-radius: 9px;
  color: #506159;
  font-size: .9rem;
  font-weight: 700;
}

.primary-nav a:hover {
  background: var(--forest-soft);
  color: var(--forest);
  text-decoration: none;
}

.primary-nav a.is-active {
  background: var(--forest);
  color: var(--white);
}


/* =========================================================
   GENERIC BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: .93rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.btn:hover {
  border-color: #b9c9bd;
  background: #f6faf7;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

.btn-primary:hover {
  border-color: var(--forest-dark);
  background: var(--forest-dark);
  color: var(--white);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--forest);
}

.btn-ghost {
  border-color: transparent;
  background: var(--forest-soft);
  color: var(--forest);
}

.btn-sm {
  min-height: 35px;
  padding: 7px 12px;
  font-size: .84rem;
}

.btn:disabled,
button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.btn-row,
.button-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}


/* =========================================================
   HOMEPAGE HERO
   ========================================================= */

.otc-hero {
  position: relative;
  overflow: hidden;
  padding: 73px 0 68px;
  background:
    radial-gradient(
      ellipse at 90% 2%,
      rgba(214, 239, 114, .32),
      transparent 35%
    ),
    #eef2e8;
  border-bottom: 1px solid #d9e1d4;
}

.otc-hero::after {
  position: absolute;
  right: -100px;
  bottom: -240px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(18, 60, 54, .09);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(18, 60, 54, .025),
    0 0 0 70px rgba(18, 60, 54, .02);
  content: "";
  pointer-events: none;
}

.otc-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

.otc-hero-copy {
  min-width: 0;
}

.otc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 21px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.otc-eyebrow-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--green);
  transform: rotate(45deg);
}

.otc-hero h1 {
  max-width: 700px;
  margin-bottom: 22px;
  color: var(--forest);
  font-size: clamp(2.6rem, 5.5vw, 4.7rem);
  letter-spacing: -.065em;
  line-height: .99;
}

.otc-hero h1 span {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-weight: 650;
}

.otc-hero-description {
  max-width: 570px;
  margin-bottom: 27px;
  color: #4e6056;
  font-size: 1.04rem;
  line-height: 1.85;
}

.otc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-bottom: 25px;
}

.otc-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .93rem;
  font-weight: 850;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.otc-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.otc-button-dark {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.otc-button-dark:hover {
  border-color: var(--forest-dark);
  background: var(--forest-dark);
  color: #fff;
}

.otc-button-light {
  border-color: var(--line);
  background: #fff;
  color: var(--forest);
}

.otc-button-light:hover {
  background: var(--forest-soft);
}

.otc-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: .92rem;
  font-weight: 800;
}

.otc-text-link:hover {
  gap: 12px;
  text-decoration: none;
}

.otc-hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 17px;
  color: #526259;
  font-size: .79rem;
  font-weight: 650;
}

.otc-hero-notes span > span {
  margin-right: 4px;
  color: var(--green);
  font-weight: 900;
}


/* ---------- Hero toolbox panel ---------- */

.otc-hero-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d3ded3;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 20px 50px rgba(24, 51, 39, .09);
}

.otc-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 1px 17px;
  border-bottom: 1px solid var(--line);
}

.otc-panel-label {
  color: #637167;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.otc-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #547062;
  font-size: .76rem;
  font-weight: 750;
}

.otc-live-mark > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4b9c70;
}

.otc-shortcut {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 9px;
  border-bottom: 1px solid #edf0eb;
  color: var(--ink);
}

.otc-shortcut:last-of-type {
  border-bottom: 0;
}

.otc-shortcut:hover {
  border-radius: 10px;
  background: #f8faf5;
  text-decoration: none;
}

.otc-shortcut-icon,
.otc-category-icon,
.otc-card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  font-weight: 900;
}

.otc-shortcut-icon {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  font-size: .95rem;
}

.otc-shortcut-copy {
  display: block;
  min-width: 0;
  flex: 1;
}

.otc-shortcut-copy strong {
  display: block;
  color: var(--forest);
  font-size: .9rem;
  line-height: 1.45;
}

.otc-shortcut-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
}

.otc-shortcut-arrow {
  color: #65776b;
  font-size: 1.1rem;
  font-weight: 800;
}

.otc-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 2px 0;
  color: var(--muted);
  font-size: .79rem;
}

.otc-panel-footer a {
  color: var(--green);
  font-weight: 850;
}


/* ---------- Category icon palettes ---------- */

.otc-icon-orange {
  background: #ffead9;
  color: #92501e;
}

.otc-icon-yellow {
  background: #f5edc8;
  color: #75611a;
}

.otc-icon-blue {
  background: #dfeaf8;
  color: #2d5279;
}

.otc-icon-green {
  background: #d9eee3;
  color: #225e43;
}

.otc-icon-purple {
  background: #ebe2f6;
  color: #6d4a8a;
}

.otc-icon-pink {
  background: #f5dfeb;
  color: #873e67;
}


/* =========================================================
   CATEGORY SECTION
   ========================================================= */

.otc-category-strip {
  padding: 59px 0 66px;
  background: #fff;
}

.otc-section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.otc-section-kicker {
  margin-bottom: 9px;
  color: var(--green);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.otc-section-intro h2 {
  margin: 0;
  color: var(--forest);
}

.otc-section-intro > p {
  max-width: 330px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .9rem;
}

.otc-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.otc-category-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.otc-category-card:hover,
.otc-category-card.is-active {
  border-color: #afc7b3;
  background: #f5f9f2;
  transform: translateY(-1px);
}

.otc-category-icon {
  width: 43px;
  height: 43px;
  grid-row: 1 / 3;
  border-radius: 12px;
  font-size: .93rem;
}

.otc-category-name {
  min-width: 0;
  color: var(--forest);
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.4;
}

.otc-category-description {
  grid-column: 2;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.55;
}

.otc-category-arrow {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  color: #728278;
  font-weight: 850;
}


/* =========================================================
   DIRECTORY SECTION
   ========================================================= */

.otc-directory {
  background: var(--paper);
}

.otc-directory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 27px;
}

.otc-directory-heading h2 {
  margin-bottom: 9px;
  color: var(--forest);
}

.otc-directory-description {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.otc-directory-count {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 7px;
  padding: 10px 13px;
  border: 1px solid #d7e1d6;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: .75rem;
}

.otc-directory-count strong {
  color: var(--forest);
  font-size: 1.25rem;
}

.otc-directory-controls {
  max-width: 760px;
  margin-bottom: 21px;
}

.otc-search {
  position: relative;
  display: flex;
  align-items: center;
}

.otc-search-symbol {
  position: absolute;
  left: 17px;
  color: var(--green);
  font-size: 1.65rem;
  line-height: 1;
  pointer-events: none;
}

.otc-search input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 14px 75px 14px 48px;
  border: 1px solid #cfdad0;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .96rem;
  box-shadow: var(--shadow-sm);
}

.otc-search input::placeholder {
  color: #87938b;
}

.otc-search input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(23, 107, 87, .12);
}

.otc-clear-search {
  position: absolute;
  top: 50%;
  right: 9px;
  min-width: 50px;
  min-height: 35px;
  padding: 6px 9px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #536359;
  font-size: .77rem;
  font-weight: 800;
  cursor: pointer;
}

.otc-clear-search:hover {
  border-color: #adc3b2;
  background: #f5f9f4;
  color: var(--forest);
}

.otc-search-status {
  min-height: 22px;
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: .82rem;
}

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

.otc-filter {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #d8e0d9;
  border-radius: 8px;
  background: #fff;
  color: #536359;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.otc-filter:hover {
  border-color: #a8c2ae;
  color: var(--forest);
}

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

.otc-filter-count {
  font-size: .73rem;
  opacity: .8;
}


/* ---------- Directory cards ---------- */

.otc-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.otc-tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 39, 34, .025);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.otc-tool-card:hover {
  transform: translateY(-3px);
  border-color: #abc4af;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.otc-card-top {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.otc-card-icon {
  min-width: 42px;
  min-height: 42px;
  padding: 5px;
  border-radius: 11px;
  font-size: .85rem;
  letter-spacing: -.02em;
}

.otc-tag {
  max-width: 70%;
  padding: 4px 7px;
  border: 1px solid #e0e7df;
  border-radius: 6px;
  background: #f8faf6;
  color: #5d6d61;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.otc-tool-card h3 {
  margin: 3px 0 0;
  color: var(--forest);
  font-size: 1.02rem;
  line-height: 1.45;
}

.otc-tool-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.7;
}

.otc-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--green);
  font-size: .83rem;
  font-weight: 900;
}

.otc-card-link span {
  transition: transform .15s ease;
}

.otc-tool-card:hover .otc-card-link span {
  transform: translateX(3px);
}

.otc-no-results {
  margin-top: 8px;
  padding: 45px 20px;
  border: 1px dashed #c6d4c7;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.otc-no-results-icon {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 2rem;
}

.otc-no-results h3 {
  margin-bottom: 7px;
  color: var(--forest);
}

.otc-no-results p {
  margin-bottom: 18px;
  color: var(--muted);
}

.otc-directory-note {
  margin: 22px 0 0;
  color: #7a877f;
  font-size: .78rem;
  line-height: 1.7;
}


/* =========================================================
   ABOUT SECTION
   ========================================================= */

.otc-about {
  border-top: 1px solid var(--line);
  background: #fff;
}

.otc-about-grid {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 7vw, 90px);
}

.otc-about-grid h2 {
  color: var(--forest);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.05em;
}

.otc-about-copy p {
  color: #53645a;
  line-height: 1.9;
}

.otc-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  color: var(--green);
  font-weight: 850;
}


/* =========================================================
   TOOL PAGE SHARED COMPONENTS
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: 55px 0;
  border-bottom: 1px solid var(--line);
  background: #eef2e8;
}

.hero h1 {
  max-width: 820px;
  color: var(--forest);
}

.hero .lead,
.hero-description {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  padding: 5px 10px;
  border: 1px solid #d3e0d3;
  border-radius: 7px;
  background: #fff;
  color: var(--forest);
  font-size: .8rem;
  font-weight: 700;
}

.section {
  padding: 54px 0;
}

.section-alt {
  border-block: 1px solid var(--line);
  background: #eef2e8;
}

.section-head {
  max-width: 760px;
  margin-bottom: 27px;
}

.section-head p {
  color: var(--muted);
}

.breadcrumb {
  padding: 16px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 8px;
  color: #9da99f;
  content: "/";
}

.breadcrumb a {
  color: var(--muted);
}

.page-head {
  max-width: 850px;
  padding: 24px 0 27px;
}

.page-head h1 {
  color: var(--forest);
}

.page-head .lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.8;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: start;
  gap: 20px;
  margin-bottom: 36px;
}

.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  margin-bottom: 16px;
  font-size: 1.12rem;
}

.panel + .panel {
  margin-top: 0;
}

.content {
  padding: 12px 0 45px;
}

.prose {
  max-width: 850px;
}

.prose h2 {
  margin-top: 1.65em;
  color: var(--forest);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: #405149;
  line-height: 1.85;
}

.prose ul {
  padding-left: 1.3em;
}

.callout {
  margin: 0 0 18px;
  padding: 15px 17px;
  border: 1px solid #cfe0d1;
  border-radius: 12px;
  background: #eff6ec;
  color: #31513e;
  font-size: .93rem;
}

.faq,
.faq-list {
  margin-top: 22px;
}

.faq details,
.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.faq summary,
.faq-item summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 800;
}

.faq details p,
.faq-item p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.75;
}


/* =========================================================
   TOOL CARDS AND COMMON GRIDS
   ========================================================= */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
}

.tool-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: #afc7b4;
  box-shadow: var(--shadow-md);
}

.tool-card .tool-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 12px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: 1.18rem;
}

.tool-card h3 {
  margin: 0;
  font-size: 1.04rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: .89rem;
  line-height: 1.75;
}

.tool-card .card-link {
  margin-top: 6px;
  color: var(--green);
  font-size: .85rem;
  font-weight: 850;
}

.related {
  padding: 0 0 45px;
}

.related ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: block;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: .9rem;
  font-weight: 750;
}


/* =========================================================
   FORMS
   ========================================================= */

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: #263c32;
  font-size: .9rem;
  font-weight: 750;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #d4ded6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .94rem;
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(23, 107, 87, .12);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #eff2ee;
  color: #78847c;
  cursor: not-allowed;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d44a42;
  background: #fff8f7;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
}

input[type="color"] {
  width: 52px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

input[type="file"] {
  max-width: 100%;
  font: inherit;
  font-size: .88rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.6;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #405149;
  font-size: .9rem;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.dropzone {
  padding: 25px 17px;
  border: 2px dashed #b8cdbb;
  border-radius: 13px;
  background: #f7faf5;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.dropzone.is-over,
.dropzone.drag {
  border-color: var(--green);
  background: #eaf4e8;
}

.dropzone p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .9rem;
}

.file-name {
  margin-top: 10px;
  color: var(--green);
  font-size: .84rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}


/* =========================================================
   STATISTICS / RESULTS / TABLES
   ========================================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 11px;
}

.stat {
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f8f2;
  text-align: center;
}

.stat b {
  display: block;
  color: var(--green);
  font-size: 1.4rem;
  line-height: 1.3;
}

.stat span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.result-line {
  margin: 14px 0 0;
  padding: 14px 15px;
  border: 1px solid #d9e3da;
  border-radius: 11px;
  background: #f3f7ef;
  color: var(--forest);
  font-size: .94rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.result-line.is-error {
  border-color: #f1c5c1;
  background: #fff3f1;
  color: #9c2620;
  font-weight: 550;
}

.result-line.is-ok {
  border-color: #bfdbc7;
  background: #edf7ed;
  color: #215b3e;
}

.alert {
  margin: 0 0 15px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.65;
}

.alert-info {
  border-color: #c8ddd0;
  background: #eff7ee;
  color: #225441;
}

.alert-error {
  border-color: #f1c5c1;
  background: #fff3f1;
  color: #9c2620;
}

.alert-ok {
  border-color: #bfe0c9;
  background: #edf7ed;
  color: #215b3e;
}

.preview-box {
  margin-top: 16px;
}

.preview-box img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

canvas.output-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mono-output {
  width: 100%;
  min-height: 260px;
  font-family: var(--mono);
  font-size: .87rem;
  white-space: pre;
  overflow: auto;
}

.table-wrap,
.tablewrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  background: #f0f5ee;
  color: #30473a;
  font-size: .84rem;
  font-weight: 850;
}

td {
  font-size: .89rem;
}

tr:last-child td {
  border-bottom: 0;
}


/* =========================================================
   GENERAL SITE FOOTER
   ========================================================= */

.site-footer {
  padding: 43px 0 24px;
  background: var(--forest-dark);
  color: #e5eee5;
}

.site-footer p {
  color: #b9cbbd;
}

.site-footer a {
  color: #d9e7d7;
}

.site-footer a:hover {
  color: var(--lime);
  text-decoration: none;
}

.otc-footer {
  background: var(--forest-dark);
  color: #e5eee5;
}

.otc-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .7fr));
  gap: 38px;
}

.otc-footer-brand {
  margin-bottom: 16px;
  color: #fff;
}

.otc-footer-brand .brand-mark {
  border: 1px solid rgba(214, 239, 114, .35);
  background: #234e43;
}

.otc-footer-brand .brand-text {
  color: #fff;
}

.otc-footer-brand .brand-text span {
  color: var(--lime);
}

.otc-footer-main p {
  max-width: 370px;
  margin: 0;
  color: #b9cbbd;
  font-size: .88rem;
  line-height: 1.85;
}

.otc-footer-grid h2 {
  margin: 3px 0 14px;
  color: #fff;
  font-size: .91rem;
  letter-spacing: 0;
}

.otc-footer-grid ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.otc-footer-grid li,
.otc-footer-grid a {
  font-size: .85rem;
}

.otc-footer-grid a {
  color: #bbcec0;
}

.otc-footer-grid a:hover {
  color: var(--lime);
}

.otc-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
  padding-top: 18px;
  border-top: 1px solid rgba(219, 235, 219, .15);
  color: #9fb5a5;
  font-size: .8rem;
}

.otc-footer-bottom p {
  margin: 0;
  color: inherit;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 9px;
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 25px;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 17px;
}

.copyright {
  font-size: .82rem;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {
  .otc-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(290px, .85fr);
    gap: 27px;
  }

  .otc-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.6rem);
  }

  .otc-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .otc-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =========================================================
   MOBILE NAVIGATION AND TABLET LAYOUT
   ========================================================= */

@media (max-width: 820px) {
  .nav-toggle,
  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav,
  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    padding: 12px 16px 17px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 13px 13px;
    background: var(--paper);
    box-shadow: 0 14px 30px rgba(24, 39, 34, .1);
  }

  .primary-nav.is-open,
  .main-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }

  .primary-nav a,
  .main-nav a {
    display: block;
    padding: 12px 13px;
  }

  .otc-hero-grid {
    grid-template-columns: 1fr;
  }

  .otc-hero-copy {
    max-width: 760px;
  }

  .otc-hero-panel {
    width: 100%;
    max-width: 640px;
  }

  .otc-section-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .otc-about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .otc-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .otc-footer-main {
    grid-column: 1 / -1;
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {
  .container {
    width: min(100% - 30px, var(--maxw));
  }

  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: .88rem;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
    border-radius: 11px;
  }

  .otc-hero {
    padding: 48px 0 43px;
  }

  .otc-hero h1 {
    font-size: clamp(2.45rem, 11vw, 3.3rem);
    line-height: 1;
  }

  .otc-hero-description {
    font-size: .96rem;
  }

  .otc-hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
  }

  .otc-hero-actions .otc-button {
    width: 100%;
  }

  .otc-text-link {
    justify-content: center;
  }

  .otc-hero-notes {
    flex-direction: column;
    gap: 6px;
  }

  .otc-hero-panel {
    padding: 13px;
  }

  .otc-shortcut {
    gap: 9px;
    padding: 12px 4px;
  }

  .otc-shortcut-icon {
    width: 38px;
    height: 38px;
  }

  .otc-shortcut-copy small {
    font-size: .71rem;
  }

  .otc-category-strip {
    padding: 43px 0;
  }

  .otc-category-grid {
    grid-template-columns: 1fr;
  }

  .otc-category-card {
    padding: 14px;
  }

  .otc-directory-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .otc-directory-count {
    align-self: flex-start;
  }

  .otc-search input {
    min-height: 53px;
    font-size: .88rem;
  }

  .otc-filter-row {
    gap: 7px;
  }

  .otc-filter {
    min-height: 36px;
    padding: 7px 9px;
    font-size: .75rem;
  }

  .otc-tool-grid {
    grid-template-columns: 1fr;
  }

  .otc-tool-card {
    padding: 17px;
  }

  .otc-about {
    padding: 43px 0;
  }

  .otc-footer-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .otc-footer-main {
    grid-column: auto;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 17px;
  }

  .section {
    padding: 42px 0;
  }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

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


/* =========================================================
   YOUTUBE METADATA GENERATOR
   Additional styles for youtube-metadata-generator.html
   Uses the existing site colors and typography.
   These styles are isolated from other tool pages.
   ========================================================= */

/* ---------- Page wrapper ---------- */

.ytmg-page {
  width: min(100% - 40px, 1050px);
  margin-inline: auto;
  padding: 25px 0 55px;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
}

.ytmg-page *,
.ytmg-page *::before,
.ytmg-page *::after {
  box-sizing: border-box;
}

/* ---------- Header and navigation ---------- */

.ytmg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 38px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.ytmg-brand {
  color: var(--forest);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

.ytmg-brand:hover {
  color: var(--green);
  text-decoration: none;
}

.ytmg-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.ytmg-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.ytmg-nav a:hover {
  background: var(--forest-soft);
  color: var(--forest);
  text-decoration: none;
}

/* ---------- Page hero ---------- */

.ytmg-hero {
  max-width: 780px;
  margin: 0 auto 30px;
  text-align: center;
}

.ytmg-label {
  display: inline-block;
  margin-bottom: 13px;
  padding: 5px 12px;
  border: 1px solid #cbdcc7;
  border-radius: 999px;
  background: var(--forest-soft);
  color: var(--forest);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .035em;
}

.ytmg-hero h1 {
  margin: 0 0 16px;
  color: var(--forest);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.ytmg-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

/* ---------- Main cards ---------- */

.ytmg-card {
  min-width: 0;
  margin: 22px 0;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.ytmg-card > h2,
.ytmg-card h2 {
  color: var(--forest);
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  letter-spacing: -.025em;
  line-height: 1.35;
}

.ytmg-intro {
  margin: 0 0 23px;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.8;
}

/* ---------- Generator form ---------- */

.ytmg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

.ytmg-field {
  min-width: 0;
}

.ytmg-field-full {
  grid-column: 1 / -1;
}

.ytmg-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 750;
}

.ytmg-required {
  color: var(--err);
}

.ytmg-field input,
.ytmg-field select,
.ytmg-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #d4ded6;
  border-radius: var(--radius-xs);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

.ytmg-field textarea {
  min-height: 145px;
  resize: vertical;
}

.ytmg-field input::placeholder,
.ytmg-field textarea::placeholder {
  color: #87938b;
  opacity: 1;
}

.ytmg-field input:focus,
.ytmg-field select:focus,
.ytmg-field textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(23, 107, 87, .12);
}

.ytmg-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.65;
}

/* ---------- Action buttons ---------- */

.ytmg-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}

.ytmg-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid var(--forest);
  border-radius: 10px;
  background: var(--forest);
  color: var(--white);
  font-family: var(--font);
  font-size: .91rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition:
    background .16s ease,
    border-color .16s ease,
    transform .16s ease;
}

.ytmg-btn:hover {
  border-color: var(--forest-dark);
  background: var(--forest-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.ytmg-btn:focus-visible,
.ytmg-copy-btn:focus-visible {
  outline: 3px solid rgba(23, 107, 87, .28);
  outline-offset: 3px;
}

.ytmg-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.ytmg-btn-secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--forest);
}

.ytmg-btn-secondary:hover {
  border-color: #b7c9b9;
  background: var(--forest-soft);
  color: var(--forest);
}

/* ---------- Status and notices ---------- */

.ytmg-status {
  margin: 15px 0 0;
  padding: 11px 13px;
  border: 1px solid #dce5de;
  border-radius: 9px;
  background: #f7f8f3;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ytmg-status[data-type="error"] {
  border-color: #f1c5c1;
  background: #fff3f1;
  color: #9c2620;
}

.ytmg-status[data-type="success"] {
  border-color: #bfdbc7;
  background: #edf7ed;
  color: #215b3e;
}

.ytmg-disclaimer {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .81rem;
  line-height: 1.75;
}

/* ---------- Generated results ---------- */

.ytmg-results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.ytmg-results-heading h2 {
  margin-bottom: 5px;
}

.ytmg-results-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .89rem;
}

.ytmg-result-section {
  min-width: 0;
  margin-top: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.ytmg-result-section h3 {
  margin: 0 0 13px;
  color: var(--forest);
  font-size: 1.02rem;
  letter-spacing: -.01em;
}

.ytmg-result-content {
  min-width: 0;
  color: #405149;
  font-size: .93rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ytmg-result-content ol,
.ytmg-result-content ul {
  margin: 0;
  padding-left: 23px;
}

.ytmg-result-content li {
  padding: 4px 0;
  overflow-wrap: anywhere;
}

.ytmg-result-text {
  margin: 0;
  color: #405149;
  font-size: .93rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ytmg-copy-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 13px;
}

.ytmg-copy-btn {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--forest);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.ytmg-copy-btn:hover {
  border-color: #b7c9b9;
  background: var(--forest-soft);
}

/* ---------- How-to information cards ---------- */

.ytmg-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 19px;
}

.ytmg-info-item {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dce5de;
  border-radius: 12px;
  background: #f7f8f3;
}

.ytmg-info-item h3 {
  margin: 0 0 8px;
  color: var(--forest);
  font-size: .98rem;
  line-height: 1.5;
}

.ytmg-info-item p {
  margin: 0;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.75;
}

/* ---------- Frequently asked questions ---------- */

.ytmg-faq-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.ytmg-faq-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ytmg-faq-item h3 {
  margin: 0 0 7px;
  color: var(--forest);
  font-size: .99rem;
  line-height: 1.5;
  letter-spacing: -.01em;
}

.ytmg-faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.8;
}

/* ---------- Page footer ---------- */

.ytmg-footer {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
}

.ytmg-footer p {
  margin-bottom: 9px;
}

.ytmg-footer a {
  color: var(--green);
  font-weight: 700;
}

.ytmg-footer a:hover {
  color: var(--forest-dark);
  text-decoration: underline;
}

/* ---------- Responsive layout ---------- */

@media (max-width: 760px) {
  .ytmg-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 29px;
  }

  .ytmg-nav {
    gap: 5px;
  }

  .ytmg-nav a {
    padding: 7px 9px;
  }

  .ytmg-info-grid {
    grid-template-columns: 1fr;
  }

  .ytmg-results-heading {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .ytmg-page {
    width: min(100% - 30px, 1050px);
    padding: 18px 0 40px;
  }

  .ytmg-hero {
    margin-bottom: 23px;
    text-align: left;
  }

  .ytmg-hero p {
    margin-left: 0;
    font-size: .94rem;
  }

  .ytmg-card {
    margin: 17px 0;
    padding: 17px;
    border-radius: 13px;
  }

  .ytmg-form-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .ytmg-field-full {
    grid-column: auto;
  }

  .ytmg-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ytmg-form-actions .ytmg-btn {
    width: 100%;
  }

  .ytmg-results-heading .ytmg-btn {
    width: 100%;
  }

  .ytmg-result-section {
    padding: 14px;
  }

  .ytmg-copy-btn {
    min-height: 38px;
  }
}

/* ---------- Reduced motion accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .ytmg-page *,
  .ytmg-page *::before,
  .ytmg-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}