/* Colours, gradients and type from the LifeIQ style guide. */

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/eb-garamond-latin-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/eb-garamond-latin-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;

  --simplicity: #6180c0;
  --clear: #9ddbf0;
  --optimism: #ffdc42;
  --possibility: #fea141;
  --encouraging: #f582a4;
  --quiet-confidence: #b1bfe2;

  --gradient-sky: linear-gradient(90deg, var(--simplicity), var(--clear));
  --gradient-sun: linear-gradient(90deg, var(--optimism), var(--possibility));
  --gradient-bloom: linear-gradient(90deg, var(--encouraging), var(--quiet-confidence));

  /* The palette's colours are too light for text on white, so text uses these. */
  --ink: #1c1c1c;
  --ink-soft: #5b5759;
  /* Text on a palette fill (yellow buttons, gradients). It stays near-black in both themes. */
  --on-fill: #1c1c1c;
  --paper: #ffffff;
  /* Cards and posts. The same as the page in light, a step lighter in dark. */
  --surface: #ffffff;
  --alert-tint: #fde6ee;
  /* A pale Quiet Confidence for progress tracks and quiet surfaces. */
  --track: #eef1f9;
  /* Decorative borders, and the accent for links, inputs, hover borders and the progress ring. */
  --line: var(--quiet-confidence);
  --accent-line: var(--simplicity);
  /* The ring around a finished pillar's circle. */
  --ring-done: var(--quiet-confidence);
  --frost: rgb(255 255 255 / 0.82);
  --glow: rgb(97 128 192 / 0.6);

  --font-headline: "Filson Soft", Nunito, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "EB Garamond", Garamond, Georgia, serif;

  --radius: 10px;

  /* A gentle overshoot, so things settle into place instead of stopping dead. */
  --ease-spring: linear(0, 0.3 6%, 0.75 14%, 1.03 24%, 1.08 30%, 1.04 40%, 0.99 55%, 1);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/*
  Dark theme: a pre-dawn sky, deep indigo taken from Simplicity's hue, with text in a warm
  off-white. The palette and gradients stay exactly as the guide has them; on this background
  they're bright enough to use as text and lines too. Every pairing clears WCAG AA: body text
  15.9:1, soft text 9.5:1, accent lines 7.4:1.

  It follows the device unless someone picks Light or Dark on the Account page, which puts
  data-theme on <html>. The two blocks below hold the same values; change them together.
*/
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --ink: #f4f1ec;
    --ink-soft: #b8bccf;
    --paper: #131626;
    --surface: #1b1f33;
    --alert-tint: #46202f;
    --track: #262b45;
    --line: #3a4166;
    --accent-line: #8ea6de;
    --ring-done: #4a5277;
    --frost: rgb(19 22 38 / 0.8);
    --glow: rgb(0 0 0 / 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --ink: #f4f1ec;
  --ink-soft: #b8bccf;
  --paper: #131626;
  --surface: #1b1f33;
  --alert-tint: #46202f;
  --track: #262b45;
  --line: #3a4166;
  --accent-line: #8ea6de;
  --ring-done: #4a5277;
  --frost: rgb(19 22 38 / 0.8);
  --glow: rgb(0 0 0 / 0.55);
}

/* The logo in Simplicity on light backgrounds, and in the brighter dark-theme blue on dark ones. */
.logo-on-dark {
  display: none;
}

:root[data-theme="dark"] .logo-on-light {
  display: none;
}

:root[data-theme="dark"] .logo-on-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-light {
    display: none;
  }

  :root:not([data-theme="light"]) .logo-on-dark {
    display: inline;
  }
}

/* Keyboard focus never lands behind the sticky top bar or the phone tab bar (WCAG 2.2, 2.4.11). */
html {
  scroll-padding-top: 88px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 19px/1.5 var(--font-body);
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
}

a,
button.link {
  color: var(--ink);
  text-decoration: underline 2px var(--accent-line);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--quiet-confidence), var(--encouraging)) 1;
}

.brand {
  display: block;
  line-height: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  white-space: nowrap;
}

/* The signed-in name doesn't fit beside the logo and links on a phone. */
@media (max-width: 480px) {
  .site-header nav .muted {
    display: none;
  }
}

.hero {
  display: grid;
  place-items: center;
  padding: clamp(40px, 9vw, 88px) 16px;
  background: var(--gradient-sky);
}

