/* ==========================================================================
   mc-auth-site — "sakura dusk" theme
   --------------------------------------------------------------------------
   A soft, anime-flavoured skin for a Minecraft server portal: hero block,
   section grid, sidebar widgets and a multi-column footer on top of the
   registration form.

   Constraints that shaped this file:

   * Everything is served from our own origin.  The application sends
     ``Content-Security-Policy: default-src 'self'; style-src 'self'``, so a web
     font or icon CDN is not an option and neither are inline ``style=""``
     attributes.  All decoration therefore lives here, and the illustrations in
     the templates are inline SVG (which the policy allows as document markup).
   * No JavaScript.  The petals, sparkles and glow are pure CSS animations, and
     they are switched off entirely under ``prefers-reduced-motion``.
   * Colours are checked against WCAG AA: body text and every interactive
     element reach at least 4.5:1 on their own background in both the light and
     the dark variant.
   * Light is the default; ``prefers-color-scheme: dark`` swaps the tokens for a
     night-sky palette.  Nothing else in the file needs to know about it.
   * The layout is a normal document flow with CSS grid.  Nothing depends on a
     media query to be *reachable*: the narrow-screen rules only re-flow what is
     already visible, because hiding navigation behind a breakpoint is how the
     desktop menu once disappeared entirely.
   ========================================================================== */

:root {
  /* Sky */
  --sky-top: #ffe9f4;
  --sky-mid: #eef0ff;
  --sky-bot: #e4f6ff;

  /* Surfaces */
  --card: rgba(255, 255, 255, 0.9);
  --card-solid: #ffffff;
  --card-border: #f6dbe9;
  --field: #fffbfd;
  --field-border: #f0d3e3;
  --surface-soft: rgba(255, 255, 255, 0.62);
  --surface-tint: linear-gradient(150deg, rgba(255, 236, 246, 0.95), rgba(240, 238, 255, 0.9));

  /* Ink */
  --ink: #3b2545;
  --ink-soft: #6d5a7d;
  --ink-hint: #7b6689;

  /* Accents */
  --pink: #ffb3d1;
  --pink-strong: #d6306f;
  --violet: #8b52e8;
  --mint: #7fd8c0;
  --link: #c9205f;
  --link-hover: #a2134a;

  /* Content sections: tag chips, the "note" callout and table stripes.
     ``--chip``/``--note`` carry text, so they are validated against their own
     backgrounds by the contrast tests. */
  --chip: #a2134a;
  --chip-bg: #ffe4f0;
  --chip-border: #ffb8d6;
  --note: #3f2f5c;
  --note-bg: #f3eeff;
  --note-border: #d9c9f7;
  --stripe: rgba(255, 179, 209, 0.12);
  --rule: #f0d3e3;

  /* Feedback */
  --danger: #c0173c;
  --danger-bg: #ffeef2;
  --danger-border: #ffc9d6;
  --success: #1c7a58;
  --success-bg: #eafaf3;
  --success-border: #b9ecd9;

  /* Shape */
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;

  /* Depth */
  --shadow-card: 0 24px 60px -20px rgba(150, 60, 120, 0.35),
    0 4px 14px rgba(150, 60, 120, 0.08);
  --shadow-soft: 0 10px 24px -12px rgba(190, 80, 140, 0.45);
  --ring: 0 0 0 4px rgba(255, 143, 187, 0.35);

  --sans: "Nunito", "Quicksand", "Segoe UI", system-ui, -apple-system, "Trebuchet MS",
    "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky-top: #1b1230;
    --sky-mid: #171532;
    --sky-bot: #182238;

    --card: rgba(38, 29, 58, 0.92);
    --card-solid: #251c3a;
    --card-border: #4a3564;
    --field: #1d1730;
    --field-border: #4a3564;
    --surface-soft: rgba(45, 34, 68, 0.7);
    --surface-tint: linear-gradient(150deg, rgba(58, 40, 78, 0.95), rgba(35, 30, 62, 0.9));

    --ink: #f2ecff;
    --ink-soft: #cfc0e6;
    --ink-hint: #b3a3cc;

    --pink: #ff9dc4;
    --pink-strong: #ffa8cf;
    --violet: #c9a6ff;
    --mint: #93e9c4;
    --link: #ffa8cf;
    --link-hover: #ffc9e0;

    --chip: #ffc9e0;
    --chip-bg: rgba(255, 168, 207, 0.16);
    --chip-border: rgba(255, 168, 207, 0.45);
    --note: #e6dbff;
    --note-bg: rgba(160, 130, 255, 0.14);
    --note-border: rgba(160, 130, 255, 0.42);
    --stripe: rgba(255, 168, 207, 0.07);
    --rule: #4a3564;

    --danger: #ff9aae;
    --danger-bg: rgba(255, 120, 150, 0.14);
    --danger-border: rgba(255, 120, 150, 0.45);
    --success: #93e9c4;
    --success-bg: rgba(120, 240, 200, 0.12);
    --success-border: rgba(120, 240, 200, 0.4);

    --shadow-card: 0 28px 70px -24px rgba(0, 0, 0, 0.75), 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
    --ring: 0 0 0 4px rgba(255, 168, 207, 0.28);
  }
}

