/* The storefront's light theme (brands/flavorz/tokens.ts) and its @ui field, chip, checkbox and button styles,
   copied as plain values so this page stands alone. */
:root {
  --color-page: #fffbf5;
  --color-surface: #ffffff;
  --color-panel: #faf3e8;
  --color-text: #29231f;
  --color-text-muted: #6b5e63;
  --color-border: #f0e4d3;
  --color-control-border: #857261;
  --color-primary: #d1236b;
  --color-primary-hover: #700f38;
  --color-on-primary: #ffffff;
  --color-outline-hover: #fadce8;
  --color-focus-ring: #d1236b;
  --color-error: #c02f42;
  --color-error-surface: #fceff1;
  --color-success: #376b33;
  --color-success-surface: #e3f0dc;
  --color-attention: #8f5f00;
  --color-highlight-surface: #fcefcf;

  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'DM Serif Display', Georgia, serif;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-xl: 20px;
  --radius-full: 999px;
  --control-h: 48px;
  --shadow-card: 0 14px 30px -4px rgb(0 0 0 / 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(720px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 251 245 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.top-inner {
  width: min(720px, 100%);
  margin-inline: auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-inner img {
  height: 36px;
  width: auto;
}
#lang-slot {
  margin-left: auto;
}

/* ---------- progress ---------- */
.progress {
  padding: 24px 0 8px;
}
.progress ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.progress li {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.progress li::before {
  content: '';
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition: background-color 0.3s;
}
.progress li[data-state='done']::before,
.progress li[data-state='current']::before {
  background: var(--color-primary);
}
.progress li[data-state='current'] {
  color: var(--color-text);
}
.progress .dot {
  display: none;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}
@media (max-width: 599px) {
  .progress li .label {
    display: none;
  }
}

/* ---------- step ---------- */
.step {
  display: grid;
  gap: 24px;
  padding-bottom: 8px;
  animation: enter 0.45s var(--ease) both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.step-head {
  display: grid;
  gap: 8px;
  padding-top: 24px;
}
h1 {
  font: 400 clamp(32px, 6vw, 44px) / 1.1 var(--font-heading);
}
.intro {
  max-width: 56ch;
  color: var(--color-text-muted);
  font-size: 17px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.sheet {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.part {
  padding: 32px;
}
.part + .part {
  border-top: 1px solid var(--color-border);
}
.part > h2 {
  font: 400 24px/1.2 var(--font-heading);
  margin-bottom: 24px;
}
@media (max-width: 479px) {
  .part {
    padding: 24px 16px;
  }
}
.fields {
  display: grid;
  gap: 24px;
}

/* ---------- fields ---------- */
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
  scroll-margin-top: 96px;
}
.field > .hint,
.field > .counter {
  margin-top: -2px;
}
.label,
legend.label {
  font-size: 15px;
  font-weight: 500;
  padding: 0;
}
.req {
  color: var(--color-primary);
}
.optional {
  font-weight: 400;
  color: var(--color-text-muted);
}
/* A legend sits outside its fieldset's grid, so it needs its own gap to match a label's. */
legend.label {
  margin-bottom: 8px;
}
.hint,
.note,
.counter {
  font-size: 13px;
  color: var(--color-text-muted);
}
.note {
  padding: 12px 16px;
  background: var(--color-panel);
  border-radius: var(--radius-md);
}
.error {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-error);
  min-height: 0;
}
.error:empty {
  display: none;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  min-width: 0;
}

input:not([type='checkbox'], [type='radio'], [type='file']),
textarea,
select {
  width: 100%;
  min-height: var(--control-h);
  padding: 10px 16px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #a3958c;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(209 35 107 / 0.18);
}
.invalid input:not([type='checkbox'], [type='radio']),
.invalid textarea,
.invalid select {
  border-color: var(--color-error);
  background: var(--color-error-surface);
}

.affix {
  display: flex;
  align-items: stretch;
}
.prefix,
.suffix {
  display: flex;
  align-items: center;
  padding-inline: 14px;
  background: var(--color-panel);
  border: 1px solid var(--color-control-border);
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.prefix {
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.suffix {
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.affix input {
  min-width: 0;
}
.affix .prefix + input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.affix input:has(+ .suffix) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Choice chips (@ui choice-chips): pills that fill with the primary colour when picked. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
}
.chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.chip:active {
  transform: scale(0.97);
}
.chip:has(:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 500;
}
.chip:has(:focus-visible) {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
@media (hover: hover) {
  .chip:not(:has(:checked)):hover {
    background: var(--color-outline-hover);
  }
}
.chips-scale .chip {
  justify-content: center;
  min-width: 52px;
  font-weight: 600;
}
.invalid .chip:not(:has(:checked)) {
  border-color: var(--color-error);
}

/* Tick box (@ui checkbox) */
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  font-size: 15px;
  cursor: pointer;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
}
.check .box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--color-control-border);
  border-radius: 6px;
  background: var(--color-surface);
  display: grid;
  place-items: center;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.check input:checked + .box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.check input:checked + .box::after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.check input:focus-visible + .box {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
.invalid .check {
  background: var(--color-error-surface);
}
.invalid .check .box {
  border-color: var(--color-error);
}

/* File picker */
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72px;
  border: 1.5px dashed var(--color-control-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}
.drop:hover {
  background: var(--color-outline-hover);
}
.drop-icon {
  color: var(--color-primary);
  font-size: 20px;
}
.file-input:focus-visible + .thumbs,
.field:has(.file-input:focus-visible) .drop {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
.invalid .drop {
  border-color: var(--color-error);
  background: var(--color-error-surface);
}
.thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.thumbs:empty {
  display: none;
}
.thumb {
  position: relative;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.thumb img,
.thumb .doc {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-panel);
}
.thumb .doc {
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--color-primary);
}
.thumb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgb(41 35 31 / 0.75);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* Live totals */
.summary {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  font-weight: 500;
  font-size: 15px;
}
.summary[data-tone='pass'] {
  background: var(--color-success-surface);
  color: var(--color-success);
}
.summary[data-tone='hold'] {
  background: var(--color-highlight-surface);
  color: var(--color-attention);
}
.summary[data-tone='reject'] {
  background: var(--color-error-surface);
  color: var(--color-error);
}

/* Repeatable groups */
.group {
  display: grid;
  gap: 24px;
}
/* Items sit on the sheet like any other fields, one after another, with a divider between them. */
.group-items {
  display: grid;
  gap: 32px;
}
.group-item {
  animation: enter 0.35s var(--ease) both;
}
.group-item + .group-item {
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}
.group-title {
  font: 400 20px/1.2 var(--font-heading);
}
/* A part of an item ("Intake", "QC scorecard"): quieter than the item's own title. */
.subhead {
  font: 600 16px/1.4 var(--font-body);
  color: var(--color-text-muted);
}
.fields > .subhead:not(:first-child) {
  padding-top: 8px;
}

/* ---------- buttons (@ui button) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding-inline: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font: 600 16px/1.5 var(--font-body);
  cursor: pointer;
  transition:
    background-color 0.15s,
    transform 0.1s;
}
.btn:active {
  transform: scale(0.98);
}
.btn:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  min-width: 200px;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:disabled {
  cursor: progress;
  opacity: 0.85;
}
.btn-primary.loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-panel);
}
.btn-outline {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  justify-self: start;
}
.btn-outline:hover {
  background: var(--color-outline-hover);
}
.link-btn {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--color-primary);
  font: 500 14px var(--font-body);
  cursor: pointer;
}
.link-btn:hover {
  text-decoration: underline;
}

/* The actions stay at the bottom of the screen on a phone, so Continue is always one tap away. */
.actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-inline: -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--color-page) 75%, rgb(255 251 245 / 0));
}
@media (max-width: 479px) {
  .btn-primary {
    flex: 1;
    min-width: 0;
  }
}

.banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-error-surface);
  color: var(--color-error);
  font-weight: 500;
}

/* ---------- done ---------- */
.done {
  margin-top: 48px;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 48px 24px;
  animation: enter 0.5s var(--ease) both;
}
/* The tick: the circle draws itself, the tick follows, then one soft ring spreads out. */
.done-mark-wrap {
  position: relative;
  isolation: isolate;
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
}
.done-mark-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-success-surface);
  animation: ring 0.9s 1.1s var(--ease) both;
  z-index: -1;
}
.done-mark {
  width: 80px;
  height: 80px;
  fill: var(--color-success-surface);
}
.done-ring {
  stroke: var(--color-success);
  stroke-width: 3;
  stroke-dasharray: 227;
  stroke-dashoffset: 227;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: draw 0.6s 0.2s ease-out forwards;
}
.done-tick {
  fill: none;
  stroke: var(--color-success);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw 0.4s 0.75s ease-out forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ring {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .done-ring,
  .done-tick {
    stroke-dashoffset: 0;
  }
}

/* What happens next: three numbered steps, read top to bottom. */
.next {
  width: 100%;
  margin: 8px 0 12px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  text-align: left;
}
.next h2 {
  font: 400 20px/1.2 var(--font-heading);
  margin-bottom: 16px;
}
.next ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: next;
  display: grid;
  gap: 16px;
}
.next li {
  counter-increment: next;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 12px;
  font-size: 15px;
}
.next li::before {
  content: counter(next);
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 13px;
  font-weight: 600;
}
.next li span {
  color: var(--color-text-muted);
}
a.btn {
  text-decoration: none;
}
.done .btn-outline {
  justify-self: center;
}
/* The note under the done card is centred with it. */
.main:has(.done) > .foot {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
}
.lead {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.lead strong {
  color: var(--color-text);
  letter-spacing: 0.04em;
}

/* Number boxes without the browser's tiny arrows: people type the number. */
input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.foot {
  padding-block: 8px 32px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ======================================================================
   Split screen: a pink brand panel over the blurred dashboard photo with the stepper, and the form beside it.
   On a phone the panel becomes a banner at the top.
   ====================================================================== */
.rail-text,
.rail-help,
.rail-restart {
  display: none;
}
.done {
  width: min(560px, calc(100% - 32px));
  margin: 48px auto;
}

.rail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  margin: 0 -16px;
  padding: 24px 16px 20px;
}
.rail::before {
  content: '';
  position: absolute;
  inset: -24px;
  z-index: -2;
  background: url('backdrop.webp') center / cover;
  filter: blur(5px) saturate(1.1);
}
.rail::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgb(209 35 107 / 0.86), rgb(112 15 56 / 0.93));
}
.rail-title {
  font: 400 26px/1.15 var(--font-heading);
}
.rail .progress {
  padding-bottom: 0;
}
.rail .progress li {
  color: rgb(255 255 255 / 0.75);
}
.rail .progress li[data-state='current'] {
  color: #fff;
}
.rail .progress li::before {
  background: rgb(255 255 255 / 0.3);
}
.rail .progress li[data-state='done']::before,
.rail .progress li[data-state='current']::before {
  background: #fff;
}
.rail .progress-meta {
  color: rgb(255 255 255 / 0.85);
}

