/*
  03-home.css
  Homepage only styles. The first rule is the tool slot. After that come
  the sections below the tool, in page order: trust strip, why, how it
  works, security, use cases, comparison, what is, safety tips, FAQ,
  blog teaser and the closing call to action.
  Section markup lives in template-parts/home/.
*/

/* Tool slot: the plugin shortcode output sits here.
   The slot itself only carries the agreed 5px bottom margin.
   Inside it, the tool band is a flex row: an optional banner column
   on each side of the tool. The columns come from the widget areas in
   inc/banner-slots.php, are printed only when they hold a widget, and
   are displayed only on wide screens (1500px and up), sticky, with a
   28px gap, so the tool is never squeezed on smaller screens.
   The one restyle the theme applies to the tool itself is widening
   its wrapper from the plugin's 880px to 1120px so it matches the
   page. Layout and behaviour inside the tool are never touched. In
   light mode its colours are untouched too. In dark mode the block
   after the banner rules remaps only its colours, backgrounds,
   borders and shadows to the dark tokens, so the tool follows the
   header toggle like the rest of the page. */
.tm-tool-slot { margin-bottom: 5px; }
.tm-tool-band {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
}
.tm-tool-main { flex: 0 1 1120px; width: 100%; min-width: 0; }
.tm-tool-slot .tm-wrap { max-width: 1120px; }
.tm-tool-side { display: none; }
@media (min-width: 1500px) {
  .tm-tool-side {
    display: block;
    flex: 0 1 300px;
    min-width: 0;
    position: sticky;
    top: 100px;
  }
}
.tm-tool-side img,
.tm-tool-side iframe,
.tm-tool-side ins,
.tm-tool-side embed,
.tm-tool-side object { max-width: 100%; }
.tm-tool-side img { height: auto; }
.tm-tool-side .tm-banner-widget + .tm-banner-widget { margin-top: 24px; }

/* Tool dark mode: colour only overrides for the plugin tool.
   Every rule sits inside the dark scope, so light mode output is
   exactly the plugin's own styling. Only colour, background, border
   and shadow properties are set. No layout, spacing, size or font
   property appears here, and the plugin files are never edited.
   The plugin's fixed light hexes map to the theme tokens: white
   surfaces to --tm-surface, pale fills to --tm-surface-raised and
   --tm-bg-soft, borders to --tm-border and --tm-border-strong, strong
   text to --tm-ink, body text to --tm-ink-soft, muted text to
   --tm-muted, and the brand teal to --tm-primary. The success green
   of the code chips and the danger red have no theme token, so they
   get dark equivalents inline. The modal and toast rules are not
   scoped to the slot because those overlays are plugin unique and
   position fixed. */
