/*
 * Tool page template (2026-09-30).
 * Used by /alati/ pages rebuilt one by one on body.subpage.tool-page,
 * inside the shared .site-shell frame from subpage-redesign.css and site-shell.css.
 * Rules: dark and light bands alternate, no hairline dividers, body text in one column,
 * bare line icons (no tinted tiles), large type and buttons for older visitors.
 */
body.tool-page {
  --tp-cream: #f8f7f3;
  --tp-white: #fffdf9;
  --tp-field: #f1efe9;
  --tp-ink: #10231f;
  --tp-text: #3b4644;
  --tp-muted: #5f6b68;
  --tp-dark: #10231f;
  --tp-forest: #15443b;
  --tp-green: #176b5d;
  --tp-mint: #e4f2ec;
  --tp-peach: #f2b27a;
  --tp-peach-hover: #f6c393;
  --tp-peach-soft: #fdf4ec;
  --tp-peach-deep: #a8521a;
  --tp-red: #b42318;
  --tp-red-soft: #fbe9e7;
  --tp-on-dark: #d7e3df;
  --tp-shadow: 0 12px 30px -24px rgba(16, 35, 31, 0.5);
}

body.tool-page .tp-main {
  display: block;
  background: var(--tp-cream);
  color: var(--tp-ink);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.tool-page .tp-in {
  width: min(1180px, calc(100% - 92px));
  margin: 0 auto;
}

body.tool-page .tp-main :focus-visible {
  outline: 3px solid var(--tp-green);
  outline-offset: 3px;
}

body.tool-page :is(.tp-hero, .tp-dark, .tp-cta, .ck-next) :focus-visible {
  outline-color: var(--tp-peach);
}

body.tool-page :is(.tp-tool, .ck-contact) :focus-visible {
  outline-color: var(--tp-green);
}

/* Buttons */
body.tool-page .tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 30px;
  border: 0;
  border-radius: 12px;
  background: var(--tp-peach);
  color: var(--tp-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

body.tool-page .tp-btn:hover {
  background: var(--tp-peach-hover);
}

body.tool-page .tp-btn:disabled {
  cursor: wait;
  opacity: 0.75;
}

body.tool-page .tp-btn.tp-btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

body.tool-page .tp-btn.tp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.tool-page .tp-btn.tp-btn-green {
  background: var(--tp-green);
  color: #fff;
}

body.tool-page .tp-btn.tp-btn-green:hover {
  background: var(--tp-forest);
}

/* Hero: dark band with the tool inside */
body.tool-page .tp-hero {
  padding: 40px 0 64px;
  background:
    radial-gradient(circle at 88% 8%, rgba(217, 119, 47, 0.24), transparent 36%),
    linear-gradient(150deg, #15443b, #0b221e);
  color: #fff;
}

body.tool-page .tp-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  color: #a9c2bb;
  font-size: 14px;
  font-weight: 600;
}

body.tool-page .tp-crumb li + li::before {
  content: "/";
  margin-right: 6px;
}

body.tool-page .tp-crumb a {
  color: #d7e3df;
  text-decoration: none;
}

body.tool-page .tp-crumb a:hover {
  color: #fff;
  text-decoration: underline;
}

body.tool-page .tp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

body.tool-page .tp-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

body.tool-page .tp-lead {
  margin: 20px 0 28px;
  color: var(--tp-on-dark);
  font-size: 19px;
  line-height: 1.6;
}

body.tool-page .tp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.tool-page .tp-pills li {
  padding: 9px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

/* Tool card */
body.tool-page .tp-tool {
  padding: 34px;
  border-radius: 18px;
  background: var(--tp-white);
  color: var(--tp-ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
}

body.tool-page .tp-tool h2 {
  margin: 0 0 6px;
  color: var(--tp-ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

body.tool-page .tp-hint {
  margin: 0 0 20px;
  color: var(--tp-text);
  font-size: 16px;
  line-height: 1.5;
}

body.tool-page .tp-input {
  display: block;
  width: 100%;
  height: 64px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--tp-field);
  box-shadow: inset 0 0 0 2px transparent;
  color: var(--tp-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
}

body.tool-page .tp-input::placeholder {
  color: #80868f;
  font-weight: 500;
}

body.tool-page .tp-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--tp-green);
  background: #fff;
}

body.tool-page .tp-check {
  display: flex;
  gap: 12px;
  margin: 18px 0 22px;
  color: var(--tp-text);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}

body.tool-page .tp-check input {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--tp-green);
  cursor: pointer;
}

body.tool-page .tp-check a {
  color: var(--tp-green);
  font-weight: 700;
}

body.tool-page .tp-tool .tp-btn {
  width: 100%;
}

body.tool-page .tp-small {
  margin: 14px 0 0;
  color: var(--tp-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* Button that opens another page: the result card's forest green, with an arrow */
body.tool-page .tp-btn.tp-btn-go {
  align-self: stretch;
  margin-top: 14px;
  min-height: 54px;
  padding: 8px 18px;
  background: var(--tp-forest);
  color: #fff;
  font-size: 16.5px;
}

body.tool-page .tp-btn.tp-btn-go:hover {
  background: var(--tp-dark);
}

body.tool-page .tp-btn.tp-btn-go[hidden] {
  display: none;
}

/* On dark backgrounds forest green disappears (about 1.3:1), so the same button uses the existing peach.
   .tp-on-dark marks any other dark block that holds such a button. */
body.tool-page :is(.tp-hero, .tp-cta, .tp-on-dark) .tp-btn.tp-btn-go {
  background: var(--tp-peach);
  color: var(--tp-ink);
}

body.tool-page :is(.tp-hero, .tp-cta, .tp-on-dark) .tp-btn.tp-btn-go:hover {
  background: var(--tp-peach-hover);
}

body.tool-page :is(.tp-hero, .tp-cta, .tp-on-dark) .tp-btn.tp-btn-go.tp-btn-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}

body.tool-page :is(.tp-hero, .tp-cta, .tp-on-dark) .tp-btn.tp-btn-go.tp-btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
}

body.tool-page .tp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Orange strip under the hero, same as the articles */
/* Zero-height strip centred on the seam between the hero and the next band: the hero shows above it
   and the band below it, whatever their colours. */
body.tool-page .tp-ticker {
  position: relative;
  z-index: 2;
  height: 0;
  overflow-x: clip;
  overflow-y: visible;
}

body.tool-page .tp-ticker p {
  margin: 0 -20px;
  padding: 12px 0;
  overflow: hidden;
  background: var(--tp-peach);
  color: var(--tp-ink);
  font: 700 15px/1 ui-monospace, Consolas, monospace;
  white-space: nowrap;
  transform: translateY(-50%) rotate(-1deg);
}

/* Bands */
body.tool-page .tp-band {
  padding: 84px 0;
}

body.tool-page .tp-band.tp-dark {
  background: var(--tp-dark);
  color: #fff;
}

body.tool-page .tp-band > .tp-in > h2 {
  margin: 0 0 12px;
  color: inherit;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

body.tool-page .tp-intro {
  margin: 0 0 36px;
  color: var(--tp-text);
  font-size: 18px;
  line-height: 1.65;
}

body.tool-page .tp-dark .tp-intro {
  color: var(--tp-on-dark);
}

body.tool-page .tp-band > .tp-in > h2.tp-h2-small {
  margin-top: 64px;
  font-size: 26px;
}

/* Coloured level tiles (dark band) */
body.tool-page .tp-levels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.tool-page .tp-level {
  padding: 24px 22px;
  border-radius: 16px;
  color: var(--tp-ink);
}

body.tool-page .tp-level strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.tool-page .tp-level h3 {
  margin: 6px 0 8px;
  color: var(--tp-ink);
  font-size: 18px;
  font-weight: 800;
}

body.tool-page .tp-level p {
  margin: 0;
  color: var(--tp-ink);
  font-size: 15.5px;
  line-height: 1.55;
}

body.tool-page .tp-level-1 { background: #f7d4cf; }
body.tool-page .tp-level-2 { background: var(--tp-peach); }
body.tool-page .tp-level-3 { background: #cfe6dc; }
body.tool-page .tp-level-4 { background: #8fd0b4; }

/* Single column text blocks with bare icons */
body.tool-page .tp-stack {
  display: grid;
  gap: 14px;
}

body.tool-page .tp-block {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px 28px;
  border-radius: 18px;
  background: var(--tp-white);
  box-shadow: var(--tp-shadow);
}

body.tool-page .tp-block > svg {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: var(--tp-green);
}

body.tool-page .tp-block h3 {
  margin: 2px 0 6px;
  color: var(--tp-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

body.tool-page .tp-block p {
  margin: 0;
  color: var(--tp-text);
  font-size: 17px;
  line-height: 1.65;
}

/* Stacked rows on a dark band */
body.tool-page .tp-rows {
  display: grid;
  gap: 12px;
}

body.tool-page .tp-row {
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 22px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
}

body.tool-page .tp-row strong {
  flex: 0 0 190px;
  color: var(--tp-peach);
  font-size: 19px;
}

body.tool-page .tp-row p {
  margin: 0;
  color: var(--tp-on-dark);
  font-size: 17px;
  line-height: 1.6;
}

/* FAQ: one column, cards */
body.tool-page .tp-faq {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

body.tool-page .tp-faq details {
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--tp-white);
  box-shadow: var(--tp-shadow);
}

body.tool-page .tp-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--tp-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

body.tool-page .tp-faq summary::-webkit-details-marker {
  display: none;
}

body.tool-page .tp-faq summary::after {
  content: "+";
  display: grid;
  flex: 0 0 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--tp-mint);
  color: var(--tp-green);
  font-weight: 800;
}

body.tool-page .tp-faq details[open] summary::after {
  content: "\2013";
}

body.tool-page .tp-faq p {
  margin: 12px 0 0;
  color: var(--tp-text);
  font-size: 17px;
  line-height: 1.65;
}

/* Related tools */
body.tool-page .tp-related {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

body.tool-page .tp-related a {
  display: inline-block;
  padding: 13px 20px;
  border-radius: 99px;
  background: var(--tp-white);
  box-shadow: 0 8px 20px -16px rgba(16, 35, 31, 0.6);
  color: var(--tp-forest);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

body.tool-page .tp-related a:hover {
  background: var(--tp-mint);
}

/* Closing CTA */
body.tool-page .tp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding: 44px 48px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0, rgba(217, 119, 47, 0.25), transparent 40%),
    linear-gradient(150deg, #15443b, #0b221e);
  color: #fff;
}

body.tool-page .tp-cta h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 32px;
  letter-spacing: -0.02em;
}

body.tool-page .tp-cta p {
  margin: 0;
  color: var(--tp-on-dark);
  font-size: 18px;
  line-height: 1.6;
}

body.tool-page .tp-cta-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  body.tool-page .tp-levels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.tool-page .tp-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  body.tool-page .tp-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  body.tool-page .tp-in {
    width: calc(100% - 32px);
  }

  body.tool-page .tp-hero {
    padding: 28px 0 48px;
  }

  body.tool-page .tp-hero h1 {
    font-size: 34px;
  }

  body.tool-page .tp-lead {
    font-size: 17px;
  }

  body.tool-page .tp-tool {
    padding: 22px;
  }

  body.tool-page .tp-band {
    padding: 60px 0;
  }

  body.tool-page .tp-levels {
    grid-template-columns: 1fr;
  }

  body.tool-page .tp-block {
    gap: 16px;
    padding: 22px;
  }

  body.tool-page .tp-block > svg {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }

  body.tool-page .tp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  body.tool-page .tp-row strong {
    flex: none;
  }

  body.tool-page .tp-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 30px 24px;
  }

  body.tool-page .tp-cta h2 {
    font-size: 26px;
  }

  body.tool-page .tp-ticker p {
    font-size: 13px;
  }
}
