:root {
  color-scheme: light;
  --page: #f4f5f7;
  --surface: #ffffff;
  --line: #dfe3e8;
  --line-strong: #cfd5de;
  --text: #090d19;
  --muted: #5f6878;
  --soft: #8b94a3;
  --yellow: #ffc800;
  --yellow-dark: #f0b900;
  --navy: #091936;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92), rgba(244, 245, 247, 0.76) 44%, rgba(235, 238, 242, 0.92) 100%),
    var(--page);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.browser-frame {
  width: min(1388px, calc(100vw - 60px));
  height: min(1024px, calc(100svh - 48px));
  display: grid;
  grid-template-rows: 64px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.14);
}

.browser-bar {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(260px, 590px) 190px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fbfbfc, #f7f8fa);
}

.traffic-lights {
  position: absolute;
  left: 24px;
  top: 50%;
  display: flex;
  gap: 12px;
  transform: translateY(-50%);
}

.light {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.red {
  background: #ff5f57;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #28c840;
}

.browser-controls {
  position: absolute;
  left: 130px;
  display: flex;
  align-items: center;
  gap: 30px;
  color: #9ca3af;
}

.chevron {
  width: 14px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.chevron.left {
  transform: rotate(-45deg);
}

.chevron.right {
  transform: rotate(135deg);
}

.refresh {
  width: 17px;
  height: 17px;
  border: 2px solid #8d96a3;
  border-right-color: transparent;
  border-radius: 50%;
}

.address-pill {
  grid-column: 2;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d9dde4;
  border-radius: 12px;
  background: #ffffff;
  color: #6f7784;
  font-size: 17px;
  letter-spacing: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lock-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transform: translateX(-50%);
}

.browser-actions {
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 34px;
  color: #777f8b;
}

.plus-icon,
.tabs-icon {
  position: relative;
  width: 22px;
  height: 22px;
}

.plus-icon::before,
.plus-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 22px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.plus-icon::after {
  width: 2px;
  height: 22px;
}

.tabs-icon::before,
.tabs-icon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.tabs-icon::before {
  left: 0;
  top: 4px;
}

.tabs-icon::after {
  left: 6px;
  top: 0;
  background: #f7f8fa;
}

.unauth-screen {
  min-height: 0;
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr) 148px;
  background: #fff;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #060913;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(9, 25, 54, 0.18);
}

.help-button {
  width: 32px;
  height: 32px;
  border: 2px solid #697386;
  border-radius: 50%;
  background: #fff;
  color: #4b5565;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 24px 16px;
  text-align: center;
}

.hero-graphic {
  width: min(500px, 54vw);
  height: auto;
  aspect-ratio: 1120 / 760;
  object-fit: contain;
  margin: 0;
  user-select: none;
}

.hero-panel h1 {
  max-width: 470px;
  margin: 0 auto;
  color: #080d1c;
  font-size: clamp(34px, 3.4vw, 42px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: 0;
}

.hero-panel h1 span {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero-panel h1 span::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: 2px;
  height: 8px;
  border-radius: 999px;
  background: var(--yellow);
  z-index: -1;
}

.hero-panel p {
  max-width: 485px;
  margin: 18px auto 0;
  color: #5e6878;
  font-size: 20px;
  line-height: 1.44;
  letter-spacing: 0;
}

.login-cta {
  min-width: min(420px, calc(100vw - 58px));
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd41a, #ffc400);
  color: #080d1c;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 18px 36px rgba(255, 196, 0, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-cta:hover {
  background: linear-gradient(180deg, #ffdb34, var(--yellow-dark));
  box-shadow: 0 20px 40px rgba(255, 196, 0, 0.32);
  transform: translateY(-1px);
}

.external-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.privacy-note {
  margin-top: 18px !important;
  color: #7a8290 !important;
  font-size: 18px !important;
  line-height: 1.48 !important;
}

.small-lock {
  width: 24px;
  height: 24px;
  margin-right: 6px;
  object-fit: contain;
  transform: translateY(6px);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 38px;
  border-top: 1px solid var(--line);
  padding: 0 150px;
}

.feature {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.feature img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.feature h2 {
  margin: 0;
  color: #0b0f1a;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}

.feature p {
  margin: 14px 0 0;
  color: #5f6878;
  font-size: 17px;
  line-height: 1.43;
  letter-spacing: 0;
}

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

.authenticated-screen[hidden] {
  display: none;
}

.authenticated-screen {
  padding: 32px;
}

.controls,
.result {
  min-width: 0;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field,
.fallback {
  display: grid;
  gap: 8px;
}

label,
summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.actions button,
.fallback button,
.copy {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #24211d;
  color: #fff;
}

.result {
  display: grid;
  gap: 14px;
}

.resultHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

#promptOutput {
  min-height: 520px;
  resize: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  background: #fff;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  body {
    display: block;
    background: #fff;
  }

  .browser-frame {
    width: 100%;
    height: auto;
    min-height: 100svh;
    grid-template-rows: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .browser-bar {
    display: none;
  }

  .unauth-screen {
    min-height: 100svh;
    grid-template-rows: 72px minmax(0, auto) auto;
  }

  .app-header {
    padding: 0 20px;
  }

  .brand {
    gap: 12px;
    font-size: 21px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .hero-panel {
    justify-content: start;
    padding: 20px 20px 32px;
  }

  .hero-graphic {
    width: min(100%, 430px);
    height: auto;
    margin-top: 4px;
  }

  .hero-panel h1 {
    max-width: 350px;
    font-size: 36px;
  }

  .hero-panel p {
    max-width: 360px;
    margin-top: 18px;
    font-size: 18px;
  }

  .login-cta {
    width: min(100%, 420px);
    min-width: 0;
    min-height: 58px;
    margin-top: 24px;
    font-size: 20px;
  }

  .privacy-note {
    font-size: 16px !important;
  }

  .feature-strip {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 26px 24px 32px;
  }

  .feature {
    width: min(100%, 420px);
    grid-template-columns: 62px minmax(0, 1fr);
    justify-self: center;
    gap: 18px;
  }

  .feature img {
    width: 62px;
    height: 62px;
  }
}

@media (min-width: 981px) and (max-height: 800px) {
  .browser-frame {
    height: calc(100svh - 2px);
  }

  .browser-bar {
    min-height: 54px;
  }

  .unauth-screen {
    grid-template-rows: 68px minmax(0, 1fr) 122px;
  }

  .app-header {
    padding-inline: 38px;
  }

  .hero-panel {
    padding: 0 24px 12px;
  }

  .hero-graphic {
    width: min(330px, 40vw);
    height: auto;
  }

  .hero-panel h1 {
    font-size: 34px;
  }

  .hero-panel p {
    max-width: 520px;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.35;
  }

  .login-cta {
    min-height: 54px;
    margin-top: 18px;
    font-size: 19px;
  }

  .privacy-note {
    display: none;
  }

  .feature-strip {
    padding-inline: 120px;
  }

  .feature {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
  }

  .feature img {
    width: 62px;
    height: 62px;
  }

  .feature p {
    margin-top: 8px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .app-header {
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .help-button {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .hero-panel {
    padding-inline: 16px;
  }

  .hero-graphic {
    width: min(100%, 390px);
    height: auto;
  }

  .hero-panel h1 {
    font-size: 32px;
  }

  .hero-panel h1 span::after {
    bottom: 1px;
    height: 7px;
  }

  .hero-panel p {
    font-size: 17px;
  }

  .login-cta {
    min-height: 56px;
    gap: 16px;
    font-size: 18px;
  }

  .feature-strip {
    padding-inline: 18px;
  }

  .feature h2 {
    font-size: 17px;
  }

  .feature p {
    margin-top: 8px;
    font-size: 16px;
  }
}
