:root {
  color-scheme: light;
  --background: #f7f8fb;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #5c6675;
  --line: #d9dee8;
  --accent: #1677c7;
  --accent-strong: #0f4f87;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
  line-height: 1.5;
}

a { color: inherit; }

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a { text-decoration: none; }
nav a:hover { color: var(--accent-strong); }

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 56px;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 28px;
  align-items: stretch;
  padding: 34px 0 20px;
}

.tool-copy,
.tool-panel,
.content-section,
.legal-page article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-copy {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.tagline {
  margin: 18px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.tool-panel { padding: 24px; }

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
button {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--ink);
  padding: 10px 12px;
}

button {
  align-self: end;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: var(--accent-strong); }

.tool-output,
.result-list {
  display: block;
  margin-top: 18px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  padding: 16px;
  font-weight: 700;
}

.result-list {
  display: grid;
  gap: 10px;
  font-weight: 500;
}

.result-pill {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface);
}

.ad-frame {
  min-height: 92px;
  margin: 10px 0 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.ad-frame.empty { visibility: hidden; }

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

.content-section { padding: 24px; }

.content-section h2,
.legal-page h1,
.legal-page h2 {
  margin: 0 0 10px;
  letter-spacing: 0;
}

.content-section p,
.legal-page p {
  color: var(--muted);
}

.content-section ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 800; }

.legal-page article {
  max-width: 820px;
  margin: 24px auto 0;
  padding: 32px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-shell,
  .content-grid,
  .tool-form {
    grid-template-columns: 1fr;
  }

  h1 { font-size: 2rem; }
  .tool-copy, .tool-panel, .content-section, .legal-page article { padding: 22px; }
}