html[data-theme="dark"] .tm-tool-slot .tm-wrap { background: var(--tm-bg-soft); color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-card,
html[data-theme="dark"] .tm-tool-slot .tm-inbox { background: var(--tm-surface); border-color: var(--tm-border); box-shadow: var(--tm-shadow-card); }
html[data-theme="dark"] .tm-tool-slot .tm-addr { background: var(--tm-surface-raised); border-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-addr:focus-within { border-color: var(--tm-primary); box-shadow: 0 0 0 3px rgba(47, 179, 176, 0.18); background: var(--tm-surface); }
html[data-theme="dark"] .tm-tool-slot .tm-addr input#tm-username { color: var(--tm-ink); }
html[data-theme="dark"] .tm-tool-slot .tm-addr select#tm-domain { color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-addr .tm-at,
html[data-theme="dark"] .tm-tool-slot .tm-edit-hint,
html[data-theme="dark"] .tm-tool-slot .tm-history-empty,
html[data-theme="dark"] .tm-tool-slot .tm-time,
html[data-theme="dark"] .tm-tool-slot .tm-checking { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-btn { background: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-btn:hover { background: var(--tm-primary-bright); }
html[data-theme="dark"] .tm-tool-slot .tm-btn.ghost { background: var(--tm-bg-soft); color: var(--tm-ink-soft); border-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-btn.ghost:hover { background: var(--tm-surface-raised); border-color: var(--tm-border-strong); }
html[data-theme="dark"] .tm-tool-slot .tm-btn-secondary { background: var(--tm-bg-soft); color: var(--tm-ink-soft); border-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-history-toggle { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-history-toggle:hover { background: var(--tm-bg-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-history-item { background: var(--tm-surface-raised); border-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-history-item:hover { border-color: var(--tm-border-strong); }
html[data-theme="dark"] .tm-tool-slot .tm-history-item.active { border-color: var(--tm-primary); background: var(--tm-primary-tint); }
html[data-theme="dark"] .tm-tool-slot .tm-history-addr { color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-history-item.active .tm-history-addr { color: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-history-del { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-history-del:hover { color: #f87171; background: rgba(220, 38, 38, 0.14); }
html[data-theme="dark"] .tm-tool-slot .tm-actions-sub { border-top-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-link { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-link:hover { color: var(--tm-ink-soft); background: var(--tm-bg-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-link.tm-danger:hover { color: #f87171; background: rgba(220, 38, 38, 0.14); }
html[data-theme="dark"] .tm-tool-slot .tm-linklike { color: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-ttl,
html[data-theme="dark"] .tm-tool-slot .tm-ttl button,
html[data-theme="dark"] .tm-tool-slot .tm-pill { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-ttl button:hover { background: var(--tm-bg-soft); color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-tool-slot .tm-ttl button.active,
html[data-theme="dark"] .tm-tool-slot .tm-pill.active { background: var(--tm-primary); color: #ffffff; border-color: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-inbox-head { border-bottom-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-tabs button,
html[data-theme="dark"] .tm-tool-slot .tm-tab { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-tabs button.active,
html[data-theme="dark"] .tm-tool-slot .tm-tab.active,
html[data-theme="dark"] .tm-tool-slot .tm-tab-active { background: var(--tm-primary-tint); color: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-empty { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-empty .tm-big { color: var(--tm-border-strong); }
html[data-theme="dark"] .tm-tool-slot .tm-msg { border-bottom-color: var(--tm-border); }
html[data-theme="dark"] .tm-tool-slot .tm-msg:hover { background: var(--tm-surface-raised); }
html[data-theme="dark"] .tm-tool-slot .tm-msg.tm-new { background: var(--tm-primary-tint); }
html[data-theme="dark"] .tm-tool-slot .tm-ava { background: var(--tm-primary-tint); color: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-msg.tm-new .tm-ava { background: var(--tm-primary); color: #ffffff; }
html[data-theme="dark"] .tm-tool-slot .tm-from { color: var(--tm-muted); }
html[data-theme="dark"] .tm-tool-slot .tm-sub { color: var(--tm-ink); }
html[data-theme="dark"] .tm-tool-slot .tm-code { background: #0b3527; color: #34d399; border-color: #065f46; }
html[data-theme="dark"] .tm-tool-slot .tm-code:hover { background: #0e4530; }
html[data-theme="dark"] .tm-tool-slot .tm-check-dot { background: var(--tm-primary); }
html[data-theme="dark"] .tm-tool-slot .tm-subtle { color: var(--tm-muted); }
html[data-theme="dark"] .tm-modal { background: rgba(3, 8, 13, 0.62); }
html[data-theme="dark"] .tm-modal-box,
html[data-theme="dark"] #tm-pinmodal .tm-modal-box,
html[data-theme="dark"] #tm-msgmodal .tm-modal-box { background: var(--tm-surface); box-shadow: var(--tm-shadow-lift); }
html[data-theme="dark"] .tm-msg-body { color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-modal-box h3,
html[data-theme="dark"] .tm-msgbox-from { color: var(--tm-ink); }
html[data-theme="dark"] .tm-modal-box p,
html[data-theme="dark"] .tm-modal-sub,
html[data-theme="dark"] .tm-msgbox-time,
html[data-theme="dark"] .tm-msg-meta { color: var(--tm-muted); }
html[data-theme="dark"] .tm-modal-box input { background: var(--tm-surface-raised); border-color: var(--tm-border); color: var(--tm-ink); }
html[data-theme="dark"] .tm-modal-box input:focus { border-color: var(--tm-primary); }
html[data-theme="dark"] .tm-msgbox-sub { color: var(--tm-ink-soft); }
html[data-theme="dark"] .tm-msgbox-code { background: #0b3527; border-color: #065f46; color: #34d399; }
html[data-theme="dark"] .tm-msgbox-body { color: var(--tm-ink-soft); border-top-color: var(--tm-border); }
html[data-theme="dark"] .tm-bodytext a { color: var(--tm-primary); }
html[data-theme="dark"] .tm-modal-x { color: var(--tm-muted); }
html[data-theme="dark"] .tm-modal-x:hover { background: var(--tm-bg-soft); color: var(--tm-ink); }
html[data-theme="dark"] .tm-toast { background: var(--tm-surface-raised); color: var(--tm-ink); border: 1px solid var(--tm-border-strong); box-shadow: var(--tm-shadow-lift); }

/* Class collision fix, dark mode only. The plugin stylesheet also
   defines .tm-steps and .tm-step (for its own removed sections) with
   a fixed white background and dark text, and it loads after this
   theme, so it beat the theme's own .tm-step rule at equal
   specificity and the homepage How it works cards stayed white in
   dark mode (found in the live check on 2026-11-20). These scoped
   rules win on specificity and only recolour; light mode keeps the
   exact appearance it has always had. */
html[data-theme="dark"] .tm-step { background: var(--tm-surface-raised); border-color: var(--tm-border); }
html[data-theme="dark"] .tm-step h3 { color: var(--tm-ink); }
html[data-theme="dark"] .tm-step p { color: var(--tm-ink-soft); }

/* PIN modal icon cap, both modes. The live plugin prints a padlock
   SVG at the top of the Set PIN modal with no size rule anywhere,
   so it renders at the default replaced element size and fills the
   modal (found in the live check on 2026-11-20; the plugin itself
   is not edited). The cap can only shrink an oversized icon, it
   never enlarges or moves anything else in the modal. */
#tm-pinmodal svg { max-width: 48px; max-height: 48px; }

/* Trust strip */
.tm-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tm-trust-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--tm-surface-raised);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 22px;
  box-shadow: var(--tm-shadow-card);
}
.tm-trust-card h3 { font-size: 1.02rem; margin: 2px 0 5px; }
.tm-trust-card p { color: var(--tm-ink-soft); font-size: 0.92rem; margin: 0; line-height: 1.5; }
.tm-band-trust { padding: 34px 0 10px; background: var(--tm-bg); }

/* Why: bento style grid */
.tm-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* How it works: numbered steps */
.tm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: tm-step;
}
.tm-step {
  position: relative;
  background: var(--tm-surface-raised);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 30px 26px;
  box-shadow: var(--tm-shadow-card);
}
.tm-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(145deg, var(--tm-primary-bright), var(--tm-primary-dark));
  box-shadow: var(--tm-shadow-tile);
  margin-bottom: 16px;
}
.tm-step h3 { font-size: 1.1rem; margin: 0 0 8px; }
.tm-step p { color: var(--tm-ink-soft); margin: 0; font-size: 0.97rem; }

/* Security: split layout with a checklist and a note card */
.tm-security-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  align-items: center;
}
.tm-checklist { list-style: none; margin: 22px 0 0; padding: 0; }
.tm-checklist li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--tm-border);
  color: var(--tm-ink-soft);
}
.tm-checklist li:last-child { border-bottom: 0; }
.tm-checklist .tm-icon { color: var(--tm-primary); flex: 0 0 auto; margin-top: 2px; }
.tm-checklist strong { color: var(--tm-ink); }
.tm-security-card {
  background: linear-gradient(160deg, #123a4d, var(--tm-navy));
  color: #e8f2f6;
  border-radius: 22px;
  padding: 34px;
  box-shadow: var(--tm-shadow-lift);
}
.tm-security-card h3 { color: #ffffff; margin: 18px 0 10px; font-size: 1.25rem; }
.tm-security-card p { color: #c3d6df; margin: 0; }

/* Use cases */
.tm-usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* What is: readable prose with a side list */
.tm-whatis-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: start;
}
.tm-whatis-copy p { color: var(--tm-ink-soft); font-size: 1.03rem; }
.tm-whatis-copy p:first-of-type { margin-top: 0; }
.tm-diff-card {
  background: var(--tm-surface-raised);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 26px;
  box-shadow: var(--tm-shadow-card);
}
.tm-diff-card h3 { margin: 0 0 14px; font-size: 1.05rem; }
.tm-whatis-art { display: block; width: 100%; height: auto; border-radius: 14px; margin: 0 0 18px; box-shadow: 0 10px 24px rgba(7, 43, 51, 0.10); }
.tm-diff-card ul { list-style: none; margin: 0; padding: 0; }
.tm-diff-card li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 8px 0; color: var(--tm-ink-soft); font-size: 0.96rem;
}
.tm-diff-card .tm-icon { color: var(--tm-primary); flex: 0 0 auto; margin-top: 2px; }

/* Safety tips */
.tm-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* Blog teaser */
.tm-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tm-blog-more { text-align: center; margin-top: 34px; }

/* Closing call to action: teal gradient with a soft light glow at
   the top right and a warm amber glow at the bottom left, all from
   the theme palette. The tokens flip in dark mode, so the band stays
   rich in both modes. */
.tm-cta-band {
  background:
    radial-gradient(640px 320px at 88% -20%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 60%),
    radial-gradient(520px 260px at 8% 120%, rgba(240, 168, 50, 0.25), rgba(240, 168, 50, 0) 60%),
    linear-gradient(135deg, var(--tm-primary-dark), var(--tm-primary) 55%, var(--tm-primary-bright));
  color: #ffffff;
}
.tm-cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.tm-cta-art { background: #ffffff; border-radius: 20px; padding: 10px; box-shadow: 0 18px 40px rgba(4, 32, 39, 0.28); margin: 0 auto 26px; max-width: 520px; }
.tm-cta-art img { display: block; width: 100%; height: auto; border-radius: 13px; }
.tm-cta-inner h2 { color: #ffffff; font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 12px; }
.tm-cta-inner p { color: rgba(255, 255, 255, 0.88); margin: 0 0 26px; font-size: 1.05rem; }

/* Screen-reader-only homepage H1. Visually hidden, but announced by screen readers. Homepage only: this file loads on the front page only. */
.tm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}