/* Xocana web. Every colour comes from tokens.css, which carries the day and night palettes. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--font-md);
  line-height: 1.5;
}

a {
  color: var(--accent);
  font-weight: 600;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 10;
}

.icon {
  width: 3rem;
  height: 3rem;
  fill: currentColor;
}

/* Top bar: a strip of crayon colours under the brand. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--chrome);
  border-bottom: 6px solid transparent;
  border-image: linear-gradient(90deg, var(--crayon-red), var(--crayon-orange), var(--crayon-yellow), var(--crayon-green), var(--crayon-blue), var(--crayon-purple), var(--crayon-pink)) 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--accent);
}

.brand-name {
  font-size: var(--font-xl);
  font-weight: 700;
}

.nav-group {
  display: flex;
  gap: var(--space-4);
}

.nav a {
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-button);
}

.nav a:hover {
  background: var(--accent-soft);
}

.view {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-5);
  outline: none;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-xl);
}

h1 {
  font-size: var(--font-2xl);
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: var(--font-lg);
  margin: 0 0 var(--space-2);
}

.muted,
.hint {
  color: var(--text-secondary);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--font-sm);
}

/* Hero: violet sky with a sun and a pink scribble, as on the phone. */
.hero-sky,
.kid-sky {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sheet);
  background: var(--hero-deep);
  color: var(--on-hero);
  padding: var(--space-7) var(--space-5);
  text-align: center;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.9;
}

.blob-sun {
  width: 180px;
  height: 180px;
  right: -50px;
  top: -60px;
  background: var(--hero-mist);
}

.blob-pink {
  width: 120px;
  height: 120px;
  left: -40px;
  bottom: -50px;
  background: var(--hero-mid);
}

.blob-teal {
  width: 70px;
  height: 70px;
  left: 18%;
  top: 18%;
  background: var(--crayon-teal);
  opacity: 0.6;
}

.hero-mark,
.hero-title,
.hero-lead,
.hero-actions,
.kid-hello,
.kid-prompt {
  position: relative;
}

.hero-title,
.kid-hello {
  font-size: var(--font-3xl);
  color: var(--on-hero);
}

.hero-lead {
  max-width: 34rem;
  margin: 0 auto var(--space-5);
}

.kid-prompt {
  font-size: var(--font-xl);
  margin: 0;
}

.hero-actions,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.promises {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.promise {
  border-radius: var(--radius-kid);
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
}

.crayon-red {
  background: var(--crayon-red);
  color: var(--on-crayon);
}

.crayon-blue {
  background: var(--crayon-blue);
  color: var(--on-crayon);
}

.crayon-green {
  background: var(--crayon-green);
  color: var(--on-crayon);
}

.crayon-yellow {
  background: var(--crayon-yellow);
  color: var(--on-crayon);
}

.crayon-teal {
  background: var(--crayon-teal);
  color: var(--on-crayon);
}

/* Buttons. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-standard);
  padding: var(--space-2) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--elevation-rest);
}

.button:hover {
  background: var(--accent-strong);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button.sun {
  background: var(--secondary);
  color: var(--on-secondary);
}

.button.on-hero {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  box-shadow: none;
}

.plan-card .button.on-hero {
  color: var(--on-hero);
}

.button.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

.button.danger {
  background: var(--danger);
  color: var(--surface);
}

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* Apple's and Google's published buttons: their colours, their marks, the system typeface. */
.vendor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: 48px;
  border-radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.vendor-apple {
  background: #000000;
  color: #FFFFFF;
  border: 0;
}

.vendor-google {
  background: #FFFFFF;
  color: #1F1F1F;
  border: 1px solid #747775;
}

/* Cards and forms. */
.card {
  background: var(--surface);
  border-radius: var(--radius-panel);
  padding: var(--space-5);
  box-shadow: var(--elevation-raised);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card.narrow {
  max-width: 440px;
  margin: var(--space-5) auto;
}

.center {
  align-items: center;
  text-align: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.federated {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-weight: 600;
}

input,
select {
  min-height: var(--touch-standard);
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--hairline);
  border-radius: var(--radius-input);
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

.check {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.check input {
  min-height: auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.note {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-input);
  background: var(--accent-soft);
  color: var(--text);
  border-left: 6px solid var(--accent);
}

.note[data-kind="error"] {
  border-left-color: var(--danger);
}

.note[data-kind="success"] {
  border-left-color: var(--success);
}

.answer {
  white-space: pre-line;
}

/* Kid mode: big, bright tiles. */
.kid {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.tiles {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 180px;
  padding: var(--space-5);
  border: 0;
  border-radius: var(--radius-kid);
  font: inherit;
  font-size: var(--font-lg);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--elevation-raised);
  transition: transform 120ms ease;
}

.tile:hover {
  transform: translateY(-3px) rotate(-1deg);
}

.tile-static {
  cursor: default;
}

.tile-static:hover {
  transform: none;
}

.picture {
  margin: 0;
  text-align: center;
}

.picture img {
  max-width: 100%;
  max-height: 420px;
  border-radius: var(--radius-kid);
  border: 8px solid var(--crayon-yellow);
}

/* Grown-ups area. */
.grownups .section {
  margin: var(--space-5) 0 var(--space-2);
  color: var(--accent);
  font-size: var(--font-sm);
  letter-spacing: 0.08em;
}

.plan-card {
  background: var(--hero-deep);
  color: var(--on-hero);
}

.plan-name {
  margin: 0;
  font-size: var(--font-2xl);
  font-weight: 700;
}

.plan-detail {
  margin: 0;
}

.delete-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* The parental gate. */
.gate {
  border: 0;
  border-radius: var(--radius-sheet);
  padding: var(--space-6);
  max-width: 420px;
  width: calc(100% - 2 * var(--space-4));
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: var(--elevation-float);
}

.gate::backdrop {
  background: var(--chrome-veil);
}

.gate-question {
  font-size: var(--font-2xl);
  font-weight: 700;
  margin: var(--space-3) 0;
}

.gate-progress {
  color: var(--text-secondary);
  margin: 0;
}

.gate-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.gate-choice {
  min-height: var(--touch-kid);
  border: 0;
  border-radius: var(--radius-kid);
  background: var(--secondary);
  color: var(--on-secondary);
  font: inherit;
  font-size: var(--font-xl);
  font-weight: 700;
  cursor: pointer;
}

.gate-choice:nth-child(2) {
  background: var(--crayon-blue);
  color: var(--on-crayon);
}

.gate-choice:nth-child(3) {
  background: var(--crayon-pink);
  color: var(--on-crayon);
}

.gate-choice:nth-child(4) {
  background: var(--crayon-green);
  color: var(--on-crayon);
}

/* About and footer. */
.about {
  max-width: 960px;
  margin: var(--space-6) auto 0;
  padding: 0 var(--space-5);
  color: var(--text-secondary);
}

.about h1 {
  font-size: var(--font-lg);
  color: var(--text);
}

.about-slogan {
  font-weight: 700;
  color: var(--accent);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  padding: var(--space-5);
  margin-top: var(--space-5);
  background: var(--chrome);
  border-top: 1px solid var(--hairline);
}

.footer-copy {
  color: var(--text-secondary);
}

/* Legal pages. */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-5);
}

.legal h2 {
  margin-top: var(--space-6);
  color: var(--accent);
}

@media (max-width: 560px) {
  .topbar {
    padding: var(--space-2) var(--space-3);
  }

  .view {
    padding: var(--space-3);
  }

  .hero-title,
  .kid-hello {
    font-size: var(--font-2xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile {
    transition: none;
  }

  .tile:hover {
    transform: none;
  }
}
