/* ==========================================================================
   /calculator/seo-time-2/ — SEO forecast calculator, restored 2026-10-12.
   Same page language as the other restored tools (banner creator, AI text
   cleaner, signature generator, price quote generator, logo cost, landing page
   cost): the theme tokens, a 6% accent tint for surfaces, radii 22/16/10, the
   shared .btn and the portfolio.css orbit. Mobile First, every rule scoped under .st-page.

   Breakpoints: 768px (padding, two columns of results), 1100px (choices and
   estimate side by side, the estimate sticky), 1200px (orbit shown).
   ========================================================================== */

.st-page {
  --st-surface: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface));
  --st-error: #B3261E;
  --st-h1: var(--h1-page);
  --st-h2: clamp(1.375rem, 1.9vw, 1.75rem);
  --st-h3: clamp(1.125rem, 1.6vw, 1.25rem);
  color: var(--color-text-primary);
  padding-block: var(--space-6) var(--space-12);
  overflow-x: clip;
}
.st-container { max-width: 1600px; margin-inline: auto; padding-inline: var(--space-4); }
.st-inner { max-width: 1200px; margin-inline: auto; }
.st-page [hidden] { display: none !important; }
.st-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Intro ---------- */
.st-intro { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding-block: var(--space-3) var(--space-6); }
.st-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-secondary); }
.st-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; color: var(--color-text-secondary); transition: color 180ms ease; }
.st-breadcrumb a:hover { color: var(--color-accent-text, var(--color-accent)); }
.st-breadcrumb [aria-current] { color: var(--color-text-primary); font-weight: var(--font-bold); }
.st-title { margin: 0; font-size: var(--st-h1); font-weight: var(--font-black); line-height: var(--leading-h1-page); letter-spacing: -0.01em; }
.st-lead { display: flex; flex-direction: column; gap: var(--space-2); max-width: 68ch; }
.st-lead p { margin: 0; font-size: var(--text-body); line-height: var(--leading-lead); color: var(--color-text-secondary); }
.st-lead .st-lead__first { font-weight: var(--font-bold); color: var(--color-text-primary); }
.st-subtitle { margin: var(--space-4) 0 var(--space-1); font-size: var(--st-h2); font-weight: var(--font-bold); line-height: var(--leading-heading); }
.st-subtitle__hint { margin: 0 0 var(--space-5); font-size: var(--text-body); line-height: var(--leading-lead); color: var(--color-text-secondary); }
.st-page .portfolio-hero__graphic { display: none; position: absolute; inset: auto; top: 0; left: 20px; width: 180px; height: 180px; }
.st-page .portfolio-hero__orbit { inset: 0; width: auto; height: auto; }

/* ---------- No-JS ---------- */
.st-needs-js { margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-stat); background: var(--st-surface); font-size: var(--text-md); }
.st-js .st-needs-js { display: none; }
html:not(.st-js) .st-workspace { display: none; }

/* ---------- Workspace ---------- */
.st-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.st-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-5); min-width: 0; }
.st-card__title { margin: 0 0 var(--space-2); font-size: var(--st-h3); font-weight: var(--font-bold); line-height: var(--leading-heading); }
.st-hint { margin: 0; font-size: var(--text-xs); line-height: 1.55; color: var(--color-text-secondary); }
.st-form { display: flex; flex-direction: column; gap: var(--space-6); margin-top: var(--space-4); }
.st-fieldset { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; border: 0; min-width: 0; }
.st-fieldset legend { padding: 0; margin-bottom: var(--space-2); font-size: var(--text-ui); font-weight: var(--font-bold); }