/* --------------------------------------------------------------- reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(170deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-bot) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Anchored headings must not land underneath the sticky header. */
:target {
  scroll-margin-top: 6.5rem;
}

/* ---------------------------------------------------------- skip link ---- */

/* Visible only while focused; the first Tab on any page reaches it. */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--card-solid);
  color: var(--link);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------------------------------------------------------- backdrop ----- */
/* Decorative, pointer-transparent, and hidden from assistive technology by
   ``aria-hidden`` on the element itself.  Three layers: soft bokeh glow, the
   drifting sakura petals, and the twinkling sparkles. */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(closest-side circle at 12% 8%, rgba(255, 170, 205, 0.55), transparent 100%),
    radial-gradient(closest-side circle at 88% 12%, rgba(178, 160, 255, 0.5), transparent 100%),
    radial-gradient(closest-side circle at 78% 82%, rgba(127, 216, 192, 0.38), transparent 100%),
    radial-gradient(closest-side circle at 18% 88%, rgba(255, 208, 235, 0.5), transparent 100%);
  filter: blur(18px);
  animation: breathe 18s ease-in-out infinite alternate;
}

/* Petals: a tiled pattern of soft elliptical blobs.  Two tile sizes drifting at
   different speeds fake depth without a single extra DOM node. */
.backdrop-petals {
  position: absolute;
  inset: -240px -60px;
  background-image:
    radial-gradient(ellipse 9px 6px at 24px 40px, rgba(255, 143, 187, 0.75) 0 60%, transparent 62%),
    radial-gradient(ellipse 7px 5px at 150px 120px, rgba(255, 190, 220, 0.8) 0 60%, transparent 62%),
    radial-gradient(ellipse 10px 6px at 90px 210px, rgba(214, 180, 255, 0.7) 0 60%, transparent 62%),
    radial-gradient(ellipse 6px 4px at 200px 260px, rgba(255, 168, 207, 0.7) 0 60%, transparent 62%);
  background-size: 240px 300px;
  filter: blur(0.3px);
  opacity: 0.85;
  animation: petal-drift 34s linear infinite;
}

.backdrop-sparkles {
  position: absolute;
  inset: -180px -40px;
  background-image:
    radial-gradient(circle 2px at 60px 90px, rgba(255, 255, 255, 0.95) 0 40%, transparent 45%),
    radial-gradient(circle 1.5px at 210px 40px, rgba(255, 255, 255, 0.9) 0 40%, transparent 45%),
    radial-gradient(circle 2.5px at 140px 240px, rgba(255, 236, 250, 0.95) 0 40%, transparent 45%),
    radial-gradient(circle 1.5px at 260px 300px, rgba(255, 255, 255, 0.85) 0 40%, transparent 45%);
  background-size: 320px 340px;
  animation: sparkle-drift 52s linear infinite reverse, twinkle 6s ease-in-out infinite alternate;
}

