:root {
  --bg: #eef8fb;
  --panel: #ffffff;
  --panel-soft: #e2f1f5;
  --text: #102b3a;
  --muted: #5c727e;
  --line: #cde1e7;
  --accent: #0786a7;
  --accent-strong: #07576f;
  --accent-soft: rgba(7, 134, 167, .13);
  --danger: #a43f19;
  --safe: #166534;
  --shadow: 0 24px 70px rgba(31, 42, 68, .14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --tap: 56px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

.app-chrome[hidden] {
  display: none;
}

.info-closing {
  margin-top: 1.25rem;
  color: var(--accent-strong);
  font-weight: 900;
}

.hero-brand {
  margin: 0 0 1.35rem;
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.06em;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, var(--accent-soft), transparent 28%),
    radial-gradient(circle at 88% 86%, color-mix(in srgb, var(--accent-soft) 68%, transparent), transparent 25%),
    linear-gradient(145deg, var(--bg), var(--panel-soft));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

body[data-text-size="large"] {
  font-size: 18px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.upload-zone:focus-within,
.skip-link:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--panel);
  background: var(--accent-strong);
  text-decoration: none;
  font-weight: 800;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.app-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.topbar,
.compact-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.compact-nav {
  padding: 5px 2px;
}

.brand-back,
.text-toggle {
  border: 0;
  color: var(--text);
  background: transparent;
}

.brand-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  font-weight: 900;
  letter-spacing: -.035em;
}

.mini-mark {
  display: grid;
  width: 28px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 9px;
  background: var(--accent-soft);
}

.mini-mark i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.text-toggle {
  min-width: 46px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-weight: 900;
}

.brand {
  margin: 2px 0 0;
  font-size: clamp(2rem, 11vw, 3.6rem);
  letter-spacing: -.07em;
  line-height: .95;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.control-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.segmented-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 750;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
}

.segmented-field:nth-child(2) .segmented-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segment {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segment[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 25px var(--accent-soft);
}

.screen {
  display: none;
  animation: enter .22s ease-out;
}

.screen.active {
  display: block;
}

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

.hero-card,
.info-card,
.privacy-notice,
.preview-card,
.result-card,
.solved-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  justify-items: start;
  gap: 18px;
  padding: clamp(26px, 7vw, 44px);
}

#welcomeScreen {
  min-height: calc(100svh - 36px);
}

#welcomeScreen.active {
  display: grid;
  align-content: center;
}

.welcome-card {
  position: relative;
  overflow: hidden;
  justify-items: center;
  align-content: center;
  min-height: min(740px, calc(100svh - 36px));
  text-align: center;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 96%, white), color-mix(in srgb, var(--panel) 90%, var(--accent-soft)));
  box-shadow: 0 28px 90px color-mix(in srgb, var(--text) 13%, transparent);
}

.welcome-card::before,
.welcome-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.welcome-card::before {
  width: 260px;
  height: 260px;
  top: -150px;
  right: -110px;
  background: var(--accent-soft);
  filter: blur(3px);
}

.welcome-card::after {
  width: 190px;
  height: 190px;
  bottom: -125px;
  left: -80px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

.hero-card.compact {
  justify-items: center;
  text-align: center;
}

.phone-spark {
  width: 74px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 3px solid var(--accent);
  border-radius: 24px;
  background: var(--accent-soft);
  box-shadow: 0 0 34px var(--accent-soft);
}

.welcome-card .phone-spark {
  position: relative;
  width: 68px;
  height: 88px;
  margin-bottom: 2px;
  border-width: 2px;
  border-radius: 22px;
  box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--panel) 65%, transparent), 0 15px 35px var(--accent-soft);
}

.welcome-card .phone-spark::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 20px;
  height: 3px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
}

.welcome-brand {
  margin-bottom: 0;
  font-size: clamp(1.85rem, 7vw, 2.8rem);
  letter-spacing: -.055em;
}

.welcome-headline {
  max-width: 12ch !important;
  margin-top: clamp(1.2rem, 4vw, 2rem) !important;
  font-size: clamp(2.15rem, 9.5vw, 3.75rem) !important;
  line-height: .98 !important;
  letter-spacing: -.065em !important;
}

.welcome-subtitle {
  font-size: clamp(1rem, 3.8vw, 1.18rem) !important;
}

.welcome-actions {
  width: min(100%, 420px);
  margin-top: 8px;
}

.welcome-actions button {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.welcome-actions button:hover {
  transform: translateY(-2px);
}

.welcome-actions button:active {
  transform: translateY(0);
}

.phone-spark span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 35%, #fff 0 4px, transparent 5px),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 24%, white));
}

.hero-card h2,
.screen-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.25rem, 11vw, 4.3rem);
  line-height: .95;
  letter-spacing: -.075em;
}

