@font-face {
  font-family: Lato Black;
  src: url('/images/heading.ttf') format('truetype');
  font-display: swap;
  font-weight: 900;
}

:root {
  --blue: #0508db;
  --ink: #100c24;
  --lime: #dbff3d;
  --lilac: #e6d5fa;
  --coral: #ff7869;
  --paper: #fbfaff;
  --heading: "Lato Black",Arial,sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
  font-family: Arial,Helvetica,sans-serif;
  color: var(--ink);
  background: var(--lilac);
}

button,input,select,textarea {
  font: inherit;
}

button,a,select,label:has(input[type=radio]) {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid #6f28c5;
  outline-offset: 4px;
}

.hero :focus-visible {
  outline-color: var(--lime);
}

.input-panel :focus-visible,.hero select:focus-visible {
  outline-color: #4228c5;
}

.sr,.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 9;
  background: white;
  padding: 12px;
  color: var(--ink);
}

.frame {
  width: min(100%,1680px);
  padding-inline: clamp(18px,3.1vw,58px);
  margin-inline: auto;
}

.hero {
  background: var(--blue);
  color: white;
  overflow: hidden;
}

.hero .frame {
  position: relative;
}

nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: clamp(12px,1.4vw,26px);
}

.brand {
  font: 900 clamp(23px,3.15vw,53px)/1 var(--heading);
  letter-spacing: -.045em;
  display: flex;
  align-items: center;
  gap: .32em;
  text-decoration: none;
}

.lens-mark {
  position: relative;
  width: .88em;
  height: .88em;
  border: .105em solid currentColor;
  border-radius: 50%;
  display: inline-block;
  margin-right: .15em;
}

.lens-mark::after {
  content: "";
  position: absolute;
  width: .43em;
  height: .105em;
  transform: rotate(47deg);
  background: currentColor;
  left: 78%;
  top: 88%;
  border-radius: 1em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px,4.5vw,75px);
  font: 900 clamp(14px,1.5vw,25px)/1 var(--heading);
}

.nav-links a {
  text-decoration: none;
}

.nav-links>a:not(.pill) {
  display: none;
}

.pill {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .48em;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: #100c11;
  font: 900 1rem/1.12 var(--heading);
  text-decoration: none;
  padding: .65em 1.15em;
  white-space: nowrap;
}

.pill:hover {
  background: #edff91;
}

.pill:disabled {
  opacity: .68;
  cursor: wait;
}

.hero-art {
  position: absolute;
  width: 61%;
  height: auto;
  right: -10%;
  top: 102px;
  pointer-events: none;
  opacity: .39;
}

.hero-main {
  position: relative;
  padding-top: 29px;
  padding-bottom: 23px;
  z-index: 1;
}

.kicker {
  display: inline-flex;
  margin: 0;
  text-transform: uppercase;
  background: var(--lime);
  border-radius: 999px;
  color: var(--ink);
  padding: .47em .95em;
  font: 900 clamp(10px,1.22vw,20px)/1.1 var(--heading);
  letter-spacing: .02em;
}

h1 {
  font: 900 clamp(50px,11.5vw,78px)/.84 var(--heading);
  letter-spacing: -.065em;
  margin: 20px 0 13px;
}

h1 span {
  position: relative;
  display: inline-block;
}

.rays {
  position: absolute;
  display: block;
  width: .55em;
  height: .57em;
  right: -.51em;
  top: -.12em;
}

.rays b {
  position: absolute;
  height: .064em;
  background: var(--lime);
  border-radius: 1em;
  transform-origin: left center;
  width: .3em;
  transform: rotate(-66deg);
  top: .15em;
}

.rays b:nth-child(2) {
  left: .12em;
  top: .23em;
  transform: rotate(-45deg);
}

.rays b:nth-child(3) {
  left: .18em;
  top: .35em;
  transform: rotate(-24deg);
}

.tagline {
  font: 900 clamp(18px,2.75vw,46px)/1.15 var(--heading);
  letter-spacing: -.026em;
  margin: 14px 0 23px;
}

.tagline span {
  position: relative;
}

.tagline span::after {
  content: "";
  position: absolute;
  bottom: -.22em;
  width: 78%;
  height: .17em;
  left: 6%;
  border-top: .115em solid var(--coral);
  border-radius: 50%;
  transform: rotate(-5deg);
}

#article-form {
  width: 100%;
}

.input-panel {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #e7e6fc;
  border-radius: 19px;
  padding: 9px 11px 12px;
  box-shadow: 0 5px 16px #05065333;
}

.mode {
  display: flex;
  gap: 3px;
  margin-bottom: 7px;
}

.mode button {
  min-height: 44px;
  padding: 0 1.05em;
  border-radius: 99px;
  background: transparent;
  border: 0;
  font: 900 clamp(15px,1.3vw,22px)/1 var(--heading);
}

.mode [aria-pressed=true] {
  background: var(--lime);
}

.entry {
  display: grid;
  gap: 9px;
}

input:not([type=radio]),textarea,select {
  color: var(--ink);
  background: #efeffd;
  border: 1px solid #aaa9d7;
  border-radius: 12px;
  padding: 11px 13px;
  min-height: 48px;
  width: 100%;
  min-width: 0;
}

