/* Free tools landing page (/tools). The site header, hero band, CTA band and
   footer follow the website's markup; its runtime-only hover attributes are
   classes here. Tokens only: the site's white-alpha inks map to the ink ramp. */

body { margin: 0; background: var(--surface-page); }
a, a:hover, a:visited { text-decoration: none; }
a { color: var(--text-link); border-bottom-width: 0; }
a:hover { color: var(--text-link-hover); }
p a, li a { border-bottom: 1px solid var(--red-200); }
p a:hover, li a:hover { border-bottom-color: var(--red-500); }

.tl-page { min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-sans); color: var(--text-body); background: var(--surface-page); }
.tl-main { flex: 1 0 auto; }

/* ---- Site header ---------------------------------------------------------------------- */
.tl-header { position: sticky; top: 0; z-index: 60; background: var(--ink-800); border-bottom: 1px solid var(--line-chrome); }
.tl-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: var(--red-500); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--dur-instant) linear;
}
.tl-header__inner { max-width: var(--container); margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: var(--space-5); }
.tl-logo { display: flex; align-items: center; flex: none; }
.tl-logo img { display: block; height: 26px; width: auto; }
.tl-nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-1); flex-wrap: nowrap; min-width: 0; }

.ar-nav-item {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: var(--space-3) 10px;
  border-radius: var(--radius-1); white-space: nowrap;
  font: var(--type-body-sm); font-weight: var(--fw-semibold); color: var(--ink-100);
  transition: var(--transition-control);
}
.ar-nav-item:hover { background: var(--surface-hover-inverse); color: var(--text-inverse); }
/* The current page, and only the current page, carries the red dot. */
.ar-nav-dot { flex: none; display: block; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.ar-nav a[aria-current="page"] { color: var(--text-inverse); }
.ar-nav a[aria-current="page"] .ar-nav-dot { background: var(--red-500); }
.ar-nav-cta {
  margin-left: var(--space-3); display: inline-flex; align-items: center; height: 36px; padding: 0 14px; white-space: nowrap;
  background: var(--red-500); color: var(--text-inverse); border-radius: var(--radius-1);
  font: var(--type-body-sm); font-weight: var(--fw-bold);
  transition: var(--transition-control);
}
.ar-nav-cta:hover { background: var(--red-600); color: var(--text-inverse); }
.ar-nav-cta:active { background: var(--red-700); transform: translateY(1px); }
.tl-header a:focus-visible, .tl-hero a:focus-visible, .tl-cta a:focus-visible, .tl-footer a:focus-visible { outline: none; box-shadow: var(--focus-ring-inverse); }

/* Keep the full header comfortably spaced with the Free tools disclosure. */
@media (max-width: 1080px) {
  .ar-header-inner { height: auto; flex-wrap: wrap; padding-top: var(--space-4); padding-bottom: var(--space-4); row-gap: 10px; }
  .ar-header-inner nav { flex-wrap: wrap; margin-left: 0; width: 100%; }
  .ar-header-inner nav > a:last-child { margin-left: auto; }
}
/* Phones: the wrapped header is three rows tall, so it scrolls away instead of sticking. */
@media (max-width: 760px) {
  .tl-header { position: static; }
}

/* ---- Hero band -------------------------------------------------------------------------- */
.tl-hero { background-color: var(--ink-900); border-bottom: 1px solid var(--line-chrome); }
.tl-hero__inner { max-width: var(--container); margin: 0 auto; padding: 88px 24px 72px; }
.tl-hero__eyebrow {
  margin: 0 0 20px; font: var(--type-mono-sm); letter-spacing: .08em; text-transform: uppercase;
  font-variant-numeric: tabular-nums; color: var(--red-400);
}
.tl-hero__title {
  margin: 0; max-width: 820px; text-wrap: balance;
  font: var(--fw-black) clamp(36px, 5vw, 64px)/1.03 var(--font-display); letter-spacing: var(--tracking-display);
  color: var(--text-inverse);
}
.tl-hero__lede { margin: 24px 0 0; max-width: 660px; font: var(--type-body-lg); color: var(--ink-100); text-wrap: pretty; }
@media (max-width: 860px) { .tl-hero__title { font-size: clamp(30px, 8.5vw, 48px); } }

/* ---- Content band ------------------------------------------------------------------------ */
.tl-band { max-width: var(--container); margin: 0 auto; padding: 72px 24px var(--section-y); }
.tl-band__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-5);
  padding-bottom: var(--space-5); margin-bottom: var(--space-7); border-bottom: 1px solid var(--line-default);
}
.tl-band__title { margin: 0; font: var(--fw-bold) 26px/1.2 var(--font-sans); letter-spacing: var(--tracking-tight); color: var(--text-primary); }
.tl-band__count { font: var(--type-mono-sm); font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.tl-band__note { margin: var(--space-6) 0 0; font: var(--type-body); color: var(--text-secondary); }

/* A card: hairline frame, resting shadow. The tile itself is not a link (its
   title and button are), so it has no hover state of its own. */
.tl-tile {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--paper-0); border: 1px solid var(--line-default);
  border-radius: var(--radius-2); box-shadow: var(--shadow-1); overflow: hidden;
}
.tl-tile__text { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-8); }
.tl-tile__label { margin: 0; }
.tl-tile__title { margin: 0; font: var(--fw-bold) 28px/1.15 var(--font-sans); letter-spacing: var(--tracking-tight); }
.tl-tile__titlelink { color: var(--text-primary); border-bottom: 0; }
.tl-tile__titlelink:hover { color: var(--red-500); }
.tl-tile__titlelink:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-1); }
.tl-tile__desc { margin: 0; max-width: 560px; font: var(--type-body); color: var(--text-body); }
.tl-tile__spec {
  margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--line-hairline); border-bottom: 1px solid var(--line-hairline);
  font: var(--type-mono); font-variant-numeric: tabular-nums; color: var(--text-primary);
}
.tl-tile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); margin-top: var(--space-2); }
.tl-tile__meta { font: var(--type-caption); color: var(--text-secondary); }

