:root {
  color-scheme: light;
  --page: #eff1fa;
  --surface: #fcfcff;
  --surface-muted: #e8eafb;
  --text: #171934;
  --muted: #50557b;
  --line: #cdd2ed;
  --accent: #4132ba;
  --accent-contrast: #fff;
  --highlight: #007568;
  --highlight-surface: #d8f4ef;
  --radius: 16px;
  --focus: #523cf0;
  --shadow: 0 8px 22px rgb(41 40 98 / 8%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d1022;
    --surface: #171b34;
    --surface-muted: #252a4f;
    --text: #f4f3ff;
    --muted: #b1b8dc;
    --line: #414a77;
    --accent: #b7a8ff;
    --accent-contrast: #1b1141;
    --highlight: #76e7d3;
    --highlight-surface: #153f48;
    --focus: #c7bcff;
    --shadow: 0 8px 22px rgb(3 5 19 / 26%);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.5; min-height: 100svh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
:where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
svg { display: block; }
main { width: min(100% - 2.5rem, 65rem); margin-inline: auto; padding-block: clamp(1.4rem, 4vw, 3.5rem); flex: 1; }
.skip { position: fixed; inset: 0 auto auto .75rem; z-index: 999; clip-path: inset(50%); padding: .65rem; background: var(--surface); }
.skip:focus { clip-path: none; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-bar { width: min(100% - 2.5rem, 70rem); min-height: 3.8rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; padding-block: .5rem; }
.site-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 780; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; background: var(--accent); color: var(--accent-contrast); }
.brand-mark svg { width: .95rem; height: .95rem; }
.site-nav { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.site-nav a { min-height: 2.5rem; display: inline-flex; align-items: center; padding: .5rem .72rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .875rem; line-height: 1.2; }
.site-nav a:hover { color: var(--text); background: var(--surface-muted); }
.site-nav a[aria-current=page] { color: var(--accent); background: var(--surface-muted); font-weight: 680; }
.hero { max-width: 46rem; margin: clamp(.25rem, 3vw, 1.2rem) 0 2rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.1rem); letter-spacing: -.035em; line-height: 1.01; margin: .45rem 0 .75rem; }
.hero h1 span { color: var(--accent); }
.hero > p:last-child { color: var(--muted); max-width: 35rem; margin: 0; }
.eyebrow { font-size: .73rem; letter-spacing: .14em; font-weight: 770; color: var(--highlight); display: flex; align-items: center; gap: .55rem; }
.eyebrow span { width: .43rem; height: .43rem; border-radius: 50%; background: currentColor; }
.tool-group + .tool-group { margin-top: 1.65rem; }
.tool-group h2 { margin: 0 0 .65rem; font-size: 1.1rem; letter-spacing: -.01em; }
.tool-related { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: 1.6rem auto 0; max-width: 55rem; padding: .6rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.tool-related a { padding-block: .4rem; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.tool-grid--time-math { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-card { min-height: 10.7rem; display: grid; grid-template-columns: 1fr auto; row-gap: .46rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(.9rem, 2.6vw, 1.35rem); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.tool-card:hover { border-color: var(--accent); }
.tool-symbol { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 11px; background: var(--surface-muted); color: var(--accent); margin-bottom: .32rem; }
.tool-card:last-child .tool-symbol { background: var(--highlight-surface); color: var(--highlight); }
.tool-symbol svg { width: 1.45rem; height: 1.45rem; }
.tool-arrow { color: var(--accent); font-size: 1.05rem; line-height: 1; }
.tool-name, .tool-note { grid-column: 1 / -1; }
.tool-name { font-size: 1.08rem; font-weight: 760; letter-spacing: -.018em; }
.tool-note, .related, .site-footer { color: var(--muted); }
.tool-note, .related { font-size: .91rem; }
.related { margin-block: 1.55rem 0; }
.site-footer { border-top: 1px solid var(--line); font-size: .84rem; }
.site-footer .site-bar { min-height: 3.6rem; }
.site-footer p { margin: .25rem 0; }
.site-footer a { white-space: nowrap; }

@media (max-width: 60rem) {
  .tool-grid--time-math { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 44rem) {
  main, .site-bar { width: calc(100% - 2rem); }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: auto; }
}
@media (max-width: 29rem) {
  .site-header .site-bar { justify-content: flex-start; gap: .25rem .5rem; }
  .site-nav { flex-basis: 100%; }
  .site-nav a { padding-inline: .65rem; }
}