input::placeholder,textarea::placeholder {
  color: #515777;
  opacity: 1;
}

textarea {
  resize: vertical;
}

.link-entry {
  position: relative;
}

.link-entry input {
  padding-left: 44px;
}

.chain {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%) rotate(-43deg);
  width: 22px;
  height: 17px;
  color: #606589;
  display: block;
  pointer-events: none;
}

.chain::before,.chain::after {
  content: "";
  position: absolute;
  border: 2px solid;
  width: 13px;
  height: 7px;
  border-radius: 9px;
  top: 3px;
}

.chain::before {
  left: -2px;
}

.chain::after {
  right: -2px;
}

.look {
  border-radius: 13px;
  padding: .6em 1em;
  font-size: clamp(19px,1.65vw,29px);
  min-height: 49px;
}

.look span,.visual-card button span {
  font-size: 1.27em;
}

.scope {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .86rem;
  font-weight: bold;
  margin-top: 7px;
}

.scope select {
  width: auto;
  max-width: 63%;
}

.preferences {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  margin-top: 13px;
}

.chips {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.chips label {
  position: relative;
}

.chips input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chips span,.reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0fa;
  border-radius: 99px;
  min-height: 44px;
  padding: .38em .78em;
  font: 900 clamp(13px,1.05vw,18px)/1 var(--heading);
  color: white;
  white-space: nowrap;
}

.chips input:checked+span {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}

.chips input:focus-visible+span {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.format {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 900 clamp(13px,1.1vw,17px)/1 var(--heading);
}

.format select {
  width: auto;
  max-width: 185px;
  min-height: 44px;
  color: var(--ink);
  border-radius: 99px;
  padding: 5px 20px 5px 9px;
  background: var(--lime);
  border: 1px solid var(--lime);
  text-overflow: ellipsis;
}

.reset {
  background: transparent;
}

.format-help,.article-status {
  max-width: 56ch;
  margin: .8em 0 0;
  font-size: .92rem;
  line-height: 1.45;
}

.article-status {
  background: #1c168a;
  border-radius: 10px;
  padding: .7em 1em;
}

#paste-fallback {
  margin-top: 8px;
}

.evidence {
  background: var(--lilac);
  padding: 25px 0;
}

.evidence-grid,.cards {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 13px;
}

.evidence-intro h2 {
  font: 900 clamp(34px,4vw,64px)/.94 var(--heading);
  letter-spacing: -.055em;
  margin: 12px 0 7px;
}

.lilac {
  background: #c48aef;
}

.swoosh {
  display: block;
  width: 46%;
  max-width: 180px;
  height: 18px;
  margin: 4px 0 1px 10%;
  border-top: 6px solid var(--coral);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.card,.result-card {
  position: relative;
  background: var(--paper);
  border: 1px solid #fff9;
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.card h3,.visual-card h3,.result-card h3 {
  font: 900 clamp(20px,1.59vw,28px)/1.08 var(--heading);
  letter-spacing: -.035em;
  margin: 0;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  font: 900 1.42rem/1 Arial;
  flex: none;
}

.lime,mark {
  background: var(--lime);
}

.coral {
  background: #ffb4ac;
}

.purple {
  background: #e4c5fb;
}

.card p,.preview-list {
  margin: .75em 0 0;
  font-size: clamp(15px,1.14vw,21px);
  line-height: 1.3;
}

mark {
  padding: 0 .12em;
  border-radius: 3px;
  font-weight: bold;
}

.preview-list {
  padding-left: 17px;
  font-size: clamp(14px,1.07vw,19px);
}

.preview-list li+li {
  margin-top: .35em;
}

.preview-list li::marker {
  color: #d94741;
}

.card-art {
  color: #7025b8;
  font-size: 35px;
  display: block;
  text-align: right;
  line-height: 1;
  margin-top: 7px;
}

.card-art.right {
  color: #558000;
}

.visual-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  min-height: 215px;
  border: 1px solid #fff;
  border-radius: 18px;
  background: linear-gradient(145deg,#e5a3ee,#f68cbc 52%,#6b56ce);
  overflow: hidden;
}

.visual-card img {
  width: calc(100% + 28px);
  margin: 0 -14px;
  display: block;
  height: auto;
  max-height: 190px;
  object-fit: cover;
}

.visual-card .pill {
  align-self: center;
  position: relative;
  margin-top: 1px;
  font-size: clamp(15px,1.2vw,20px);
}

footer {
  background: #f6efff;
  padding-top: 26px;
  line-height: 1.55;
}

.footer-row {
  display: grid;
  gap: 13px 40px;
}

footer h2 {
  font: 900 21px/1.2 var(--heading);
  margin: 0;
}

footer p {
  font-size: .91rem;
  margin: .5em 0 0;
  max-width: 55ch;
}

.footer-end {
  background: var(--blue);
  color: white;
  margin-top: 26px;
  padding-block: 26px;
}

.footer-end-row {
  display: grid;
  gap: 20px 40px;
}

.footer-contact {
  display: grid;
  justify-items: start;
  align-content: start;
}

.footer-contact a {
  color: var(--lime);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  text-underline-offset: .2em;
}

.footer-contact a:focus-visible {
  outline-color: var(--lime);
}

.results {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.result-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.result-card p,.result-card li {
  line-height: 1.42;
}

.result-card ul {
  padding-left: 18px;
}

.result-card li+li {
  margin-top: 10px;
}

.result-card blockquote {
  border-left: 3px solid #c48aef;
  margin: .4em 0 .65em;
  padding: .25em .6em;
}

.result-card small,.result-card .meta {
  color: #514767;
  font-size: .86rem;
}

.result-card .copy,.close {
  border: 1px solid #baabd3;
  background: white;
  border-radius: 30px;
  padding: .4em .75em;
  min-height: 44px;
}

.result-card .label {
  display: inline-block;
  font-size: .76rem;
  font-weight: bold;
  border-radius: 20px;
  padding: 4px 8px;
  background: #e9def8;
  margin-right: 5px;
}

.label.finding,.label.strength {
  background: #e4f9a6;
}

.label.possible,.label.demonstrated {
  background: #ffdbd1;
}

dialog {
  border: 0;
  border-radius: 22px;
  padding: 19px;
  color: var(--ink);
  background: var(--paper);
  width: min(calc(100% - 24px),550px);
  max-height: calc(100dvh - 26px);
}

dialog::backdrop {
  background: #140951aa;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-heading h2 {
  font: 900 27px/1 var(--heading);
  margin: 0;
}

.close {
  width: 44px;
  flex: none;
  font-size: 1.3rem;
  padding: 0;
}

dialog p {
  line-height: 1.45;
}

.stack {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  font-weight: bold;
}

.stack small {
  font-weight: normal;
}

#generated {
  margin: 12px 0 0;
}

#generated img {
  width: 100%;
  border-radius: 12px;
}

#generated figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .85rem;
}