.hero img {
  width: min(400px, 85%);
  height: auto;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
}

.muted {
  color: var(--ink-soft);
}

/* The guide's hand-drawn yellow marker. */
.highlight {
  padding: 0 0.22em;
  background: var(--optimism);
  color: var(--on-fill);
  border-radius: 0.5em 0.25em 0.6em 0.3em / 0.35em 0.6em 0.3em 0.55em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.error {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--alert-tint);
}

.stack {
  display: grid;
  gap: 16px;
  max-width: 380px;
}

label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}

input {
  min-height: 46px;
  padding: 8px 12px;
  border: 1.5px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-weight: 400;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--gradient-sun);
  color: var(--on-fill);
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-quiet {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--accent-line);
}

button.link {
  min-height: 0;
  padding: 0;
  background: none;
  font: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--optimism);
  color: var(--on-fill);
}

.skip-link:focus {
  top: 12px;
}

/*
  Learner pages, laid out like the social apps learners already know. Phones get a slim top bar
  and a tab bar along the bottom. From 768px the tabs become an icon rail down the left, and from
  1264px a full sidebar with labels.
*/

.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--quiet-confidence), var(--encouraging)) 1;
}

.app-bar-end {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  white-space: nowrap;
}

/* On phones the sidebar is the tab bar along the bottom. */
.sidebar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1.5px solid var(--line);
}