/* ------------------------------------------------------------- layout ---- */

.page {
  position: relative;
  z-index: 1;
  width: min(78rem, 100% - 2.5rem);
  margin: 0 auto;
  padding: 0 0 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Content + sidebar.  ``.has-sidebar`` is added by the layout only when the
   page actually fills the sidebar, so a page without widgets keeps the full
   measure instead of leaving a blank column. */
.layout {
  display: grid;
  gap: 1.6rem;
  align-items: start;
  padding-top: 1.75rem;
}

.layout.has-sidebar {
  grid-template-columns: minmax(0, 1fr) 19.5rem;
}

.main {
  min-width: 0;
}

.sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6.5rem;
}

/* ------------------------------------------------------------- header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -0.25rem;
  padding: 0.55rem 0.25rem;
  background: var(--card);
  border-bottom: 1px solid var(--card-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem 1.1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  padding: 0.25rem 0.9rem 0.25rem 0.3rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(255, 179, 209, 0.45), rgba(178, 160, 255, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-1px) rotate(-0.6deg);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--card-solid);
  box-shadow: inset 0 0 0 1px rgba(214, 48, 111, 0.18);
}

.brand-mark svg {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

/* The section list: a wrapping row that is always visible.  See the base
   template's markup comment for why this must never become a collapsed
   ``<details>``. */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
  font-size: 0.93rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.78rem;
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--link);
  background: var(--card-solid);
  border-color: var(--card-border);
}

.nav-link.is-current {
  color: var(--link);
  background: var(--chip-bg);
  border-color: var(--chip-border);
}

.nav-link .icon {
  width: 1.05rem;
  height: 1.05rem;
  opacity: 0.85;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--field);
  border: 1px solid var(--field-border);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.ip-chip .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--pink-strong);
}

.ip-chip code {
  white-space: nowrap;
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, rgba(255, 179, 209, 0.5), rgba(255, 214, 235, 0.5));
  color: var(--ink);
  font-weight: 800;
  font-size: 0.88rem;
}

.who::before {
  content: "✿";
  color: var(--pink-strong);
}

.inline {
  display: inline;
  margin: 0;
}

.link-button {
  background: none;
  border: 1px solid transparent;
  padding: 0.42rem 0.9rem;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-pill);
}

.link-button:hover {
  color: var(--link);
  background: var(--card-solid);
  border-color: var(--card-border);
}

/* --------------------------------------------------------------- icon ---- */

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.15em;
}

/* --------------------------------------------------------- page heads ---- */

.page-head {
  margin-bottom: 1.35rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-hint);
}

.breadcrumbs a {
  color: var(--ink-hint);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--link);
}

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

.breadcrumbs-sep {
  color: var(--card-border);
}

.page-sub {
  color: var(--ink-hint);
  font-size: 0.94rem;
  margin: 0.4rem 0 0;
}

/* --------------------------------------------------------------- hero ---- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 1.9rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--surface-tint);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* A ribbon of light across the top edge, matching the old card. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #ffb3d1, #ffd9a8, #b2a0ff, #9fe8d8, #ffb3d1);
  background-size: 200% 100%;
  animation: ribbon 12s linear infinite;
}

.hero-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.hero-eyebrow .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(127, 216, 192, 0.25);
}

.hero-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.3rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-points .icon {
  width: 1rem;
  height: 1rem;
  color: var(--success);
}

/* The connection card inside the hero. */
.hero-aside {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.server-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--card-solid);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}

.server-card-label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.server-address {
  margin: 0 0 0.85rem;
  font-size: 1.18rem;
  font-weight: 800;
  word-break: break-word;
}

.server-address code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1em;
  color: var(--pink-strong);
  white-space: normal;
}