/* Sliders: native, accent-coloured, 44px touch height, with the number beside them */
.st-slider { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.st-slider > label { font-size: var(--text-ui); font-weight: var(--font-bold); color: var(--color-text-primary); }
.st-slider__row { display: flex; align-items: center; gap: var(--space-3); }
.st-slider input[type="range"] { flex: 1 1 auto; min-width: 0; min-height: 44px; margin: 0; accent-color: var(--color-accent); cursor: pointer; }
.st-slider input[type="range"]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.st-slider__value { flex: none; min-width: 2.75rem; padding: 0.4rem 0.6rem; border-radius: var(--radius-button); border: 1px solid var(--color-border); background: var(--st-surface); font-size: var(--text-ui); font-weight: var(--font-black); text-align: center; font-variant-numeric: tabular-nums; }



/* Selects, with the same recipe as the fields of the other tools */
.st-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.st-field > label { font-size: var(--text-ui); font-weight: var(--font-bold); color: var(--color-text-primary); }
.st-field select { width: 100%; min-height: 3.25rem; padding-inline: 0.875rem; border-radius: var(--radius-button); border: 1px solid var(--color-border); background: var(--color-surface); font: inherit; font-size: var(--text-ui); color: var(--color-text-primary); transition: border-color 160ms ease-out; }
.st-field select:hover { border-color: var(--color-text-secondary); }
.st-field select:focus-visible { border-color: var(--color-accent); outline: 2px solid color-mix(in srgb, var(--color-accent) 30%, transparent); outline-offset: 1px; }

/* The three packages: a radio each, drawn as a card */
.st-packages { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.st-package { position: relative; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-stat); background: var(--color-surface); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.st-package:hover { border-color: var(--color-text-secondary); }
.st-package input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.st-package:has(input:checked) { border-color: var(--color-accent); background: var(--st-surface); box-shadow: inset 0 0 0 1px var(--color-accent); }
.st-package:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.st-package__price { font-size: var(--text-body-lg); font-weight: var(--font-black); font-variant-numeric: tabular-nums; }
.st-package__name { font-size: var(--text-ui); font-weight: var(--font-bold); }
.st-package__features { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-2); font-size: var(--text-sm); line-height: 1.5; color: var(--color-text-secondary); }
.st-package__feature::before { content: "✓ " / ""; color: var(--color-accent-text, var(--color-accent)); font-weight: var(--font-bold); }

/* Main figure: only where the estimate is under the choices (below 1100px); it sticks under the site header while choosing */
.st-running { position: sticky; top: calc(var(--header-h-mobile) + var(--space-4)); z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius-stat); background: var(--color-text-primary); color: #ffffff; box-shadow: 0 4px 14px rgba(17, 17, 17, .18); }
.st-running__label { font-size: var(--text-sm); font-weight: var(--font-bold); }
.st-running__value { font-size: var(--text-body-lg); font-weight: var(--font-black); font-variant-numeric: tabular-nums; }


/* ---------- The estimate ---------- */
.st-summary { display: flex; flex-direction: column; gap: var(--space-4); }
.st-summary .st-card__title { margin-bottom: 0; }
.st-empty { margin: 0; padding: var(--space-5); border-radius: var(--radius-stat); background: var(--st-surface); font-size: var(--text-md); line-height: var(--leading-ui); color: var(--color-text-secondary); text-align: center; }
.st-results { display: flex; flex-direction: column; gap: var(--space-4); }
.st-results__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.st-result { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-4) var(--space-2); border-radius: var(--radius-stat); background: var(--st-surface); text-align: center; }
.st-result__value { font-size: var(--st-h2); font-weight: var(--font-black); line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-result__label { font-size: var(--text-sm); line-height: 1.4; color: var(--color-text-secondary); }
.st-timeline-wrap { display: flex; flex-direction: column; gap: var(--space-3); }
.st-timeline__title { margin: 0; font-size: var(--text-ui); font-weight: var(--font-bold); }
.st-timeline { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.st-timeline__item { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-4); border-inline-start: 4px solid var(--color-accent); border-radius: var(--radius-button); background: var(--st-surface); }
.st-timeline__period { font-size: var(--text-sm); font-weight: var(--font-bold); }
.st-timeline__description { font-size: var(--text-md); line-height: var(--leading-ui); color: var(--color-text-secondary); }
.st-warning { margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-stat); background: color-mix(in srgb, #E0A800 14%, var(--color-surface)); border: 1px solid color-mix(in srgb, #E0A800 40%, var(--color-border)); font-size: var(--text-sm); line-height: 1.6; }
.st-assume { border-radius: var(--radius-stat); background: var(--st-surface); }
.st-assume summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: var(--font-bold); cursor: pointer; border-radius: var(--radius-stat); }
.st-assume summary { list-style: none; }
.st-assume summary::-webkit-details-marker { display: none; }
.st-assume summary::after { content: "+" / ""; flex: none; font-size: 1.5rem; font-weight: var(--font-regular, 400); line-height: 1; transition: transform 160ms ease; }
.st-assume[open] > summary::after { transform: rotate(45deg); }
.st-assume summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.st-assume__list { display: grid; gap: var(--space-2); margin: 0; padding: 0 var(--space-4) var(--space-3); padding-inline-start: calc(var(--space-4) + 1.25rem); font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-secondary); }
.st-assume p { margin: 0; padding: 0 var(--space-4) var(--space-4); font-size: var(--text-sm); line-height: 1.6; color: var(--color-text-secondary); }
.st-article .st-tip { padding: var(--space-3) var(--space-4); border-radius: var(--radius-stat); background: var(--st-surface); border-inline-start: 4px solid var(--color-accent); }