.secondary-line,
.screen-heading p,
.hero-card p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.button-stack {
  display: grid;
  width: 100%;
  gap: 12px;
  margin-top: 6px;
}

.button-stack.horizontal {
  grid-template-columns: 1fr;
}

.primary-button,
.ghost-button {
  min-height: var(--tap);
  width: 100%;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 900;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 34px var(--accent-soft);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: .48;
  filter: grayscale(.25);
}

.analysis-message {
  margin: 12px 4px 0;
  color: var(--accent-strong);
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.ghost-button.small {
  width: auto;
  min-height: 44px;
  padding: 10px 14px;
}

.info-card {
  margin-top: 14px;
  padding: 22px;
}

.info-card h3,
.result-card h3,
.solved-panel h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.info-card ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

.screen-heading {
  margin: 8px 0 18px;
}

.screen-heading h2 {
  max-width: 14ch;
  margin-top: 8px;
  font-size: clamp(2rem, 9vw, 3.2rem);
}

.screen-heading p {
  margin-top: 12px;
}

.privacy-notice {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 18px;
  border-color: color-mix(in srgb, var(--danger) 34%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
}

.privacy-notice strong {
  color: var(--danger);
  line-height: 1.4;
}

.privacy-notice span {
  color: var(--muted);
  line-height: 1.5;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 245px;
  padding: 28px;
  text-align: center;
  border: 2px dashed color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: var(--radius-xl);
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 40%),
    color-mix(in srgb, var(--panel) 74%, transparent);
}

.upload-zone.dragging {
  border-style: solid;
  background: var(--accent-soft);
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 2rem;
  font-weight: 900;
}

.screenshot-glyph {
  position: relative;
  display: grid;
  width: 72px;
  height: 90px;
  margin-bottom: 18px;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 22px;
  background: var(--accent-soft);
  box-shadow: 0 18px 38px var(--accent-soft);
}

.screenshot-glyph::before,
.screenshot-glyph::after,
.screenshot-glyph i {
  content: "";
  position: absolute;
}

.screenshot-glyph::before {
  width: 30px;
  height: 3px;
  top: 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 52%, transparent);
}

.screenshot-glyph::after {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #66d6d1);
}

.screenshot-glyph i {
  width: 7px;
  height: 7px;
  right: 12px;
  bottom: 13px;
  border-radius: 50%;
  background: #ffc857;
}

.upload-zone,
.preview-card {
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.upload-zone:hover,
.preview-card:hover {
  border-color: var(--accent);
}

.upload-zone strong {
  font-size: 1.25rem;
}

.upload-zone small {
  margin-top: 8px;
  color: var(--muted);
}

.preview-card {
  display: block;
  margin: 16px 0;
  padding: 12px;
}

.preview-card img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 20px;
  background: #000;
}

.preview-card figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 750;
  text-align: center;
}

.intent-field {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.intent-field span {
  font-weight: 850;
}

.intent-field em {
  color: var(--muted);
  font-style: normal;
  font-weight: 650;
}

.intent-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  color: var(--text);
  background: var(--panel);
}

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

.result-card {
  position: relative;
  padding: 22px;
}

.result-card.highlight {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}

.result-card.safety {
  border-color: color-mix(in srgb, var(--safe) 42%, var(--line));
  background: color-mix(in srgb, var(--safe) 8%, var(--panel));
}

.result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.result-number {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-weight: 950;
}

.solved-panel {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 22px;
}

.checkmark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: #fff;
  background: var(--safe);
  font-size: 2.4rem;
  font-weight: 950;
}

@media (min-width: 620px) {
  .app-shell {
    padding: 28px;
  }

  .control-panel {
    grid-template-columns: 1.2fr .8fr;
    align-items: end;
  }

  .button-stack.horizontal {
    grid-template-columns: 1fr 1fr;
  }

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

  .result-card.safety {
    grid-column: 1 / -1;
  }

  .welcome-headline {
    max-width: 16ch !important;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 12px;
  }

  #welcomeScreen {
    min-height: calc(100svh - 24px);
  }

  .welcome-card {
    min-height: calc(100svh - 24px);
    padding: 30px 22px;
    border-radius: 34px;
  }
}

/* Juju polish — 2026-07-22 */
:root {
  --bg: #edf7f9;
  --panel: #ffffff;
  --panel-soft: #dff0f3;
  --text: #092b3b;
  --muted: #58717c;
  --line: #c9e0e5;
  --accent: #0a91aa;
  --accent-strong: #07546c;
  --accent-bright: #20b4ad;
  --accent-soft: rgba(10, 145, 170, .12);
  --gold: #f2b955;
  --shadow: 0 30px 78px rgba(9, 43, 59, .12);
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 7%, rgba(32, 180, 173, .15), transparent 27rem),
    radial-gradient(circle at 94% 92%, rgba(10, 145, 170, .12), transparent 25rem),
    linear-gradient(145deg, #f5fbfc 0%, var(--bg) 47%, #e1f1f4 100%);
  -webkit-font-smoothing: antialiased;
}

