:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #12202f;
  --muted: #64758b;
  --line: #d2dbe5;
  --line-soft: #e4ecf5;
  --accent: #eaf3fd;
  --accent-strong: #c6d6e8;
  --soft-blue: #f4f8fd;
  --mint: #90c2c0;
  --violet: #bba6e6;
  --shadow: 0 24px 64px rgba(18, 32, 47, 0.12);
  font-family: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.tools-home {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  padding: 28px clamp(22px, 4vw, 54px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand-script {
  font-family: Didot, "Bodoni 72", "Times New Roman", serif;
  font-size: clamp(2.3rem, 4vw, 4rem);
  font-style: italic;
  line-height: 0.85;
}

.brand-divider {
  width: 1px;
  height: 42px;
  background: #8da0b5;
}

.brand-section {
  color: #2e4057;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 500;
}

.hero {
  width: min(1500px, calc(100vw - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(540px, 1.26fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
  padding: 28px 0 56px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}

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

.tool-tile {
  min-height: 540px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-tile:hover,
.tool-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-strong);
  box-shadow: 0 30px 76px rgba(18, 32, 47, 0.16);
  outline: none;
}

.tool-preview {
  min-height: 390px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-blue);
}

.prompter-preview {
  display: grid;
  grid-template-rows: 1fr auto;
}

.preview-screen {
  display: grid;
  align-content: center;
  gap: 38px;
  padding: 46px;
  background: #000000;
  color: #f3f7ff;
  font-size: clamp(1.5rem, 2.8vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
}

.preview-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px;
}

.preview-controls span,
.format-sidebar span {
  display: block;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.format-preview {
  display: grid;
  grid-template-columns: 35% 1fr;
}

.format-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border-right: 1px solid var(--line-soft);
}

.format-stage {
  width: 58%;
  aspect-ratio: 4 / 5;
  place-self: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), #d9eef2 48%, var(--violet));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.tool-title {
  padding-top: 8px;
  font-size: 1.55rem;
  font-weight: 700;
}

.tool-meta {
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .tool-tile {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 92px;
    padding-inline: 18px;
  }

  .hero {
    width: min(100% - 28px, 560px);
    padding-top: 8px;
  }

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

  .tool-preview {
    min-height: 270px;
  }

  .preview-screen {
    padding: 30px;
  }
}
