:root {
  --ink: #17202f;
  --muted: #5d6676;
  --paper: #ffffff;
  --line: #d9dee8;
  --canvas: #f6f7f3;
  --navy: #1e3147;
  --green: #2f7d6d;
  --red: #c94f4f;
  --blue: #5367c9;
  --amber: #b36a1f;
  --shadow: 0 20px 55px rgba(30, 49, 71, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f2f5f4 0, #fbfbf8 26rem, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(30, 49, 71, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 49, 71, 0.045) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(180deg, black, transparent 58%);
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  color: #ffffff;
  background: var(--navy);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(30, 49, 71, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 0.45rem;
  color: var(--paper);
  background: linear-gradient(135deg, var(--navy), var(--green));
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand strong {
  color: var(--navy);
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-nav a {
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  color: #314054;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--navy);
  background: #e9f2ef;
  outline: none;
}

main {
  width: min(1480px, calc(100% - clamp(2rem, 5vw, 5rem)));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  gap: clamp(1rem, 2.4vw, 1.75rem);
  align-items: stretch;
  padding: clamp(1.2rem, 4vw, 3rem) 0 1rem;
}

.hero-copy,
.disclosure-panel,
.control-strip,
.viewer-section,
.feedback-section {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.35rem, 3vw, 2.6rem);
  border-top: 0.5rem solid var(--green);
}

.eyebrow,
.mini-label {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
strong,
span,
label,
dd,
dt {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.35rem, 5vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 58rem;
  margin: 1.4rem 0 0;
  color: #334257;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.primary-action,
.secondary-action,
.viewer-link,
.submit-button {
  display: inline-flex;
  min-height: 2.7rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 0.35rem;
  font-weight: 900;
  text-decoration: none;
}

.primary-action,
.viewer-link,
.submit-button {
  border: 1px solid var(--navy);
  color: #ffffff;
  background: var(--navy);
}

.secondary-action {
  border: 1px solid var(--line);
  color: var(--navy);
  background: #ffffff;
}

.primary-action:hover,
.primary-action:focus-visible,
.viewer-link:hover,
.viewer-link:focus-visible,
.submit-button:hover,
.submit-button:focus-visible {
  background: #111d2b;
  outline: none;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  background: #eef6f3;
  outline: none;
}

.disclosure-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-top: 0.5rem solid var(--amber);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 236, 0.96));
}

.ai-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid rgba(179, 106, 31, 0.42);
  border-radius: 0.3rem;
  color: #724414;
  background: #fff3d9;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.disclosure-panel h2,
.viewer-copy h2,
.feedback-copy h2 {
  margin: 0.9rem 0 0;
  color: var(--navy);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.disclosure-panel p,
.viewer-copy p,
.feedback-copy p {
  color: #3b4657;
  line-height: 1.65;
}

.control-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1rem;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-button {
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: #314054;
  background: #ffffff;
  font-weight: 850;
}

.filter-button.active,
.filter-button:hover,
.filter-button:focus-visible {
  border-color: var(--navy);
  color: #ffffff;
  background: var(--navy);
  outline: none;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.stat-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  min-height: 2.35rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
}

.stat-row strong {
  color: var(--navy);
  font-size: 1.15rem;
}

.experiment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 1rem;
}

.experiment-card {
  display: grid;
  min-height: 29rem;
  border: 1px solid var(--line);
  border-top: 0.45rem solid var(--accent);
  border-radius: 0.5rem;
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(30, 49, 71, 0.09);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.experiment-card:hover,
.experiment-card:focus-within,
.experiment-card.selected {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--line));
  box-shadow: 0 20px 45px rgba(30, 49, 71, 0.16);
  transform: translateY(-0.16rem);
}

.tile-button {
  display: grid;
  grid-template-rows: auto 8rem auto 1fr;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #657084;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tile-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, #ffffff);
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 18% 30%, color-mix(in srgb, var(--accent) 38%, white), transparent 18%),
    radial-gradient(circle at 78% 65%, color-mix(in srgb, var(--accent) 28%, white), transparent 18%),
    linear-gradient(135deg, var(--wash), #ffffff);
}

.tile-visual::before,
.tile-visual::after {
  position: absolute;
  content: "";
  background: color-mix(in srgb, var(--accent) 50%, white);
}

.tile-visual::before {
  width: 70%;
  height: 2px;
  left: 15%;
  top: 50%;
  transform: rotate(-14deg);
}

.tile-visual::after {
  width: 2px;
  height: 72%;
  left: 51%;
  top: 14%;
  transform: rotate(22deg);
}

.tile-visual span {
  position: absolute;
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(30, 49, 71, 0.16);
}

.tile-visual span:nth-child(1) { left: 14%; top: 25%; }
.tile-visual span:nth-child(2) { left: 40%; top: 56%; }
.tile-visual span:nth-child(3) { left: 72%; top: 30%; }
.tile-visual span:nth-child(4) { left: 68%; top: 68%; }
.tile-visual span:nth-child(5) { left: 25%; top: 72%; }

.tile-visual.constellation::before {
  transform: rotate(22deg);
}

.tile-visual.lattice::after {
  left: 36%;
  transform: rotate(-18deg);
}

.tile-visual.marker::before {
  width: 82%;
  left: 9%;
  top: 34%;
  transform: rotate(0);
}

.tile-visual.marker::after {
  width: 82%;
  height: 2px;
  left: 9%;
  top: 64%;
  transform: rotate(0);
}

.tile-button strong {
  color: var(--navy);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.1;
}

.card-copy {
  color: #4a5567;
  font-size: 0.96rem;
  line-height: 1.55;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}

.card-actions a,
.card-actions button {
  display: inline-flex;
  min-height: 2.45rem;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.7rem;
  border-radius: 0.35rem;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.card-actions a {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.card-actions button {
  border: 1px solid var(--line);
  color: var(--navy);
  background: #ffffff;
}

.card-actions a:hover,
.card-actions a:focus-visible {
  filter: brightness(0.88);
  outline: none;
}

.card-actions button:hover,
.card-actions button:focus-visible {
  border-color: var(--navy);
  background: #edf4f2;
  outline: none;
}

.viewer-section {
  display: grid;
  grid-template-columns: minmax(18rem, 0.62fr) minmax(0, 1.38fr);
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1rem;
}

.viewer-copy {
  align-self: center;
  padding: clamp(0.5rem, 2vw, 1rem);
}

.viewer-copy p {
  margin-bottom: 0;
}

.detail-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0;
}

.detail-list div {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fbfcfd;
}

.detail-list dt {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0.35rem 0 0;
  color: #364257;
  line-height: 1.5;
}

.viewer-frame {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cbd3df;
  border-radius: 0.5rem;
  background: #ffffff;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.6rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #f4f6f8;
}

.browser-bar span {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d75f58;
}

.browser-bar span:nth-child(2) {
  background: #d9a82f;
}

.browser-bar span:nth-child(3) {
  background: #49a85d;
}

.browser-bar p {
  min-width: 0;
  margin: 0 0 0 0.35rem;
  overflow: hidden;
  color: #526075;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

iframe {
  display: block;
  width: 100%;
  height: min(72vh, 46rem);
  min-height: 34rem;
  border: 0;
  background: #ffffff;
}

.feedback-section {
  display: grid;
  grid-template-columns: minmax(16rem, 0.6fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 clamp(2rem, 6vw, 4rem);
  padding: 1rem;
}

.feedback-copy {
  padding: clamp(0.5rem, 2vw, 1rem);
}

.feedback-form {
  display: grid;
  gap: 0.9rem;
  padding: clamp(0.5rem, 2vw, 1rem);
}

.feedback-form label,
.feedback-form fieldset {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  color: #344157;
  font-weight: 850;
}

.feedback-form fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}

.feedback-form legend {
  padding: 0 0.35rem;
  color: var(--navy);
  font-weight: 900;
}

.feedback-form fieldset label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.1rem;
  font-size: 0.93rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd3df;
  border-radius: 0.35rem;
  color: var(--ink);
  background: #ffffff;
}

input,
select {
  min-height: 2.65rem;
  padding: 0.58rem 0.7rem;
}

textarea {
  resize: vertical;
  min-height: 9rem;
  padding: 0.7rem;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 125, 109, 0.16);
  outline: none;
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  accent-color: var(--green);
}

.submit-button {
  width: fit-content;
  border: 0;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: #4d596b;
  background: #ffffff;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1180px) {
  .experiment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experiment-card {
    min-height: 25rem;
  }
}

@media (max-width: 900px) {
  .hero,
  .viewer-section,
  .feedback-section {
    grid-template-columns: 1fr;
  }

  .control-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .stat-row {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .top-nav a {
    padding: 0.42rem 0.55rem;
    font-size: 0.84rem;
  }

  .brand-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  main {
    width: min(100% - 1rem, 1480px);
  }

  .hero {
    gap: 0.75rem;
    padding-top: 0.55rem;
  }

  .hero-copy,
  .disclosure-panel {
    padding: 1rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 1;
  }

  .lede {
    margin-top: 0.9rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 1rem;
  }

  .disclosure-panel h2 {
    margin-top: 0.7rem;
    font-size: 1.2rem;
  }

  .disclosure-panel p {
    font-size: 0.94rem;
    line-height: 1.48;
  }

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

  .experiment-card {
    min-height: 0;
  }

  .tile-button {
    grid-template-rows: auto 7rem auto auto;
  }

  .card-actions {
    flex-direction: column;
  }

  .card-actions a,
  .card-actions button {
    width: 100%;
  }

  iframe {
    height: 30rem;
    min-height: 30rem;
  }

  .feedback-form fieldset {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