/* Fallback card shown when no server host is configured: no empty address
   field, just the mascot and where the address is published. */
.server-card-intro {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.server-card-intro-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-hint);
}

.server-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.35rem;
}

.server-card-facts dt {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.server-card-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.server-card-link,
.widget-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.server-card-link:hover,
.widget-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  color: var(--chip);
}

/* The pinned announcement teaser under the server card. */
.hero-notice {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--chip-border);
  background: var(--surface-soft);
  text-decoration: none;
  color: var(--ink);
}

.hero-notice:hover .hero-notice-title {
  color: var(--link);
}

.hero-notice .tag {
  justify-self: start;
}

.hero-notice-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
}

/* ------------------------------------------------------------- panels ---- */

/* The generic content surface, replacing the old single "card". */
.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.75rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  animation: card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.panel + .panel {
  margin-top: 1.1rem;
}

.panel-quiet {
  background: var(--surface-soft);
  box-shadow: none;
  animation: none;
}

.panel-hello {
  border-color: var(--chip-border);
}

/* A callout for "careful" advice (passwords, maintenance windows) and for the
   empty states of the content sections ("Новостей пока нет"). */
.note {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--note-border);
  background: var(--note-bg);
  color: var(--note);
  font-size: 0.93rem;
}

.featured-post {
  margin-top: 0.25rem;
}

.featured-post-title {
  margin: 0.15rem 0 0.5rem;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.55rem);
}

/* The standalone error page keeps the old single-card look: it has no header,
   sidebar or footer, so the card is centred in the viewport instead. */
.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem 0;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 2.15rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(90deg, #ffb3d1, #ffd9a8, #b2a0ff, #9fe8d8, #ffb3d1);
  background-size: 200% 100%;
  animation: ribbon 12s linear infinite;
}

.card h1::after {
  content: "";
  display: block;
  width: 3.4rem;
  height: 4px;
  margin-top: 0.55rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--pink-strong), var(--violet));
}

/* --------------------------------------------------------- typography ---- */

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 1.25rem + 1.1vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h2 {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

p {
  margin: 0 0 0.9rem;
}

.prose > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}

.hint {
  color: var(--ink-hint);
  font-size: 0.92rem;
  margin: 0.35rem 0 1.35rem;
}

.hint a,
a {
  color: var(--link);
  font-weight: 700;
  text-decoration-color: rgba(201, 32, 95, 0.35);
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.hint a:hover,
a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.lead {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

code {
  background: rgba(255, 179, 209, 0.22);
  border: 1px solid rgba(255, 179, 209, 0.5);
  border-radius: 8px;
  padding: 0.08rem 0.4rem;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
  color: var(--ink);
  white-space: nowrap;
}

/* ------------------------------------------------------------- mascot ---- */
/* The chibi illustration. Presentational only — every SVG in the templates
   carries ``aria-hidden="true"`` and the page content is carried by the
   headings and the forms themselves. */

.mascot {
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  width: 8.25rem;
  height: 8.25rem;
  position: relative;
  animation: bob 5s ease-in-out infinite;
}

.mascot svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 20px rgba(214, 48, 111, 0.22));
}

.mascot-sm {
  width: 5.5rem;
  height: 5.5rem;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

/* Sparkles orbiting the mascot. */
.mascot::before,
.mascot::after {
  content: "✦";
  position: absolute;
  color: var(--pink-strong);
  font-size: 1rem;
  opacity: 0.85;
  animation: twinkle 3.4s ease-in-out infinite;
}

.mascot::before {
  top: 6%;
  left: 2%;
}

.mascot::after {
  right: 4%;
  bottom: 14%;
  font-size: 0.8rem;
  animation-delay: 1.2s;
  color: var(--violet);
}

/* --------------------------------------------------------------- auth ---- */

/* Register/login: the form on the left, an explanation card on the right.
   On a phone the aside simply stacks underneath. */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.8fr);
  gap: 1.4rem;
  align-items: start;
}

