/* =========================================================
   Women's Health Tools — shared styles
   Plain CSS, no build step, no external dependencies.
   ========================================================= */

:root {
  color-scheme: light;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffedf5;
  --surface-blush: #ffd8e8;
  --ink: #2b1c24;
  --muted: #7b6570;
  --line: #fbd7e6;
  --line-strong: #f7bfd6;

  --rose: #d81b60;
  --rose-strong: #b0154c;
  --rose-soft: #ffe0ee;
  --rose-line: #fab8d2;
  --mauve: #ff5c9a;
  --mauve-soft: #ffe7f1;
  --mauve-line: #ffc6de;
  --teal: #2f7d6a;

  --button-bg: #ff3d8b;
  --button-text: #2b1c24;
  --button-hover: #ff5a9e;

  --error-ink: #8c1d18;
  --error-bg: #fdecea;
  --error-line: #f2b8b5;

  --warning-ink: #70430f;
  --warning-bg: #fff6e9;
  --warning-line: #ecd2a8;

  --hero-glow: #ffc4dd;

  --shadow-sm: 0 1px 2px rgba(255, 61, 139, 0.05),
    0 12px 32px -24px rgba(255, 61, 139, 0.34);
  --shadow-md: 0 2px 8px rgba(255, 61, 139, 0.06),
    0 28px 60px -36px rgba(255, 61, 139, 0.44);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--rose);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--rose-strong);
}

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

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
  color: var(--bg);
}

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

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease,
    border-color 0.18s ease;
}

.button:hover {
  background: var(--button-hover);
  color: var(--button-text);
}

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

.button-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  color: var(--muted);
}

.button-ghost:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.button-block {
  width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand:hover {
  color: var(--rose-strong);
}

.brand-mark {
  display: block;
  flex: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 20px -12px rgba(255, 61, 139, 0.5);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--rose-soft);
  color: var(--rose-strong);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(44px, 7vw, 88px) 0 clamp(30px, 4vw, 48px);
  background: radial-gradient(
    900px 460px at 50% -160px,
    var(--hero-glow),
    transparent 72%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 14ch;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 5.4vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.lede {
  max-width: 540px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
}

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

.hero-note li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-note svg {
  width: 14px;
  height: 14px;
  color: var(--rose);
}

.quick-card {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.quick-card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.quick-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.quick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
}

.quick-form .field {
  margin-bottom: 14px;
}

.quick-form .field label {
  font-size: 0.82rem;
}

.quick-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.quick-form input:focus {
  border-color: var(--rose);
  outline: none;
  box-shadow: 0 0 0 4px var(--rose-soft);
}

.quick-form .button {
  width: 100%;
}

.quick-result {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--rose-line);
  border-radius: 14px;
  background: var(--rose-soft);
}

.quick-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-result strong {
  display: block;
  margin-top: 2px;
  color: var(--rose-strong);
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 600;
  line-height: 1.2;
}

.quick-result a {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
}

.proof-bar {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.proof-item + .proof-item {
  border-left: 1px solid var(--line);
}

.proof-item svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--rose);
}

.proof-item strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Search / tools toolbar ---------- */

.tools-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.tools-toolbar .section-heading {
  margin-bottom: 0;
}

.tools-search {
  width: min(100%, 320px);
}

.tools-search label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.tools-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.tools-search input:focus {
  border-color: var(--rose);
  outline: none;
  box-shadow: 0 0 0 4px var(--rose-soft);
}

.search-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(40px, 6vw, 68px) 0;
}

.section-soft {
  background: var(--surface-soft);
  border-block: 1px solid var(--line);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Cards and grids ---------- */

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

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

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

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

.tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--rose-soft);
  color: var(--rose);
}

.tool-icon.lavender {
  background: var(--mauve-soft);
  color: var(--mauve);
}

.tool-icon svg {
  width: 22px;
  height: 22px;
}

.tool-card h3 {
  margin: 4px 0 0;
  font-size: 1.16rem;
}

.tool-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rose);
  font-size: 0.88rem;
  font-weight: 600;
}

.tool-card:hover .card-link,
.category-card:hover .card-link {
  color: var(--rose-strong);
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
}

.category-card:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.category-card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.category-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.related-tools {
  margin-top: 8px;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose-strong);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Callouts ---------- */

.callout {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.callout-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--rose-soft);
  color: var(--rose);
}

.callout-icon svg {
  width: 20px;
  height: 20px;
}

.callout h2,
.callout h3 {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
}

.callout p {
  color: var(--muted);
  font-size: 0.93rem;
}

.callout p + p {
  margin-top: 8px;
}

.callout--privacy {
  border-color: var(--mauve-line);
  background: var(--mauve-soft);
}

.callout--privacy .callout-icon {
  background: var(--surface);
  color: var(--mauve);
}

.callout--warning {
  border-color: var(--warning-line);
  background: var(--warning-bg);
}

.callout--warning .callout-icon {
  background: var(--surface);
  color: var(--warning-ink);
}

.callout--warning h2,
.callout--warning h3,
.callout--warning p,
.callout--warning a {
  color: var(--warning-ink);
}

.callout--warning a {
  font-weight: 700;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 820px;
  margin-inline: auto;
}

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

.faq-item summary {
  position: relative;
  padding: 16px 46px 16px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--rose);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Page header and breadcrumbs ---------- */

.page-head {
  padding: clamp(36px, 6vw, 64px) 0 26px;
}

.page-head h1 {
  max-width: 20ch;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.page-head .lede {
  max-width: 700px;
  margin: 0;
  font-size: 1.02rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--rose);
}