@media (min-width: 960px) {
  .top {
    display: none;
  }
  #app {
    width: 100%;
    padding: 0;
  }
  .shell {
    display: grid;
    grid-template-columns: minmax(360px, 36%) minmax(0, 1fr);
    min-height: 100vh;
  }
  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    margin: 0;
    padding: 48px 48px 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow-y: auto;
  }
  .rail-brand::before {
    content: '';
    display: block;
    width: 148px;
    height: 52px;
    margin-bottom: 40px;
    border-radius: 12px;
    background: var(--color-page) url('logo.svg') no-repeat center / 118px auto;
  }
  .rail-title {
    font-size: 38px;
  }
  .rail-text {
    display: block;
    opacity: 0.85;
  }

  /* The stepper runs down the panel: a numbered dot per step, a tick once it's sent. */
  .rail .progress ol {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .rail .progress li {
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    position: relative;
  }
  .rail .progress li::before {
    display: none;
  }
  .rail .progress .dot {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid rgb(255 255 255 / 0.5);
    transition:
      background-color 0.3s,
      color 0.3s;
  }
  .rail .progress li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 29px;
    top: 50px;
    width: 2px;
    height: 16px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.25;
  }
  .rail .progress li .label {
    display: block;
    font-weight: 600;
  }
  .rail .progress li[data-state='current'] {
    background: rgb(255 255 255 / 0.14);
  }
  .rail .progress li[data-state='current'] .dot {
    background: #fff;
    border-color: #fff;
    color: var(--color-primary);
  }
  .rail .progress li[data-state='done'] .dot {
    background: rgb(255 255 255 / 0.2);
    border-color: transparent;
  }
  .rail .progress-meta {
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
    padding-left: 12px;
  }
  .rail-help {
    display: block;
    margin-top: auto;
    font-size: 13px;
    opacity: 0.8;
  }
  .rail-restart {
    display: inline-block;
    align-self: flex-start;
    color: #fff;
    padding: 0;
    margin-top: auto;
  }

  .main {
    padding: 48px clamp(32px, 5vw, 80px) 0;
  }
  .main > .step,
  .main > .foot {
    max-width: 760px;
  }
  .main > .foot {
    text-align: left;
    padding-bottom: 48px;
  }
  .actions {
    margin-inline: 0;
    padding-inline: 0;
  }

  /* Two columns of short fields; long answers, choices and uploads take the full width. */
  .fields {
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  .fields > :not(.field),
  .field:is([data-type='textarea'], [data-type='chips'], [data-type='multi'], [data-type='scale'], [data-type='check'], [data-type='file']) {
    grid-column: 1 / -1;
  }
}

