:root {
  color-scheme: light;
  --ink: #202421;
  --muted: #626b64;
  --line: #dce2dc;
  --soft: #f2f5f1;
  --paper: #ffffff;
  --canvas: #f8faf7;
  --green: #1f7a4d;
  --green-dark: #155b38;
  --lime: #c9f24d;
  --purple: #7557d9;
  --red: #cb4a42;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 20rem;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.landing {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 43%, #ddf4dd 0, #f8faf700 24rem),
    var(--canvas);
}

.landing-nav,
.landing-footer,
.results-header,
.result-tabs,
.results-footer {
  display: flex;
  align-items: center;
}

.landing-nav {
  justify-content: space-between;
  min-height: 4.25rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  font-size: 0.875rem;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-nav a,
.landing-footer a,
.results-footer a {
  text-decoration: none;
}

.landing-nav a:hover,
.landing-footer a:hover,
.results-footer a:hover {
  text-decoration: underline;
}

.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.account-link:hover {
  background: var(--green-dark);
  text-decoration: none !important;
}

.landing-main {
  align-self: center;
  width: min(90vw, 40rem);
  margin-inline: auto;
  padding: 2.5rem 0 7rem;
  text-align: center;
}

.wordmark {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-size: clamp(4rem, 12vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.88;
  text-decoration: none;
}

.wordmark::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -0.12em;
  bottom: -0.02em;
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  background: var(--lime);
}

.wordmark b {
  position: relative;
  color: var(--green-dark);
  font-weight: 900;
}

.tagline {
  margin: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.5rem;
  border: 1px solid #cfd7cf;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 1px 3px #1d2e2130;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-form:focus-within,
.search-form:hover {
  border-color: transparent;
  box-shadow: 0 3px 10px #1d2e2126, 0 1px 4px #1d2e211f;
}

.landing-search {
  min-height: 3.75rem;
  padding-left: 1.25rem;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.landing-search input {
  font-size: 1.0625rem;
}

.search-icon {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #69716b;
}

.search-icon::after {
  content: "";
  position: absolute;
  top: 0.69rem;
  left: 0.68rem;
  width: 0.45rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: 0.45rem;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  transition: background-color 160ms ease, transform 160ms ease;
}

.search-go .search-icon {
  color: #fff;
}

.search-go:hover {
  background: var(--green-dark);
}

.search-form.is-typing {
  border-color: #89b999;
  box-shadow: 0 0 0 3px #1f7a4d1c, 0 3px 10px #1d2e2126;
}

.search-form.is-typing input {
  caret-color: var(--green);
}

.search-form.is-submitting .search-go {
  background: var(--lime);
  transform: scale(0.86);
}

.search-form.is-submitting .search-go .search-icon {
  color: var(--green-dark);
}

.landing-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.soft-button {
  min-height: 2.75rem;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  color: #3c433e;
  background: #edf1ec;
  font-size: 0.875rem;
  text-decoration: none;
}

.soft-button:hover,
.soft-button:focus-visible {
  border-color: #c8d0c9;
  color: var(--ink);
  box-shadow: 0 1px 2px #19241d1a;
}

.search-status {
  min-height: 1.5rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.landing-footer {
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  color: #5a635c;
  background: #edf1ec;
  font-size: 0.875rem;
}

.landing-footer > div {
  display: flex;
  gap: 1.25rem;
}

.results-page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
}

.results-header {
  gap: clamp(1rem, 3vw, 2rem);
  min-height: 5.5rem;
  padding: 1rem clamp(1rem, 3vw, 2.25rem);
}

.wordmark-small {
  flex: none;
  font-size: 2.3rem;
}

.results-search {
  width: min(100%, 43rem);
  padding-left: 1.15rem;
}

.results-account {
  margin-left: auto;
}

.result-tabs {
  gap: 1.5rem;
  min-height: 3.25rem;
  padding: 0 clamp(1rem, 3vw, 2.25rem) 0 clamp(7.6rem, 13.5vw, 12.25rem);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  overflow-x: auto;
}

.result-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  white-space: nowrap;
  text-decoration: none;
}

.result-tabs a:hover,
.result-tabs .active {
  color: var(--green-dark);
}

.result-tabs .active::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--green);
}