.breadcrumbs span[aria-hidden] {
  color: var(--line-strong);
}

/* ---------- Calculator ---------- */

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}

.panel {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel > h2 {
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}

.field {
  margin-bottom: 18px;
}

.field:last-of-type {
  margin-bottom: 0;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.field input:focus,
.field select:focus {
  border-color: var(--rose);
  outline: none;
  box-shadow: 0 0 0 4px var(--rose-soft);
}

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

.form-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--error-line);
  border-radius: var(--radius-sm);
  background: var(--error-bg);
  color: var(--error-ink);
  font-size: 0.88rem;
}

.form-actions {
  margin-top: 22px;
}

.result-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}

.result-empty {
  color: var(--muted);
  text-align: center;
}

.result-empty svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--line-strong);
}

.result-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-main {
  margin: 0 0 20px;
  color: var(--rose-strong);
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.result-grid dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.result-grid dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.result-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.result-extra {
  margin-top: 16px;
}

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

.upcoming-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--surface-soft);
  font-size: 0.88rem;
}

.progress {
  height: 10px;
  margin: 4px 0 8px;
  border-radius: 999px;
  background: var(--mauve-soft);
  overflow: hidden;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mauve), var(--rose));
  transition: width 0.4s ease;
}

.progress-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Result actions ---------- */

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.result-actions .button {
  padding: 9px 12px;
  font-size: 0.8rem;
}

.result-actions .button svg {
  width: 14px;
  height: 14px;
}

.result-copied {
  align-self: center;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ---------- Cycle timeline ---------- */

.cycle-timeline {
  margin-top: 18px;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.timeline-track {
  position: relative;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.timeline-band {
  position: absolute;
  top: 0;
  bottom: 0;
}

.timeline-band.period {
  background: var(--rose-soft);
}

.timeline-band.fertile {
  background: var(--mauve-soft);
}

.timeline-ovulation {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 999px;
  background: var(--rose);
}

.timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  opacity: 0.7;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.76rem;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.period {
  background: var(--rose-line);
}

.legend-dot.fertile {
  background: var(--mauve-line);
}

.legend-dot.ovulation {
  background: var(--rose);
}

.legend-dot.today {
  background: var(--ink);
  opacity: 0.7;
}

/* ---------- Sources and meta ---------- */

.tool-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.sources {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
}

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

.sources ul {
  margin: 0;
  padding-left: 1.2em;
}

.sources li {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Feature cards ---------- */

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

.feature-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Logo showcase ---------- */

.logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.brand-lockup img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.brand-lockup-name {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-lockup-tagline {
  display: block;
  margin-top: 4px;
  color: var(--rose);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.logo-sizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.logo-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.74rem;
}

.logo-size img {
  display: block;
  border-radius: 22%;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.logo-tile.white {
  background: #ffffff;
}

.logo-tile.blush {
  background: var(--surface-blush);
}

.logo-tile.pink {
  border-color: transparent;
  background: linear-gradient(135deg, #ff3d8b, #d81b60);
}

.logo-tile.dark {
  border-color: #1d151b;
  background: #1d151b;
}

.logo-tile img {
  width: 72px;
  height: 72px;
  border-radius: 22%;
}

.logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- Segmented control ---------- */

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented label:has(input:checked) {
  border-color: var(--rose);
  background: var(--rose-soft);
  color: var(--rose-strong);
}

.segmented label:focus-within {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* ---------- Contraction timer ---------- */

.timer-panel {
  text-align: center;
}

.timer-display {
  margin: 10px 0 24px;
  color: var(--rose-strong);
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 4.6rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.timer-hint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.timer-status {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 600;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.summary-grid > div {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.summary-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.summary-grid dd {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 1.2rem;
}

/* ---------- Prose ---------- */

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 36px;
  font-size: 1.5rem;
}

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

.prose h3 {
  margin-top: 26px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose .meta {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Disclaimer strip ---------- */

.disclaimer-strip {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--warning-line);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: var(--warning-ink);
  font-size: 0.86rem;
  line-height: 1.6;
}

.disclaimer-strip svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.disclaimer-strip p {
  margin: 0;
}

.disclaimer-strip a {
  color: inherit;
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 48px;
  padding: 44px 0 26px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-blurb {
  max-width: 340px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-nav h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nav a {
  display: block;
  padding: 4px 0;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--rose);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- 404 ---------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 64px 0;
  text-align: center;
}

.error-code {
  margin: 0;
  color: var(--rose);
  font-family: var(--font-serif);
  font-size: clamp(5rem, 18vw, 9rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.error-page h1 {
  margin: 8px 0 10px;
  font-size: 1.6rem;
}

.error-page p {
  max-width: 440px;
  color: var(--muted);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

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

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

  .hero h1 {
    max-width: 18ch;
  }

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

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

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

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

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    gap: 8px;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

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

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

  .proof-item + .proof-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tool-grid,
  .guide-grid,
  .category-grid,
  .steps,
  .feature-grid,
  .result-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

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

  .brand-lockup {
    flex-direction: column;
    text-align: center;
  }

  .brand-lockup img {
    width: 72px;
    height: 72px;
  }

  .hero {
    padding-top: 36px;
  }

  .page-head {
    padding-top: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }

  .timer-actions .button,
  .result-actions .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .timer-actions,
  .result-actions,
  .breadcrumbs,
  .faq,
  .related-tools,
  .disclaimer-strip,
  .button {
    display: none !important;
  }

  .panel,
  .tool-card {
    border-color: #ccc;
    box-shadow: none;
  }

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