.auth-form .page-head {
  margin-bottom: 1rem;
}

.auth-aside {
  position: sticky;
  top: 6.5rem;
}

.auth-card {
  padding: 1.4rem 1.4rem 1.6rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--surface-tint);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.auth-mascot {
  display: grid;
  place-items: center;
}

.auth-title {
  margin: 0.35rem 0 0.9rem;
  font-size: 1.02rem;
}

.auth-list {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.auth-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
}

.auth-list .icon {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.2rem;
  color: var(--pink-strong);
}

.auth-note {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.82rem;
  color: var(--ink-hint);
  text-align: left;
}

.auth-server {
  display: grid;
  gap: 0.15rem;
  margin: 1rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--card-solid);
  border: 1px solid var(--card-border);
  text-align: left;
}

.auth-server span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.auth-server code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pink-strong);
  white-space: normal;
  word-break: break-word;
}

/* ------------------------------------------------------------- fields ---- */

form {
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: 0.005em;
}

.label-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.optional {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-hint);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.78rem 1rem;
  background: var(--field);
  border: 2px solid var(--field-border);
  border-radius: var(--radius-md);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder {
  color: var(--ink-hint);
  opacity: 0.75;
}

input:hover {
  border-color: var(--pink);
}

input:focus {
  outline: none;
  border-color: var(--pink-strong);
  background: var(--card-solid);
  box-shadow: var(--ring);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(192, 23, 60, 0.2);
}

/* ------------------------------------------------------------ buttons ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #d6306f 0%, #8b52e8 100%);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -12px rgba(214, 48, 111, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.button:hover {
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -14px rgba(214, 48, 111, 0.9);
  color: #ffffff;
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px -10px rgba(214, 48, 111, 0.8);
}

.button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.button-secondary {
  background: var(--card-solid);
  color: var(--ink);
  border: 2px solid var(--card-border);
  box-shadow: none;
}

.button-secondary:hover {
  filter: none;
  border-color: var(--pink);
  background: var(--card-solid);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* Header actions stay compact; the form button keeps the full width. */
.button-small {
  width: auto;
  padding: 0.5rem 1.05rem;
  font-size: 0.88rem;
  box-shadow: none;
}

