:root {
  color-scheme: light;
  --accent: #ff9500;
  --accent-strong: #f07800;
  --ink: #11151b;
  --muted: #5a6472;
  --line: #c9d0d8;
  --panel: #ffffff;
  --page: #f4f6f8;
  --header: #111111;
  --shadow: 0 20px 60px rgba(17, 21, 27, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 248, 0.98)),
    var(--page);
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 12px clamp(20px, 4vw, 56px);
  border-bottom: 2px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(255, 149, 0, 0.14) 0 1px, transparent 1px 12px),
    radial-gradient(circle at 85% 10%, rgba(255, 149, 0, 0.22), transparent 28%),
    var(--header);
  background-size: 12px 12px, auto, auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(180px, 72vw);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.donate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease;
}

.donate-link img {
  display: block;
  width: min(166px, 38vw);
  height: auto;
}

.donate-link:hover,
.donate-link:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.donate-link:focus-visible {
  outline: 3px solid rgba(255, 149, 0, 0.35);
  outline-offset: 3px;
}

.page-shell {
  width: min(100% - 40px, 1500px);
  margin: 0 auto;
  padding: clamp(24px, 2.4vw, 34px) 0 clamp(24px, 3vw, 40px);
}

.intro {
  display: grid;
  gap: 8px;
  padding-bottom: clamp(18px, 2.4vw, 26px);
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.tool-list {
  display: grid;
  overflow: hidden;
  margin-top: clamp(16px, 2vw, 22px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-row {
  display: grid;
  grid-template-columns: 72px 112px minmax(280px, 1fr) minmax(430px, auto);
  align-items: center;
  gap: clamp(16px, 2.6vw, 32px);
  min-height: 108px;
  padding: 14px clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}

.tool-row:last-child {
  border-bottom: 0;
}

.tool-index {
  color: var(--accent-strong);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tool-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--accent-strong);
}

.tool-icon svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.tool-copy {
  min-width: 0;
}

.tool-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.tool-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  overflow-wrap: anywhere;
}

.tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(176px, 1fr));
  gap: 16px;
  padding-left: clamp(18px, 3vw, 36px);
  border-left: 1px solid var(--line);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 18px;
  border: 2px solid var(--accent-strong);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.button-secondary {
  color: var(--accent-strong);
  background: #ffffff;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(180deg, #ffac29, #ff8500);
  border-color: #ff8500;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: #ffffff;
  background: var(--accent-strong);
}

.button:focus-visible {
  outline: 3px solid rgba(255, 149, 0, 0.35);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .tool-row {
    grid-template-columns: 64px 92px minmax(0, 1fr);
  }

  .tool-actions {
    grid-column: 3;
    width: min(100%, 520px);
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 54px;
    padding: 9px 20px;
  }

  .page-shell {
    width: min(100% - 28px, 1500px);
    padding-top: 34px;
  }

  .intro h1 {
    font-size: clamp(2.15rem, 11vw, 3.4rem);
  }

  .tool-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px 18px;
    min-height: 0;
    padding: 24px 18px;
  }

  .tool-icon {
    grid-column: 1;
    grid-row: 2;
    width: 56px;
    height: 56px;
    border-left: 0;
  }

  .tool-icon svg {
    width: 52px;
    height: 52px;
  }

  .tool-copy {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .tool-copy h2 {
    font-size: clamp(1.35rem, 6vw, 1.9rem);
  }

  .tool-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    width: 100%;
    padding-top: 6px;
  }

  .button {
    min-height: 56px;
  }
}

@media (max-width: 420px) {
  .brand {
    width: min(180px, 100%);
  }

  .tool-row {
    grid-template-columns: 1fr;
  }

  .tool-index,
  .tool-icon,
  .tool-copy,
  .tool-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .tool-index {
    font-size: 2rem;
  }

  .tool-icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .donate-link {
    transition: none;
  }

  .button:hover,
  .button:focus-visible,
  .donate-link:hover,
  .donate-link:focus-visible {
    transform: none;
  }
}