.tools-button {
  margin-left: auto;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--muted);
  background: var(--paper);
  white-space: nowrap;
}

.tools-button:hover {
  color: var(--ink);
  background: var(--soft);
}

.results-main {
  width: min(calc(100% - clamp(1rem, 13.5vw, 12.25rem) - 1rem), 69rem);
  margin-left: clamp(1rem, 13.5vw, 12.25rem);
  padding: 1rem 0 4rem;
  transition: opacity 200ms ease, transform 200ms ease;
}

.results-main.results-arriving {
  animation: arrive 360ms ease-out both;
}

.results-main.is-refreshing {
  opacity: 0.35;
  transform: translateY(0.35rem);
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.result-count {
  margin: 0 0 1.5rem;
  color: #737c75;
  font-size: 0.875rem;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 42rem) minmax(16rem, 21rem);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.section-heading h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
}

.news-mark {
  position: relative;
  width: 1.15rem;
  height: 1rem;
  border: 2px solid var(--green);
  border-radius: 0.15rem;
}

.news-mark::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.2rem;
  width: 0.55rem;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0.27rem var(--green);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.news-card:hover {
  box-shadow: 0 6px 20px #1f34251f;
  transform: translateY(-2px);
}

.news-card strong,
.news-card .source-row,
.news-card .story-meta {
  margin-inline: 0.85rem;
}

.news-card strong {
  margin-top: 0.65rem;
  color: #1e3f6b;
  font-size: 1rem;
  line-height: 1.32;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-top: 0.75rem;
  color: #4e5650;
  font-size: 0.75rem;
}

.source-dot,
.favicon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  color: #fff;
  font-size: 0.67rem;
  font-weight: 800;
}

.source-dot-purple { background: var(--purple); }
.source-dot-red { background: var(--red); }
.source-dot-green { background: var(--green); }
.source-dot-black { background: var(--ink); }

.story-meta {
  margin-top: auto;
  padding: 0.75rem 0 0.85rem;
  color: #6e776f;
  font-size: 0.75rem;
}

.story-art {
  position: relative;
  display: block;
  height: 6.7rem;
  overflow: hidden;
  background: #edf2ec;
}

.story-art::before,
.story-art::after,
.story-art i {
  content: "";
  position: absolute;
  display: block;
}