/* ======================================================================
   Language switch (EN | ಕನ್ನಡ), as in the website's header
   ====================================================================== */
.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
}
.lang button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
}
.lang button[aria-pressed='true'] {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.lang button:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
/* The panel's own switch shows on a wide screen only; a phone uses the one in the top bar. */
.rail > .lang {
  display: none;
}
@media (min-width: 960px) {
  .rail > .lang {
    display: inline-flex;
    position: absolute;
    top: 56px;
    right: 48px;
    border-color: rgb(255 255 255 / 0.6);
    background: rgb(255 255 255 / 0.12);
  }
  .rail > .lang button {
    color: #fff;
  }
  .rail > .lang button[aria-pressed='true'] {
    background: #fff;
    color: var(--color-primary);
  }
}

/* Kannada: DM Sans and DM Serif have no Kannada letters, so the device's own Kannada font draws them (as on the
   website). Headings become the body face in semibold, and lines get a little more room for the script's height. */
html[lang='kn'] body {
  line-height: 1.6;
}
html[lang='kn'] :is(h1, h2, h3, .rail-title, .group-title, .subhead) {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
}
html[lang='kn'] h1 {
  font-size: clamp(28px, 5vw, 36px);
}
html[lang='kn'] .part > h2 {
  font-size: 21px;
}
html[lang='kn'] .rail-title {
  font-size: 22px;
}
@media (min-width: 960px) {
  html[lang='kn'] .rail-title {
    font-size: 30px;
  }
}

/* "Start over" at the end of the page on a phone; on a wide screen it lives in the panel. */
.main-restart {
  display: block;
  margin: -16px auto 32px;
}
@media (min-width: 960px) {
  .main-restart {
    display: none;
  }
}

/* Continue always sits on the right, also on the first step, where there is no Back. */
.actions .btn-primary {
  margin-left: auto;
}

/* The panel always fits the window: only its spacing shrinks with the window's height, never its text, so both
   forms read the same at any size. --p is a stepper row's padding; the line between two dots runs from one dot's
   foot to the next dot's top. */
@media (min-width: 960px) {
  .rail {
    --p: clamp(4px, 1vh, 10px);
    --pad-top: clamp(24px, 5vh, 48px);
    padding: var(--pad-top) 48px clamp(20px, 3.5vh, 32px);
    gap: clamp(14px, 3.6vh, 40px);
    overflow: hidden;
  }
  .rail-brand::before {
    margin-bottom: clamp(14px, 3.6vh, 40px);
  }
  .rail .progress li {
    padding: var(--p) 12px;
  }
  .rail .progress li:not(:last-child)::after {
    top: calc(var(--p) + 38px);
    height: calc(var(--p) * 2);
  }
  .rail .progress-meta {
    margin-top: clamp(8px, 2vh, 20px);
  }
  .rail > .lang {
    top: calc(var(--pad-top) + 8px);
  }
}

/* One type scale for the panel: the headline, then a single size for everything else. */
.rail-title {
  font-size: 26px;
}
.rail-text,
.rail .progress-meta,
.rail-restart,
.rail .progress li .label {
  font-size: 15px;
}
.rail .lang button {
  font-size: 14px;
}
@media (min-width: 960px) {
  .rail-title {
    font-size: 34px;
  }
  .rail-text {
    margin-top: 10px;
  }
  html[lang='kn'] .rail-title {
    font-size: 26px;
  }
}
/* Very short windows (a small laptop with the browser's bars): tighter spacing, same text. */
@media (min-width: 960px) and (max-height: 660px) {
  .rail {
    --p: 2px;
    gap: 12px;
  }
  .rail-brand::before {
    height: 44px;
    margin-bottom: 12px;
  }
}

/* Cloudflare Turnstile on the last step, just above the buttons, on the left. */
.captcha {
  display: flex;
  justify-content: flex-start;
  min-height: 65px;
  margin-top: 20px;
}