.button-large {
  width: auto;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.actions .button {
  flex: 1 1 11rem;
  width: auto;
}

.actions-inline {
  margin-top: 0;
  flex: 1 1 16rem;
  justify-content: flex-end;
}

/* ---------------------------------------------------------- feedback ----- */

.alert {
  position: relative;
  margin: 0 0 1.1rem;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  animation: pop-in 0.3s ease both;
}

.alert::before {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  line-height: 1;
}

.alert-error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.alert-error::before {
  content: "✕";
}

.flash {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  animation: pop-in 0.3s ease both;
}

.flash::before {
  content: "❀";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.flash li + li {
  margin-top: 0.35rem;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 700;
}

/* ----------------------------------------------------------- sections ---- */

.section {
  margin-top: 2.2rem;
}

.section-head {
  margin-bottom: 1rem;
}

.section-head h2 {
  margin-bottom: 0.2rem;
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-sub {
  margin: 0;
  color: var(--ink-hint);
  font-size: 0.9rem;
}

.section-link {
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-number {
  color: var(--pink-strong);
}

.rule-section {
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.rule-section h2 {
  margin-bottom: 0.35rem;
}

/* ---- the section grid -------------------------------------------------- */

.quick-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.quick-card {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 1.15rem 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--pink);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.quick-icon {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.55rem;
  border-radius: var(--radius-md);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip);
}

.quick-icon .icon {
  width: 1.3rem;
  height: 1.3rem;
}

.quick-title {
  font-weight: 800;
  font-size: 1rem;
}

.quick-text {
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.quick-go {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--link);
}

/* --------------------------------------------------------------- lists --- */

.bullet-list {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.bullet-list li {
  margin-bottom: 0.45rem;
}

.bullet-list li::marker {
  color: var(--pink-strong);
}

/* Numbered steps: the counter is drawn in the accent colour so the eye can
   follow the order without reading the text. */
.step-list {
  counter-reset: step;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
}

/* The landing/status variant: each step becomes a card so three columns line
   up on a wide screen. */
.step-list-cards {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
}

.step-list-cards li {
  padding: 1.15rem 1.2rem 1.2rem 3.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.step-list-cards li::before {
  left: 1.1rem;
  top: 1.15rem;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8rem;
}

.step-title {
  display: block;
  font-weight: 800;
}

.step-text {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---- code and tables --------------------------------------------------- */

/* Inline ``code`` above sets ``white-space: nowrap``, which is wrong for a
   multi-line snippet: it would overflow instead of wrapping. */
.code-block {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--field-border);
  background: var(--field);
}

.code-block code {
  background: none;
  border: 0;
  padding: 0;
  white-space: pre;
  font-size: 0.88rem;
}

/* A table can be wider than a phone; scrolling it is better than squashing it
   into unreadable columns.  ``tabindex="0"`` on the wrapper lets keyboard users
   reach the scroll area. */
.table-wrap {
  margin: 0 0 1rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-solid);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.data-table thead th {
  background: var(--chip-bg);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: var(--stripe);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---- server facts ------------------------------------------------------ */

.facts {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin: 1.2rem 0 0;
}

.facts-wide {
  margin-top: 0;
}

.fact {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--field);
}

.fact dt {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.fact dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  color: var(--ink);
}

/* ---- news -------------------------------------------------------------- */

.news-list {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.news-card {
  padding: 1.05rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.news-title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 800;
}

.news-title a {
  text-decoration: none;
  color: var(--ink);
}

.news-title a:hover {
  color: var(--link);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-hint);
}

.news-author {
  color: var(--ink-hint);
}

.news-summary {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Tag chips are text on their own background, so they have their own tokens. */
.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.tag-pinned {
  border-color: var(--violet);
  color: var(--violet);
}

/* Previous/next announcement links. */
.post-nav {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 1.4rem 0 1rem;
}

.post-nav-link {
  display: block;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card);
  text-decoration: none;
}

.post-nav-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.post-nav-title {
  display: block;
  font-weight: 700;
  color: var(--ink);
}

/* ---- FAQ --------------------------------------------------------------- */

/* Contents of the page: a row of anchor links so a long FAQ stays navigable. */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.2rem;
}

.toc a {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--card-border);
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.toc a:hover {
  border-color: var(--pink);
  background: var(--card-solid);
}

/* The accordion.  ``<details>`` needs no script; the styles only add the
   open/closed affordance and the card look. */
.faq-item {
  margin-bottom: 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card);
  padding: 0 1rem;
}

.faq-item[open] {
  border-color: var(--pink);
  background: var(--card-solid);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

/* Draw the affordance rather than shipping an icon font. */
.faq-question::before {
  content: "+";
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--chip);
  font-weight: 800;
  line-height: 1;
}

.faq-item[open] .faq-question::before {
  content: "−";
}

.faq-answer {
  padding: 0 0 0.35rem 1.95rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.faq-answer > :last-child {
  margin-bottom: 0.6rem;
}

/* ---- status page ------------------------------------------------------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
}

.status-ok {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(28, 122, 88, 0.18);
}

/* ------------------------------------------------------------ widgets ---- */

.widget {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.widget-title {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.widget-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.widget-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.widget-fact dt {
  font-size: 0.82rem;
  color: var(--ink-hint);
}

.widget-fact dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.widget-links {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.widget-links a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem;
  margin: 0 -0.45rem;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}

.widget-links a:hover {
  color: var(--link);
  background: var(--chip-bg);
}

.widget-links .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--pink-strong);
}

.widget-news {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}

.widget-news a {
  display: block;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
}

.widget-news a:hover {
  color: var(--link);
}

.widget-news time {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.76rem;
  color: var(--ink-hint);
}

.widget-toc {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
}

.widget-toc a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
}

.widget-toc a:hover {
  color: var(--link);
}

.widget-hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-hint);
}

.widget-hint a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---- call to action ---------------------------------------------------- */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--chip-border);
  background: var(--surface-tint);
  box-shadow: var(--shadow-soft);
}

