/* The billing address that unfolds from under the shipping one: the delivery step of the checkout of Ostrey, an
   invented homeware shop, alone in the middle of a white page. The card is white with a hairline edge and a three
   layer shadow; a soft green light sits in its top corner. Copied fields are tinted until you change them. */
:root {
  --page: #ffffff;          /* the page */
  --card: #ffffff;          /* the card */
  --ink: #16181d;           /* the words */
  --muted: #7c818c;         /* the small words */
  --line: #e7e8ed;          /* the hairlines and the field edges */
  --field: #fafafb;         /* the inside of an empty field */
  --accent: #1f6b58;        /* the tick, the focus ring and the copied tint */
  --copied: #edf6f2;        /* the inside of a copied field */
  --button: #16181d;        /* the continue button */
  --button-ink: #ffffff;    /* the words on the button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: min(24px, 4vh) 12px;
  overflow: hidden;
}

/* ---- the card ---- */
.co {
  position: relative;
  width: min(92vw, 404px);
  padding: min(22px, 4.4vh) min(22px, 5vw) min(20px, 4vh);
  background: var(--card);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(22, 24, 29, 0.06),
    0 1px 2px rgba(22, 24, 29, 0.04),
    0 8px 20px -6px rgba(22, 24, 29, 0.08),
    0 28px 60px -24px rgba(22, 24, 29, 0.16);
  isolation: isolate;
}

.co__light {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.co__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.co__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.01em;
  font-size: 13px;
}

.co__brand svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.co__steps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.co__steps svg {
  width: 6px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

.co__step.is-done {
  color: var(--ink);
  opacity: 0.55;
}

.co__step.is-now {
  color: var(--ink);
  font-weight: 600;
}

.co__title {
  margin: min(16px, 3vh) 0 min(12px, 2.4vh);
  font-size: min(21px, 4.6vh);
  font-weight: 600;
  font-stretch: 94%;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

/* ---- the shipping address ---- */
.co__ship {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: min(11px, 2.2vh) 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfbfc, #f6f7f9);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 #fff;
}

.co__pin {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 2px 5px -2px rgba(22, 24, 29, 0.14);
}

.co__pin svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

.co__ship-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.co__ship-name {
  font-size: 14px;
  font-weight: 600;
}

.co__ship-addr {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co__ship [data-line] {
  border-radius: 4px;
  transition: background-color 0.4s;
}

.co__ship [data-line].is-lit {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transition-duration: 0.08s;
}

.co__same {
  position: absolute;
  top: -9px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}

.co__same svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

/* ---- the tick ---- */
.co__check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: min(10px, 2vh) -8px 0;
  padding: 8px;
  border-radius: 10px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s;
}

.co__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.co__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #c9ccd4;
}

.co__box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.co__input:focus-visible + .co__box {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .co__check:hover {
    background: #f5f6f8;
  }
}

/* ---- the billing form ---- */
.co__bill {
  height: 0;
  overflow: hidden;
  margin: 0 -6px;
  padding: 0 6px;
}

.co__bill-in {
  position: relative;
  padding: min(10px, 2vh) 0 4px;
}

.co__rule {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  transform-origin: 0 50%;
}

.co__label {
  margin: 0 0 min(8px, 1.6vh);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.co__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: min(8px, 1.6vh) 8px;
}

.f {
  position: relative;
  display: block;
  height: min(46px, 9vh);
  padding: min(6px, 1.2vh) 10px 0;
  border-radius: 11px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: text;
  transition: box-shadow 0.25s, background-color 0.35s;
}

.f--wide {
  grid-column: 1 / -1;
}

.f__label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.f__label em {
  font-style: normal;
  opacity: 0.7;
}

.f__input {
  display: block;
  width: 100%;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: min(14px, 2.9vh);
  font-weight: 500;
  color: var(--ink);
  caret-color: var(--accent);
}

.f__chip {
  position: absolute;
  top: min(6px, 1.2vh);
  right: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.f.is-copied {
  background: var(--copied);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.f.is-copied .f__chip {
  opacity: 1;
  transform: none;
}

.f:focus-within {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.f.is-copied:focus-within {
  background: #fff;
}

/* ---- the continue button ---- */
.co__go {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: min(46px, 9vh);
  margin-top: min(14px, 2.6vh);
  border: 0;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-stretch: 104%;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 14px -6px rgba(22, 24, 29, 0.5);
  transition: transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.co__go svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.co__go-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  transform: translateX(-110%);
}

.co__go:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .co__go:hover svg {
    transform: translateX(3px);
  }
}

/* ---- the copies that fly and the drawn pointer ---- */
.ghost {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  white-space: nowrap;
  pointer-events: none;
  color: var(--accent);
  font-weight: 500;
  transform-origin: 0 0;
  padding: 3px 6px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(31, 107, 88, 0.18), 0 6px 14px -6px rgba(22, 24, 29, 0.28);
}

.cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  width: 22px;
  height: 22px;
  fill: #16181d;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.22));
  pointer-events: none;
  opacity: 0;
}
