/* Ro's account pages in the look of the Ro apps and rorobotai.com: the green
   LCD, monospace, ink pills, dotted shadows, Ro's own faces. */
:root {
  /* LCD values since 16 Nov 2026 (rorobotai.com, #665): every text tone 5:1 or more on the glass. */
  --glass: #a5b297;
  --glass-edge: #9eab90;
  --glass-hi: #afbba1;
  --ink: #1a2215;
  --ink-soft: #2c3626;
  --glow: #c3cdb5;
  --line: rgba(26, 34, 21, .42);
  --muted: rgba(26, 34, 21, .84);
  --tint: rgba(26, 34, 21, .11);
  --dots: radial-gradient(circle at 1px 1px, var(--ink) 1.1px, transparent 1.3px) 0 0/3px 3px;
  --rule: linear-gradient(to right, rgba(26, 34, 21, .55) 2px, transparent 2px) left bottom/4px 2px repeat-x;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  /* The pixel lattice, drawn under the text of ink fills: it shows on ink, the glass hides it. */
  --lcd: linear-gradient(to right, rgba(165, 178, 151, .18) .5px, transparent .5px) 0 0 / 2px 2px, linear-gradient(to bottom, rgba(165, 178, 151, .18) .5px, transparent .5px) 0 0 / 2px 2px;
  /* "only" keeps a browser's automatic dark mode from inverting the LCD. */
  color-scheme: only light;
}

* { box-sizing: border-box; }

html { background: var(--glass); }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(130% 95% at 50% 30%, var(--glass-hi) 0%, var(--glass) 48%, var(--glass-edge) 100%) fixed var(--glass);
  color: var(--ink);
  font: 500 15px/1.6 var(--mono);
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--ink); color: var(--glow); }

a { color: inherit; }

.wrap {
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  background: var(--rule);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 0 0 2px var(--ink);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-top: 10px;
  border-top: 6px solid var(--tint);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.steps li.done { border-top-color: var(--line); }
.steps li.now { border-top-color: var(--ink); color: var(--ink); }
.steps .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The card is a Ro window: an ink frame with a dotted shadow. */
.card {
  position: relative;
  isolation: isolate;
  padding: 26px 22px 22px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--glass-hi);
}

.card::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  z-index: -1;
  border-radius: inherit;
  background: var(--dots);
  -webkit-mask: linear-gradient(135deg, transparent 20%, #000 70%);
  mask: linear-gradient(135deg, transparent 20%, #000 70%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--glass-hi);
}

/* Ro's face for how it went: glad, worried, at work. */
.face {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--glass);
  box-shadow: 0 0 0 2px var(--ink);
}

.busy {
  display: flex;
  gap: 5px;
  margin: -6px 0 18px;
}

.busy i {
  width: 8px;
  height: 8px;
  background: var(--ink);
  animation: busy 1.2s steps(1, end) infinite;
}

.busy i:nth-child(2) { animation-delay: .2s; }
.busy i:nth-child(3) { animation-delay: .4s; }

@keyframes busy { 0%, 60% { opacity: 1; } 30% { opacity: .2; } }

h1 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}

p { margin: 0 0 16px; color: var(--ink-soft); }

.price { margin: 4px 0 18px; color: var(--ink); }
.price strong { font-size: 42px; font-weight: 800; letter-spacing: -.04em; }
.price span { color: var(--muted); }
.price.stack span { display: block; margin-top: 2px; }

.points {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding: 9px 0 9px 24px;
  background: var(--rule);
  overflow-wrap: anywhere;
}

.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 8px;
  height: 8px;
  background: var(--ink);
}

form { margin: 0; }

.primary, .secondary, .google {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 10px 0 0;
  padding: 0 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: none;
  font: 700 15px/1.2 var(--mono);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s steps(2);
}

.primary { --fill: var(--lcd), var(--ink); color: var(--glow); }
.secondary, .google { --fill: var(--glass); color: var(--ink); }

/* The fill sits over the dotted shadow, which only shows past the pill's edge. */
.primary::after, .secondary::after, .google::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--fill);
  pointer-events: none;
}

.primary::before, .secondary::before, .google::before {
  content: "";
  position: absolute;
  inset: 5px -5px -6px 5px;
  z-index: -1;
  border-radius: inherit;
  background: var(--dots);
  opacity: 0;
  transition: opacity .2s steps(3);
}

.primary:hover::before, .secondary:hover::before, .google:hover::before,
.primary:focus-visible::before, .secondary:focus-visible::before, .google:focus-visible::before { opacity: 1; }

.primary:active, .secondary:active, .google:active { transform: translate(2px, 2px); }

.google svg { flex: none; }

.note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.note a { color: var(--ink); }

.warn {
  padding: 10px 12px;
  border: 2px dashed var(--ink);
  border-radius: 10px;
  color: var(--ink);
}