.app-shell,
.welcome-card,
.welcome-brand,
.welcome-headline,
.welcome-subtitle,
.welcome-actions {
  min-width: 0;
}

.welcome-card {
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  background: linear-gradient(150deg, rgba(255, 255, 255, .99), rgba(247, 252, 252, .96));
  box-shadow: 0 34px 85px rgba(9, 43, 59, .12), 0 2px 7px rgba(9, 43, 59, .04);
}

.welcome-card::before {
  z-index: -1;
  width: 310px;
  height: 310px;
  top: -188px;
  right: -112px;
  background: radial-gradient(circle at 35% 65%, rgba(32, 180, 173, .24), rgba(10, 145, 170, .06) 61%, transparent 63%);
  filter: none;
}

.welcome-card::after {
  z-index: -1;
  width: 210px;
  height: 210px;
  bottom: -148px;
  left: -98px;
  border-color: rgba(10, 145, 170, .2);
  box-shadow: 0 0 0 28px rgba(10, 145, 170, .025);
}

.welcome-card .phone-spark {
  justify-self: center;
  width: 72px;
  height: 92px;
  margin: 0 auto 10px;
  border-color: rgba(10, 145, 170, .82);
  border-radius: 25px;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(10,145,170,.09));
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.65), 0 18px 36px rgba(10,145,170,.17);
}

.welcome-card .phone-spark::after {
  width: 19px;
  height: 3px;
  top: 9px;
  background: rgba(10, 145, 170, .47);
}

.welcome-card .phone-spark span {
  position: relative;
  width: 33px;
  height: 33px;
  background: linear-gradient(135deg, var(--accent-bright), #c7eef0 54%, var(--accent-strong));
  box-shadow: 0 8px 22px rgba(7, 84, 108, .19);
}

.welcome-card .phone-spark span::after {
  position: absolute;
  right: -10px;
  bottom: -11px;
  width: 8px;
  height: 8px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 13px rgba(242, 185, 85, .58);
  content: "";
}

.welcome-brand {
  width: 100%;
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.7rem);
  font-weight: 850;
  letter-spacing: -.055em;
}

.welcome-headline {
  width: 100%;
  max-width: 13ch !important;
  margin: clamp(2rem, 5vw, 2.8rem) auto 0 !important;
  font-size: clamp(2.15rem, 9.4vw, 3.75rem) !important;
  font-weight: 850;
  line-height: .98 !important;
  letter-spacing: -.064em !important;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

.welcome-subtitle {
  width: 100%;
  margin-top: 1.2rem !important;
}

.welcome-actions {
  width: min(100%, 420px);
  margin: 2.1rem auto 0;
}

.primary-button,
.ghost-button {
  min-height: 64px;
  border-radius: 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.primary-button {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent) 58%, var(--accent-bright));
  box-shadow: 0 16px 30px rgba(7, 84, 108, .22), inset 0 1px 0 rgba(255,255,255,.22);
}

.ghost-button {
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 22px rgba(9, 43, 59, .045);
}

.upload-zone {
  min-height: 290px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(237,247,249,.9));
  box-shadow: 0 22px 48px rgba(9, 43, 59, .08);
}

.screenshot-glyph {
  width: 74px;
  height: 94px;
  border-radius: 24px;
  background: linear-gradient(160deg, white, var(--accent-soft));
  box-shadow: 0 18px 38px rgba(10,145,170,.16);
}

.screenshot-glyph::after {
  width: 27px;
  height: 27px;
  background: linear-gradient(135deg, var(--accent-bright), #bce8eb 60%, var(--accent-strong));
}

.screenshot-glyph i {
  width: 8px;
  height: 8px;
  border: 2px solid white;
  background: var(--gold);
}

.intent-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

@media (max-width: 520px) {
  .welcome-card {
    padding: 36px 20px;
    border-radius: 32px;
  }

  .welcome-card .phone-spark {
    width: 65px;
    height: 84px;
    border-radius: 22px;
  }

  .welcome-brand {
    font-size: clamp(1.65rem, 8vw, 2.1rem);
  }

  .welcome-headline {
    max-width: 12ch !important;
    margin-top: 2rem !important;
    font-size: clamp(2.05rem, 10.4vw, 2.75rem) !important;
    letter-spacing: -.057em !important;
  }

  .welcome-actions {
    margin-top: 1.8rem;
  }

  .primary-button,
  .ghost-button {
    border-radius: 18px;
  }
}
