:root {
  color-scheme: light;
  --ink: #16251f;
  --muted: #65736d;
  --paper: #f1efe7;
  --panel: #faf9f4;
  --line: #c9cec7;
  --green: #076b42;
  --acid: #c8f45b;
  --danger: #a13a28;
  --shadow: 0 24px 80px rgba(17, 42, 31, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(200, 244, 91, 0.34), transparent 22rem),
    linear-gradient(115deg, transparent 0 68%, rgba(7, 107, 66, 0.06) 68% 68.15%, transparent 68.15%);
  font-family: "DM Mono", monospace;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  z-index: 20;
}

.shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 38px;
}

.masthead,
footer,
.viewport-bar,
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.mark-dot,
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(200, 244, 91, 0.2);
}

.environment {
  color: var(--muted);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 42px;
  align-items: end;
  padding: clamp(56px, 8vw, 116px) 0 48px;
}

.eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 -22px;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(52px, 7vw, 106px);
  font-weight: 500;
  line-height: 0.89;
  letter-spacing: -0.052em;
}

.lede {
  max-width: 440px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.url-form {
  padding: 24px;
  color: #f8fbf5;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.url-form label {
  display: block;
  margin-bottom: 13px;
  color: #b8c4be;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #52615a;
  border-radius: 0;
  outline: 0;
  color: #f8fbf5;
  background: #22332c;
  font-size: 12px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

input::placeholder {
  color: #839089;
}

input:focus {
  border-color: var(--acid);
  background: #273a32;
}

button {
  border: 0;
  cursor: pointer;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 42px;
  min-width: 210px;
  padding: 0 20px;
  color: var(--ink);
  background: var(--acid);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  transition: transform 150ms ease, background-color 150ms ease;
}

.primary:hover {
  transform: translateY(-2px);
  background: #d7ff73;
}

.primary:active {
  transform: translateY(0);
}

.form-meta {
  min-height: 26px;
  padding-top: 12px;
  color: #89978f;
  font-size: 10px;
}

.form-meta p {
  margin-bottom: 0;
}

.error {
  color: #ffad92;
  text-align: right;
}

.viewport {
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: rise 600ms 140ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.viewport-bar {
  min-height: 78px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.viewport-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.viewport-title-group h2 {
  margin-bottom: 3px;
  font-family: "Newsreader", serif;
  font-size: 21px;
  font-weight: 600;
}

.viewport-title-group p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
}

.status-dot {
  background: #aab3ae;
  box-shadow: none;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.status-dot.active {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(7, 107, 66, 0.12);
}

.actions {
  display: flex;
  gap: 22px;
}

.text-button {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  color: var(--green);
  background: transparent;
  font-size: 10px;
  text-transform: uppercase;
}

.text-button:hover:not(:disabled) {
  border-bottom-color: currentColor;
}

.text-button:disabled {
  color: #a9b0ac;
  cursor: not-allowed;
}

.frame-wrap {
  position: relative;
  min-height: min(720px, 72vh);
  overflow: hidden;
  background:
    linear-gradient(rgba(22, 37, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 37, 31, 0.035) 1px, transparent 1px),
    #f6f4ed;
  background-size: 28px 28px;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px;
}

.empty-index {
  align-self: flex-start;
  margin-top: calc(50% - 40px);
  color: var(--green);
  font-size: 10px;
}

.empty-state h3 {
  max-width: 620px;
  margin-bottom: 12px;
  font-family: "Newsreader", serif;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.empty-state p {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

iframe {
  display: none;
  width: 100%;
  min-height: min(720px, 72vh);
  border: 0;
  background: white;
}

.frame-wrap.loaded iframe {
  display: block;
}

.frame-wrap.loaded .empty-state {
  display: none;
}

footer {
  align-items: flex-start;
  gap: 20px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-transform: uppercase;
}

footer p:last-child {
  text-align: right;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@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;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1480px);
    padding-top: 18px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 52px 0 34px;
  }

  .eyebrow {
    margin-bottom: -6px;
  }

  h1 {
    font-size: clamp(46px, 15vw, 76px);
  }

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

  .primary {
    min-height: 52px;
  }

  .form-meta,
  .viewport-bar,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .error {
    text-align: left;
  }

  .viewport-bar {
    gap: 12px;
  }

  .frame-wrap,
  iframe {
    min-height: 68vh;
  }

  .empty-state {
    align-items: flex-start;
    gap: 14px;
    padding: 54px 28px;
  }

  .empty-index {
    margin-top: 8px;
  }

  footer p:last-child {
    text-align: left;
  }
}