.tl-btn-primary {
  display: inline-flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 22px;
  background: var(--red-500); color: var(--text-inverse); border-radius: var(--radius-1);
  font: var(--type-body); font-weight: var(--fw-bold); white-space: nowrap;
  transition: var(--transition-control);
}
.tl-btn-primary:hover { background: var(--red-600); color: var(--text-inverse); }
.tl-btn-primary:active { background: var(--red-700); transform: translateY(1px); }
.tl-btn-primary:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.tl-tile__figure {
  margin: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--space-3);
  padding: var(--space-7); background-color: var(--paper-1); border-left: 1px solid var(--line-default);
}
.tl-spec { display: block; width: 100%; height: auto; }
.tl-spec__grid line { stroke: var(--line-default); stroke-width: 1; }
.tl-spec__axis text { fill: var(--text-secondary); font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.tl-spec__bar { fill: var(--ink-500); }
.tl-spec__bar--fail { fill: var(--red-500); }
.tl-spec__limits line { stroke: var(--ink-900); stroke-width: 1.25; stroke-dasharray: 4 2; }
.tl-tile__caption { font: var(--type-caption); color: var(--text-secondary); }
.tl-tile__disclosure { display: block; margin-top: var(--space-1); }

@media (max-width: 860px) {
  .tl-tile { grid-template-columns: minmax(0, 1fr); }
  .tl-tile__text { padding: var(--space-6); }
  .tl-tile__figure { border-left: 0; border-top: 1px solid var(--line-default); padding: var(--space-5); }
}

/* ---- Closing CTA band ---------------------------------------------------------------------- */
.tl-cta { background: var(--red-500); border-top: 1px solid var(--red-700); }
.tl-cta__inner { max-width: var(--container); margin: 0 auto; padding: 72px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.tl-cta__text { flex: 1; min-width: 280px; }
.tl-cta__title {
  margin: 0; text-wrap: balance;
  font: var(--fw-black) clamp(28px, 3.4vw, 42px)/1.06 var(--font-display); letter-spacing: var(--tracking-display);
  color: var(--text-inverse);
}
.tl-cta__lede { margin: var(--space-5) 0 0; max-width: 620px; font: var(--type-body); color: var(--text-inverse); text-wrap: pretty; }
.tl-cta__btn {
  flex: none; display: inline-flex; align-items: center; height: 48px; padding: 0 26px;
  background: var(--paper-0); color: var(--red-600); border-radius: var(--radius-1);
  font: var(--type-body); font-weight: var(--fw-bold);
  transition: var(--transition-control);
}
.ar-cta-white:hover { background: var(--paper-2); color: var(--red-700); }
.ar-cta-white:active { transform: translateY(1px); }

/* ---- Footer ------------------------------------------------------------------------------------ */
.tl-footer { background: var(--ink-950); border-top: 1px solid var(--line-chrome); }
.tl-footer__grid {
  max-width: var(--container); margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-8);
}
.tl-footer__logo { display: block; height: 24px; width: auto; margin-bottom: var(--space-5); }
.tl-footer__blurb { margin: 0; max-width: 280px; font: var(--type-body-sm); color: var(--ink-200); }
.tl-footer__label { margin: 0 0 14px; font: var(--type-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-200); }
.tl-footer__links { display: flex; flex-direction: column; gap: 10px; }
.ar-foot-link { align-self: flex-start; font: var(--type-body-sm); color: var(--ink-100); transition: var(--transition-control); }
.ar-foot-link:hover { color: var(--text-inverse); }
.tl-footer__base { max-width: var(--container); margin: 0 auto; padding: 0 24px 40px; }
.tl-footer__rule { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-5) var(--space-8); padding-top: 20px; border-top: 1px solid var(--line-chrome); }
.tl-footer__legal { display: flex; flex-direction: column; gap: 6px; }
.tl-footer__mono { font: var(--type-mono-sm); font-variant-numeric: tabular-nums; color: var(--ink-200); }
.ar-foot-contact { color: var(--red-400); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.ar-foot-contact:hover { color: var(--red-300); }

@media (prefers-reduced-motion: reduce) {
  .tl-progress { transition: none; }
}

/* Heat calculator draft: a secondary entry alongside the harmonic calculator. */
.tl-tile--heat { margin-top: var(--space-7); }
.tl-heat__heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); }
.tl-heat__status { display: inline-flex; align-items: center; gap: var(--space-3); font: var(--type-body-sm); color: var(--text-secondary); }
.tl-heat__status::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: var(--radius-pill); background: var(--amber-500); }
.tl-heat__notice { margin: 0; font: var(--type-body-sm); color: var(--text-secondary); }
.tl-heat__button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-6);
  border: 1px solid var(--line-strong); border-radius: var(--radius-1); background: var(--paper-0);
  color: var(--text-primary); font: var(--type-body); font-weight: var(--fw-semibold); white-space: nowrap;
  transition: var(--transition-control);
}
.tl-heat__button:hover { background: var(--surface-hover); color: var(--text-primary); }
.tl-heat__button:active { background: var(--paper-2); transform: translateY(1px); }
.tl-heat__button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.tl-heat-elevation { display: block; width: 100%; height: auto; overflow: visible; }
.tl-heat-elevation__frame { fill: var(--paper-0); stroke: var(--ink-600); stroke-width: 1.5; }
.tl-heat-elevation__dimensions { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.tl-heat-elevation__vents { fill: var(--paper-2); stroke: var(--ink-500); stroke-width: 1; }
.tl-heat-elevation__labels, .tl-heat-elevation__notes { fill: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-heat-elevation__labels { fill: var(--text-primary); }