.story-art-key {
  background: linear-gradient(145deg, #171a18, #49564c);
}

.story-art-key::before {
  top: 1.65rem;
  left: 2.2rem;
  width: 2rem;
  height: 2rem;
  border: 0.55rem solid var(--lime);
  border-radius: 50%;
}

.story-art-key::after {
  top: 2.56rem;
  left: 4.35rem;
  width: 3.4rem;
  height: 0.55rem;
  border-radius: 1rem;
  background: var(--lime);
  box-shadow: 1.9rem 0 0 -0.11rem #171a18, 1.25rem 0.5rem 0 -0.12rem var(--lime);
  transform: rotate(-9deg);
}

.story-art-mail {
  background: linear-gradient(145deg, #f2d9d6, #c85c52);
}

.story-art-mail::before {
  inset: 1.45rem 2.4rem;
  border: 0.35rem solid #fff;
  border-radius: 0.35rem;
}

.story-art-mail::after {
  top: 1.7rem;
  left: 50%;
  width: 3.4rem;
  height: 3.4rem;
  border-left: 0.3rem solid #fff;
  border-bottom: 0.3rem solid #fff;
  transform: translateX(-50%) rotate(-45deg);
}

.story-art-school {
  background: linear-gradient(145deg, #cdebd5, #3b8b5c);
}

.story-art-school::before {
  left: 50%;
  bottom: 1.1rem;
  width: 4.6rem;
  height: 3.4rem;
  border-radius: 0.25rem 0.25rem 0 0;
  background: #fff;
  transform: translateX(-50%);
}

.story-art-school::after {
  left: 50%;
  bottom: 4.1rem;
  width: 5.7rem;
  height: 2.6rem;
  background: var(--lime);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.story-art-school i {
  z-index: 1;
  left: 50%;
  bottom: 1.1rem;
  width: 1.1rem;
  height: 2.1rem;
  background: #286b45;
  transform: translateX(-50%);
}

.web-results {
  margin-top: 2.5rem;
}

.web-result + .web-result {
  margin-top: 2.25rem;
}

.result-source {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #303632;
  font-size: 0.875rem;
  text-decoration: none;
}

.result-source small {
  display: block;
  margin-top: 0.14rem;
  color: #657067;
  font-size: 0.75rem;
}

.favicon {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.8rem;
}

.web-result h2 {
  margin: 0.55rem 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.28;
}

.web-result h2 a,
.answer-link {
  color: #1f4f91;
  text-decoration: none;
}

.web-result h2 a:hover,
.answer-link:hover {
  text-decoration: underline;
}

.web-result p {
  margin: 0;
  color: #4b534d;
  font-size: 0.9rem;
  line-height: 1.55;
}

.answer-card {
  margin-top: 0.1rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #15241a12;
}

.answer-kicker {
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-card h2 {
  margin: 0.6rem 0 0;
  font-size: 1.25rem;
}

.answer-card p {
  color: #4d5650;
  font-size: 0.9rem;
  line-height: 1.5;
}

.answer-card .answer-big {
  margin: 1rem 0 0.4rem;
  color: var(--ink);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.answer-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.answer-card dl {
  margin: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.answer-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

.answer-card dt {
  color: var(--muted);
}

.answer-card dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.results-footer {
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: #626b64;
  background: var(--soft);
  font-size: 0.8rem;
}

.results-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 68rem) {
  .results-layout {
    grid-template-columns: minmax(0, 42rem);
  }

  .answer-card {
    display: none;
  }

  .results-main {
    width: min(calc(100% - 2rem), 43rem);
  }
}

@media (max-width: 48rem) {
  .landing-nav .nav-group:first-child,
  .results-account {
    display: none;
  }

  .landing-nav {
    justify-content: flex-end;
  }

  .landing-footer,
  .results-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-footer > span {
    order: -1;
  }

  .results-header {
    align-items: center;
    gap: 0.8rem;
  }

  .wordmark-small {
    font-size: 1.65rem;
  }

  .results-search {
    min-height: 3.2rem;
  }

  .result-tabs {
    padding-left: 1rem;
  }

  .results-main {
    margin-left: 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    grid-template-rows: auto 1fr auto;
    column-gap: 0.8rem;
    padding-right: 0.75rem;
  }

  .story-art {
    grid-row: 1 / 4;
    height: 100%;
    min-height: 8rem;
  }

  .news-card strong,
  .news-card .source-row,
  .news-card .story-meta {
    margin-inline: 0;
  }

  .news-card .source-row {
    margin-top: 0.65rem;
  }
}

@media (max-width: 30rem) {
  .nav-group-right > a:not(.account-link) {
    display: none;
  }

  .landing-main {
    width: calc(100vw - 2rem);
  }

  .wordmark {
    font-size: 3.8rem;
  }

  .results-header {
    flex-wrap: wrap;
  }

  .wordmark-small {
    width: auto;
    font-size: 1.7rem;
  }

  .results-search {
    width: 100%;
  }

  .results-search input {
    font-size: 0.875rem;
  }

  .results-search .search-go {
    width: 2.5rem;
    height: 2.5rem;
  }

  .result-tabs {
    gap: 1.1rem;
  }

  .news-card {
    grid-template-columns: 5.75rem 1fr;
  }

  .story-art-key::before {
    left: 0.9rem;
  }

  .story-art-key::after {
    left: 3rem;
  }

  .story-art-mail::before {
    inset-inline: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