.sidebar-brand,
.sidebar-end {
  display: none;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs a {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 2px 0;
  color: var(--ink-soft);
  font-family: var(--font-headline);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.tabs svg,
.side-link svg {
  box-sizing: content-box;
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs svg {
  padding: 4px 18px;
  border-radius: 999px;
}

.tabs a:hover svg {
  background: var(--track);
}

.tabs a[aria-current="page"] {
  color: var(--ink);
}

.tabs a[aria-current="page"] svg {
  background: var(--optimism);
  color: var(--on-fill);
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.learner .app-main {
  max-width: 975px;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .learner {
    padding-left: 76px;
  }

  .app-bar {
    display: none;
  }

  /* Logo at the top, tabs centred on the screen's height, Admin and Log out at the bottom. */
  .sidebar {
    top: 0;
    right: auto;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    width: 76px;
    padding: 24px 12px;
    border-top: 0;
    /* A line in brand colours that fades out towards the top and bottom of the screen. */
    border-right: 2px solid;
    border-image: linear-gradient(
        180deg,
        transparent,
        var(--quiet-confidence) 25%,
        var(--encouraging) 75%,
        transparent
      )
      1;
  }

  .sidebar-brand {
    display: grid;
    align-self: start;
    place-items: center;
    min-height: 52px;
    line-height: 0;
  }

  .logo-full {
    display: none;
  }

  .sidebar-end {
    display: grid;
    align-self: end;
    gap: 4px;
  }

  .tabs {
    grid-template-columns: none;
    gap: 4px;
  }

  .tabs a {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--ink);
    font-size: 1rem;
  }

  .tabs svg,
  .tabs a:hover svg,
  .tabs a[aria-current="page"] svg {
    padding: 0;
    background: none;
  }

  .tabs a:hover,
  .side-link:hover {
    background: var(--track);
  }

  .tabs a[aria-current="page"] {
    background: var(--optimism);
    color: var(--on-fill);
  }

  /* On the rail the labels are hidden, but they still name the links for screen readers. */
  .tabs span,
  .side-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .learner .app-main {
    padding: 32px 24px 64px;
  }
}

@media (min-width: 1264px) {
  .learner {
    padding-left: 244px;
  }

  .sidebar {
    width: 244px;
    padding: 28px 12px;
  }

  .sidebar-brand {
    place-items: center start;
    padding: 0 14px;
  }

  .logo-full {
    display: block;
  }

  .logo-mark {
    display: none;
  }

  .tabs span,
  .side-link span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }
}

.app-main h1 {
  margin-bottom: 24px;
}

.app-main h2 {
  font-size: 1.4rem;
}

.app-main h3 {
  font-size: 1.15rem;
}

.app-main > section + section {
  margin-top: 40px;
}

/* SemiBold Garamond, the guide's subtitle style. */
.eyebrow {
  margin: 0;
  font-weight: 600;
  font-style: italic;
}

/* Ink on Encouraging to Quiet Confidence stays above 6:1 the whole way across. */
.continue {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--gradient-bloom);
  color: var(--on-fill);
}

.continue h2 {
  margin: 4px 0 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.continue p {
  margin: 0;
}

.continue .button {
  justify-self: start;
  margin-top: 16px;
}

.accent-sky {
  --accent: var(--gradient-sky);
}

.accent-sun {
  --accent: var(--gradient-sun);
}

.accent-bloom {
  --accent: var(--gradient-bloom);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The title link stretches over the whole card, so the card is one big target. */
.card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  padding: 0 20px 18px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.card:hover {
  border-color: var(--accent-line);
}

.card:has(a:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.card-band {
  height: 12px;
  margin: 0 -20px 16px;
  background: var(--accent);
}

.card h3 {
  margin: 0 0 4px;
}

.card h3 a {
  text-decoration: none;
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card h3 a:focus-visible {
  outline: none;
}

.card p {
  margin: 0;
}

.card-meta {
  font-size: 0.9em;
  color: var(--ink-soft);
}

progress {
  width: 100%;
  height: 10px;
  margin: 16px 0 6px;
  border: 0;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: var(--track);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent, var(--simplicity));
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent, var(--simplicity));
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--line);
  border-radius: 20px;
  text-align: center;
}

.empty h2,
.empty h3 {
  margin: 0;
}

.empty p {
  max-width: 46ch;
  margin: 0;
}

.empty .button {
  margin-top: 8px;
}

.details {
  display: grid;
  gap: 16px;
  max-width: 480px;
  margin: 24px 0 32px;
}

.details dt {
  font-weight: 600;
}

.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* The phone bars cover the top and bottom of the page, so keyboard focus scrolls clear of both. */
@media (max-width: 767.98px) {
  :root:has(.learner) {
    scroll-padding-bottom: 96px;
  }
}

@media (min-width: 768px) {
  :root:has(.learner) {
    scroll-padding-top: 24px;
  }
}

/* Frosted bars: content scrolling underneath stays faintly visible, and text on them keeps its contrast. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .app-bar {
    background: var(--frost);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    backdrop-filter: blur(16px) saturate(1.6);
  }

  @media (max-width: 767.98px) {
    .sidebar {
      background: var(--frost);
      -webkit-backdrop-filter: blur(16px) saturate(1.6);
      backdrop-filter: blur(16px) saturate(1.6);
    }
  }
}

/*
  The home page: a feed, with a column on the right on wide screens. Below that width the feed's
  parts and the progress tile share one column, with progress just under the pillar circles.
*/
/* A feed reads best as one column of about 630px, as in the apps it borrows from. */
.learner .app-main:has(> .home) {
  max-width: 678px;
}

.home {
  display: grid;
  gap: 24px;
}

.feed {
  display: contents;
}

.greeting {
  order: 1;
}

.app-main .greeting {
  margin: 0;
}

.stories {
  order: 2;
}

.side {
  order: 3;
}

.continue {
  order: 4;
}

.pillar-feed {
  order: 5;
}

.side .me {
  display: none;
}

@media (max-width: 1263.98px) {
  .side:not(:has(.tile)) {
    display: none;
  }
}

@media (min-width: 1264px) {
  .learner .app-main:has(> .home) {
    max-width: 1060px;
  }

  .home {
    grid-template-columns: minmax(0, 630px) 300px;
    justify-content: center;
    align-items: start;
    gap: 64px;
  }

  .feed {
    display: grid;
    gap: 24px;
  }

  .side {
    position: sticky;
    top: 32px;
    display: grid;
    gap: 24px;
  }

  .side .me {
    display: flex;
  }
}

.me {
  align-items: center;
  gap: 12px;
}

.me div > * {
  display: block;
}

.me .muted {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--optimism);
  color: var(--on-fill);
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
}

/* A bright ring means there's something left to do; a finished pillar's ring goes quiet. */
.avatar-ring,
.story-ring {
  padding: 3px;
  background: var(--accent);
}

.is-finished .avatar-ring,
.is-finished .story-ring {
  background: var(--ring-done);
}

.avatar-ring {
  width: 42px;
  height: 42px;
  padding: 2px;
}

.avatar-ring > span,
.story-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px solid var(--ring-gap, var(--paper));
  border-radius: 50%;
  background: var(--track);
  color: var(--ink);
  font-family: var(--font-headline);
  font-weight: 700;
}

