/* The Tools page (src/tools.html): the tools world fills the first screen under the site's header, with the
   page's heading over it on a wide screen (above it on a phone); every tool follows in the page's own words,
   by pillar. Without the 3D (html.tws-flat), the heading stands on its own and the list is the page. */
.tws-top { position: relative; }
.tws-stage { height: calc(100vh - 63px); height: calc(100svh - 63px); min-height: 540px; max-height: 940px; }
.tws-stage.tw3 { --tw3-st-left: auto; --tw3-st-right: 18px; }
.tws-head {
  position: absolute; left: max(24px, calc((100% - var(--measure)) / 2 + 24px)); top: 34px; z-index: 2; width: min(34rem, calc(100% - 48px));
  pointer-events: none; color: #e8f1ff; transition: color .6s ease;
}
.tws-head a { pointer-events: auto; }
/* out of the way while a tool's window is open, or the whole ring is in view */
.tws-head { opacity: 1; transition: color .6s ease, opacity .35s ease; }
.tws-top:has(.tw3-is-open) .tws-head, .tws-top:has(.tw3-is-all) .tws-head { opacity: 0; }
.tws-top:has(.tw3-is-open) .tws-head a, .tws-top:has(.tw3-is-all) .tws-head a { pointer-events: none; }
.tws-head .eyebrow { color: rgba(232, 241, 255, .7); }
.tws-head h1 { color: inherit; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06; }
.tws-head .lede { color: rgba(232, 241, 255, .74); font-size: 16px; max-width: 30rem; }
.tws-head::before { content: ""; position: absolute; inset: -40px -60px -40px -40px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  background: radial-gradient(closest-side, rgba(244, 245, 248, .86), rgba(244, 245, 248, 0)); }
.tws-top:has(.tw3-day) .tws-head { color: #0e1b30; }
.tws-top:has(.tw3-day) .tws-head .eyebrow { color: rgba(14, 27, 48, .74); }  /* 6:1 or so on the wash over the lit room */
.tws-top:has(.tw3-day) .tws-head .lede { color: rgba(14, 27, 48, .72); }
.tws-top:has(.tw3-day) .tws-head::before { opacity: 1; }
.tws-links { margin: 14px 0 0; font-size: 14px; }
.tws-links a { color: inherit; text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 1px; opacity: .85; }
.tws-links a:hover { opacity: 1; }

/* every tool, by pillar */
.tws-list { padding-block: 84px 24px; scroll-margin-top: 70px; }
.tws-list > h2 { margin-top: 6px; }
.tws-pillar { margin-top: 40px; }
.tws-pillar h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; }
.tws-pillar h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 22%, transparent); }
.tws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.tws-card { display: grid; gap: 9px; align-content: start; padding: 18px 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--tc); box-shadow: var(--shadow); }
.tws-card header { display: flex; align-items: center; gap: 12px; }
.tws-card header img { width: 52px; height: 52px; border-radius: 14px; flex: none; background: color-mix(in srgb, var(--tc) 14%, var(--surface-2)); }
.tws-card h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.tws-card .tws-what { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.tws-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tws-card li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.tws-card li::before { content: ""; width: 6px; height: 6px; margin-top: .55em; border-radius: 2px; background: var(--tc); }
.tws-card .tws-plans { margin: 2px 0 0; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.tws-see { justify-self: start; margin-top: 2px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: none; border: 0; padding: 4px 0; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.tws-see:hover { border-color: var(--ink); }
.tws-flat .tws-see, .tws-flat .tws-3d { display: none; }

/* without the 3D: the heading on the page, and no stage */
.tws-flat .tws-stage { display: none; }
.tws-flat .tws-head { position: static; width: auto; max-width: var(--measure); margin: 0 auto; padding: 56px 24px 0; color: var(--ink); box-sizing: border-box; }
.tws-flat .tws-head .eyebrow { color: var(--muted); }
.tws-flat .tws-head .lede { color: var(--ink-2); }
.tws-flat .tws-head::before, .tws-flat .tws-links { display: none; }
.tws-flat .tws-list { padding-top: 40px; }

@media (max-width: 760px) {
  .tws-head, .tws-top:has(.tw3-is-open) .tws-head, .tws-top:has(.tw3-is-all) .tws-head { position: static; width: auto; padding: 22px 20px 14px; color: var(--ink); box-sizing: border-box; opacity: 1; }
  .tws-top:has(.tw3-is-open) .tws-head a, .tws-top:has(.tw3-is-all) .tws-head a { pointer-events: auto; }
  .tws-head h1 { font-size: 29px; }
  .tws-head .lede { font-size: 15px; margin-top: 10px; }
  .tws-links { margin-top: 10px; }
  .tws-head .eyebrow { color: var(--muted); }
  .tws-head .lede { color: var(--ink-2); }
  .tws-head::before { display: none; }
  .tws-top { display: flex; flex-direction: column-reverse; }
  .tws-stage { height: 70vh; height: 70svh; min-height: 440px; max-height: 700px; }
  .tws-stage.tw3 { --tw3-st-left: 14px; --tw3-st-right: auto; }
  .tws-top:has(.tw3-day) .tws-head { color: var(--ink); }
  .tws-top:has(.tw3-day) .tws-head .eyebrow { color: var(--muted); }
  .tws-top:has(.tw3-day) .tws-head .lede { color: var(--ink-2); }
}
/* headless checks (?test): no transitions, so a still shows the state it was asked for */
.tw3-test .tws-head, .tw3-test .tws-head * , .tw3-test .tws-head::before { transition: none !important; }