@media(min-width:550px) {
  .nav-links>a:not(.pill) {
    display: block;
  }
  .entry {
    grid-template-columns: minmax(0,1fr) auto;
    align-items: start;
  }
  .input-panel {
    padding: 10px 14px 13px;
  }
  .hero-art {
    width: 58%;
    right: -10%;
    top: 64px;
    opacity: .75;
  }
  .cards {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .footer-row {
    grid-template-columns: 1fr 1fr;
  }
  .footer-end-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media(min-width:850px) {
  nav {
    padding-top: clamp(8px,.7vw,13px);
  }
  nav .pill {
    font-size: inherit;
  }
  .hero-art {
    width: 54%;
    right: 0;
    top: clamp(61px,4.2vw,75px);
    opacity: 1;
  }
  .hero-main {
    padding-top: clamp(24px,1.9vw,34px);
    padding-bottom: clamp(18px,1.55vw,28px);
  }
  h1 {
    font-size: clamp(76px,10.5vw,173px);
    line-height: .81;
    margin: clamp(12px,1vw,20px) 0 0;
  }
  .tagline {
    font-size: clamp(22px,2.85vw,48px);
    margin: clamp(12px,1vw,20px) 0 clamp(22px,1.75vw,34px);
  }
  #article-form {
    width: 72%;
  }
  .input-panel {
    border-radius: clamp(18px,1.55vw,26px);
    padding: clamp(9px,.8vw,15px) clamp(13px,1.45vw,24px) clamp(11px,1.2vw,21px);
  }
  .mode button {
    min-height: 35px;
  }
  .link-entry input,.look {
    min-height: clamp(48px,4.1vw,68px);
    font-size: clamp(15px,1.4vw,24px);
  }
  .look {
    font-size: clamp(20px,1.8vw,31px);
    padding-inline: 1.15em;
    border-radius: clamp(13px,1.25vw,22px);
  }
  .preferences {
    margin-top: clamp(12px,1vw,18px);
  }
  .chips {
    gap: 7px;
  }
  .chips span,.reset,.format select {
    min-height: 38px;
  }
  .format {
    border-left: 1px solid #d5d4ff;
    padding-left: 12px;
  }
  .format select {
    max-width: 220px;
  }
  .evidence {
    padding: clamp(25px,2.6vw,44px) 0;
  }
  .evidence .frame {
    padding-inline: clamp(20px,2.05vw,38px);
  }
  .evidence-grid {
    grid-template-columns: 1.1fr 3fr 1.12fr;
    align-items: start;
    gap: clamp(11px,1.05vw,18px);
  }
  .cards {
    gap: clamp(10px,1vw,16px);
  }
  .card,.visual-card {
    min-height: clamp(235px,17.4vw,300px);
    padding: clamp(11px,1.1vw,20px);
  }
  .visual-card img {
    width: calc(100% + clamp(22px,2.2vw,40px));
    margin-inline: calc(-1 * clamp(11px,1.1vw,20px));
  }
  .icon {
    width: clamp(29px,3.35vw,56px);
    height: clamp(29px,3.35vw,56px);
  }
  .results {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .results .summary,.results .sources {
    grid-column: 1/-1;
  }
}

@media(prefers-reduced-motion:no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