.avatar-ring > span {
  font-size: 0.95rem;
}

.stories {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 4px 2px 8px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.stories li {
  flex: none;
  scroll-snap-align: start;
}

.story {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 80px;
  color: var(--ink);
  text-decoration: none;
}

.story-ring {
  display: block;
  width: 74px;
  height: 74px;
  border-radius: 50%;
}

.story-face {
  border-width: 3px;
  font-size: 1.6rem;
}

.story-label {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--font-headline);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posts {
  display: grid;
  gap: 24px;
}

/* Like the cards, the title link stretches over the whole post. */
.post {
  --ring-gap: var(--surface);

  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.post:hover {
  border-color: var(--accent-line);
  box-shadow: 0 14px 28px -18px var(--glow);
}

.post:has(a:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.app-main .post-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.post-head h3 a {
  text-decoration: none;
}

.post-head h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-head h3 a:focus-visible {
  outline: none;
}

.post .badge {
  position: static;
  margin-left: auto;
}

/* Large bold text, so ink clears 3:1 even on the darkest end of the Sky gradient. */
.post-visual {
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: 28px 24px;
  background: var(--accent);
  color: var(--on-fill);
}

.post-visual p {
  max-width: 22ch;
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
}

.post-foot {
  padding: 0 16px 16px;
}

.tile {
  padding: 24px;
  border-radius: 20px;
  background: var(--track);
}

.progress-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 4px 20px;
}

.progress-tile h2 {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.progress-tile p {
  margin: 0;
}

.ring {
  position: relative;
  width: 96px;
  height: 96px;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 3.5;
}

.ring-track {
  stroke: var(--paper);
}

/* Simplicity clears the 3:1 that a meaningful graphic needs against white. */
.ring-value {
  stroke: var(--accent-line);
  stroke-linecap: round;
}

.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
}

.card:hover {
  box-shadow: 0 14px 28px -18px var(--glow);
}

.card.is-finished h3 {
  padding-right: 76px;
}

.badge {
  position: absolute;
  top: 26px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: var(--optimism);
  color: var(--on-fill);
  font-family: var(--font-headline);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/*
  Motion, for people who haven't asked their device to reduce it. Pages cross-fade into each
  other and the highlighted tab slides to its new place, with no JavaScript. Browsers without
  cross-document view transitions just load the page as before.
*/
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-group(*) {
    animation-duration: 0.28s;
    animation-timing-function: var(--ease-out);
  }

  .tabs a[aria-current="page"] {
    view-transition-name: current-tab;
  }

  button:not(.link),
  .button {
    transition: transform 0.25s var(--ease-spring), filter 0.2s;
  }

  button:not(.link):hover,
  .button:hover {
    filter: brightness(1.04) saturate(1.1);
  }

  button:not(.link):active,
  .button:active {
    transform: scale(0.96);
  }

  .card {
    transition:
      transform 0.4s var(--ease-spring),
      box-shadow 0.3s var(--ease-out),
      border-color 0.2s;
  }

  .post {
    transition:
      box-shadow 0.3s var(--ease-out),
      border-color 0.2s;
  }

  .card:hover {
    transform: translateY(-3px);
  }

  .tabs a,
  .tabs svg,
  .side-link {
    transition: background-color 0.2s var(--ease-out);
  }

  .ring-value {
    animation: ring-fill 1.1s var(--ease-out) 0.15s both;
  }

  progress::-webkit-progress-value {
    transition: inline-size 0.6s var(--ease-out);
  }
}

@keyframes ring-fill {
  from {
    stroke-dasharray: 0 100;
  }
}

/* The theme choice on the Account page: a pill of three options, the chosen one in yellow. */
.theme-picker fieldset {
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.theme-picker legend {
  margin-bottom: 4px;
  padding: 0;
  font-weight: 600;
}

.theme-picker .hint {
  margin: 0 0 12px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 26px;
  background: var(--track);
}

.segmented label {
  position: relative;
  display: block;
  font-weight: 400;
}

/* The radio itself is invisible but still focusable and clickable through its label. */
.segmented input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 700;
}

.segmented label:hover span {
  background: var(--surface);
}

.segmented input:checked + span {
  background: var(--optimism);
  color: var(--on-fill);
}

.segmented input:focus-visible + span {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