footer {
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

footer form { margin-bottom: 8px; overflow-wrap: anywhere; }
footer p { margin: 0; color: var(--muted); }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link.center { display: block; margin: 14px auto 0; }

:focus-visible { outline: 2px dotted var(--ink); outline-offset: 4px; }

.code {
  margin: 4px 0 18px;
  padding: 14px;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  background: var(--glass);
  color: var(--ink);
  font: 800 28px/1.2 var(--mono);
  letter-spacing: .1em;
  text-align: center;
}

.field { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.field label { color: var(--muted); font-size: 13px; font-weight: 600; }
.field input {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--glass);
  color: var(--ink);
  font: 600 15px/1.2 var(--mono);
}
.field input:focus { outline: 2px dotted var(--ink); outline-offset: 3px; }
.field .secondary { margin-top: 0; }

/* Everything comes in like Ro's Settings: dot by dot, one piece after another
   (web/src/lib/dither.ts). */
.card, .card > *, .steps li {
  animation: dither-in 320ms steps(1, end) backwards;
  -webkit-mask-size: 32px 32px;
  mask-size: 32px 32px;
}
.steps li:nth-child(2) { animation-delay: 45ms; }
.steps li:nth-child(3) { animation-delay: 90ms; }
.steps li:nth-child(4) { animation-delay: 135ms; }
.card > :nth-child(1) { animation-delay: 90ms; }
.card > :nth-child(2) { animation-delay: 135ms; }
.card > :nth-child(3) { animation-delay: 180ms; }
.card > :nth-child(4) { animation-delay: 225ms; }
.card > :nth-child(5) { animation-delay: 270ms; }
.card > :nth-child(6) { animation-delay: 315ms; }
.card > :nth-child(n+7) { animation-delay: 360ms; }

/* A page that reloads itself every few seconds stays put. */
.still .card, .still .card > *, .still .steps li { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .card, .card > *, .steps li, .busy i { animation: none; }
}

@keyframes dither-in{0.00%{-webkit-mask-image:linear-gradient(transparent,transparent);mask-image:linear-gradient(transparent,transparent)}12.50%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAbSURBVAjXYwj/z/AfiO6DyOsQNgaqB5N/QWoAzfQeTxKqcrkAAAAASUVORK5CYII=);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAbSURBVAjXYwj/z/AfiO6DyOsQNgaqB5N/QWoAzfQeTxKqcrkAAAAASUVORK5CYII=)}25.00%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAzSURBVAjXYwivZ/i/n+H7fYb//xnCvzLs/89Q+p3h/XuGr7Ug8atXQeLxpSB26VWG9/8BWrYZXzwoGusAAAAASUVORK5CYII=);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAzSURBVAjXYwivZ/i/n+H7fYb//xnCvzLs/89Q+p3h/XuGr7Ug8atXQeLxpSB26VWG9/8BWrYZXzwoGusAAAAASUVORK5CYII=)}37.50%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA4SURBVAjXYwgPZ/i1miH0KsP7/Qzhogzr14HY794xlIYy/NvNcPUqw793DKKmDOv2M4SGMrzbDwDbsBQiNQrKlQAAAABJRU5ErkJggg==);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA4SURBVAjXYwgPZ/i1miH0KsP7/Qzhogzr14HY794xlIYy/NvNcPUqw793DKKmDOv2M4SGMrzbDwDbsBQiNQrKlQAAAABJRU5ErkJggg==)}50.00%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA2SURBVAjXFckxDQAgDEXBZ4EBR1QAwzdZkrKDow7VQLj1mOI4MuJCZwdmVDE7vtAgncZfiYwHZ9UPiiKv6ncAAAAASUVORK5CYII=);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA2SURBVAjXFckxDQAgDEXBZ4EBR1QAwzdZkrKDow7VQLj1mOI4MuJCZwdmVDE7vtAgncZfiYwHZ9UPiiKv6ncAAAAASUVORK5CYII=)}62.50%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA5SURBVAjXY2AQYVixgsGBkWFdFwMDIwOTFoMLC8O6VwyOggxdSgyBDgyvVjEIMDCsWsTgyMqwahUA7F8LBBc9/b4AAAAASUVORK5CYII=);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAA5SURBVAjXY2AQYVixgsGBkWFdFwMDIwOTFoMLC8O6VwyOggxdSgyBDgyvVjEIMDCsWsTgyMqwahUA7F8LBBc9/b4AAAAASUVORK5CYII=)}75.00%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAArSURBVAjXY2BgYFixgMEBSHYxgAATAwsLQ1MHA6MAmOvA0AAWV2oCkQoaAKMvBhbJqE75AAAAAElFTkSuQmCC);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAArSURBVAjXY2BgYFixgMEBSHYxgAATAwsLQ1MHA6MAmOvA0AAWV2oCkQoaAKMvBhbJqE75AAAAAElFTkSuQmCC)}87.50%{-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAhSURBVAjXY2BgYFBgAAGFLjDFBCY4GOCgAcxmAoszcAAAJyoBa2dOeAcAAAAASUVORK5CYII=);mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQAAAAA3iMLMAAAAAnRSTlMAAQGU/a4AAAAhSURBVAjXY2BgYFBgAAGFLjDFBCY4GOCgAcxmAoszcAAAJyoBa2dOeAcAAAAASUVORK5CYII=)}100%{-webkit-mask-image:none;mask-image:none}}