.cta-title {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.cta-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------- footer ---- */

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--card-border);
  color: var(--ink-hint);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}

.footer-about p {
  margin: 0 0 0.6rem;
  max-width: 24rem;
  line-height: 1.65;
}

.footer-note {
  font-size: 0.78rem;
  color: var(--ink-hint);
}

.footer-title {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-hint);
}

.footer-nav {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.footer-nav a {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--link);
}

/* --------------------------------------------------------- animations ---- */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes breathe {
  from {
    transform: scale(1) translateY(0);
    opacity: 0.9;
  }

  to {
    transform: scale(1.08) translateY(-1.5%);
    opacity: 1;
  }
}

/* Each drifting layer repeats its background on a fixed tile.  Translating by
   exactly one tile (or a multiple) maps the pattern onto itself, so the loop is
   seamless; any other offset produces a visible jump every time it restarts.
   Keep these numbers in step with the layers' ``background-size``. */
@keyframes petal-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-240px, 300px, 0);
  }
}

@keyframes sparkle-drift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-320px, 340px, 0);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

@keyframes ribbon {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 200% 50%;
  }
}

/* ------------------------------------------------------- accessibility --- */
/* Visitors who ask for less motion get the beauty without the movement. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .backdrop-petals,
  .backdrop-sparkles {
    display: none;
  }
}

/* Visible keyboard focus everywhere, in the theme's own colours. */
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 6px;
}

/* High-contrast users get flat, opaque surfaces instead of glass. */
@media (prefers-contrast: more) {
  .panel,
  .hero,
  .brand,
  .site-header,
  .widget {
    background: var(--card-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .backdrop {
    display: none;
  }
}

/* ------------------------------------------------------------ laptop ----- */

@media (max-width: 68rem) {
  .layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 17rem;
  }

  .header-actions {
    margin-left: 0;
  }
}

/* ------------------------------------------------------------ tablet ----- */

@media (max-width: 56rem) {
  /* Two columns no longer fit: the sidebar drops underneath the content and
     the hero stacks.  Nothing is hidden - only re-flowed. */
  .layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem;
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-aside {
    position: static;
  }

  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }
}

/* ------------------------------------------------------------ mobile ----- */

@media (max-width: 34rem) {
  .page {
    width: min(78rem, 100% - 1.25rem);
  }

  /* The section row keeps wrapping instead of folding into a hidden menu: a
     collapsed ``<details>`` used to hide the whole navigation on desktop. */
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  /* Labels stay visible: the icon is decoration, and an icon-only link would
     lose its accessible name along with the text (``display: none`` removes it
     from the accessibility tree).  The row scrolls sideways instead. */
  .nav-link {
    white-space: nowrap;
    padding: 0.42rem 0.7rem;
  }

  .brand-tagline,
  .ip-chip {
    display: none;
  }

  .hero {
    padding: 1.25rem 1.15rem;
  }

  .panel {
    padding: 1.2rem 1.1rem;
    border-radius: var(--radius-lg);
  }

  .faq-answer {
    padding-left: 0;
  }

  .mascot {
    width: 6.75rem;
    height: 6.75rem;
  }

  .auth-mascot .mascot {
    width: 4.75rem;
    height: 4.75rem;
  }

  .cta-band {
    padding: 1.2rem 1.15rem;
  }
}

/* ------------------------------------------------------------ printing --- */

@media print {
  .backdrop,
  .mascot,
  .site-nav,
  .sidebar,
  .auth-aside,
  .skip-link,
  .site-header {
    display: none;
  }

  .panel,
  .hero,
  .widget,
  .quick-card {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
  }

  .layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
}