.st-actions { display: flex; flex-direction: column; gap: var(--space-3); }
.st-btn { width: 100%; height: auto; min-height: 54px; padding-block: 12px; white-space: normal; text-align: center; }

/* ---------- The article under the tool ---------- */
.st-article { margin-top: var(--space-10); max-width: 78ch; }
.st-article h2 { margin: var(--space-8) 0 var(--space-3); font-size: var(--st-h2); font-weight: var(--font-bold); line-height: var(--leading-heading); }
.st-article h2:first-child { margin-top: 0; }
.st-article h3 { margin: var(--space-5) 0 var(--space-2); font-size: var(--st-h3); font-weight: var(--font-bold); line-height: var(--leading-heading); }
.st-article p { margin: 0 0 var(--space-3); font-size: var(--text-body); line-height: var(--leading-lead); color: var(--color-text-secondary); }
.st-article ul { display: grid; gap: var(--space-1); margin: 0 0 var(--space-4); padding-inline-start: 1.25rem; font-size: var(--text-body); line-height: var(--leading-ui); color: var(--color-text-secondary); }
.st-article a { color: var(--color-accent-text, var(--color-accent)); text-decoration: underline; text-underline-offset: 3px; }
.st-article a:hover { text-decoration-thickness: 2px; }
.st-article a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 3px; }



/* ---------- Tablet, >=768px ---------- */
@media (min-width: 768px) {
  .st-page { padding-block: var(--space-8) var(--space-13); }
  .st-intro { padding-block: var(--space-5) var(--space-6); }
  .st-card { padding: var(--space-7); }
  .st-actions { flex-direction: row; }
  .st-actions .st-btn { flex: 1 1 0; }
  .st-btn { width: auto; padding-inline: var(--space-6); }
}

/* ---------- Choices and offer side by side, >=1100px ---------- */
@media (min-width: 1100px) {
  .st-running { display: none; }
  .st-workspace { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  /* A long estimate makes the card taller than the screen: it then scrolls inside itself, so the buttons stay reachable. */
  /* The site header is 80px tall from 768px and 110px from 1200px, so the estimate sticks under the header that is really there. */
  .st-summary { position: sticky; top: calc(80px + var(--space-4)); max-height: calc(100vh - 80px - var(--space-8)); overflow-y: auto; }
}

@media (min-width: 1200px) {
  .st-page .portfolio-hero__graphic { display: block; }
  .st-title { max-width: min(68ch, calc(100% - 220px)); }
  .st-summary { top: calc(var(--header-h-desktop) + var(--space-4)); max-height: calc(100vh - var(--header-h-desktop) - var(--space-8)); }
}

@media (prefers-reduced-motion: reduce) {
  .st-breadcrumb a, .st-package, .st-assume summary::after { transition: none; }
}
