/* ALM design system v1, Direction 1a Neon Grid. All tokens and components. */

:root {
  /* Colour */
  --base: #0A0F24;
  --band: #0B1026;
  --surface: #10173A;
  --surface-2: #141C46;
  --rule: #2A3366;
  --ink: #EEF0FA;
  --ink-soft: #C9CDE4;
  --muted: #9AA1C4;
  --violet: #7E35E0;        /* button fill: white on #9B4DFF is only 4.29:1 */
  --violet-hover: #B07AFF;
  --violet-text: #B07AFF;   /* usernames: #9B4DFF is only 4.06:1 on Surface */
  --violet-line: #9B4DFF;
  --violet-soft: #C9A6FF;
  --pink: #FF4D8D;
  --pink-hover: #FF75A8;
  --pink-active: #D93A72;
  --cyan: #22E4F2;
  --disabled-rule: #1C2350;
  --disabled-ink: #4A527C;

  /* Spacing */
  --gutter: 56px;
  --section: 96px;

  /* Type */
  --display: Saira, "Arial Black", sans-serif;
  --body: Archivo, Arial, sans-serif;
  --mono: "DM Mono", Menlo, monospace;
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --section: 64px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }

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

p { margin: 0; }

/* Display type */
h1, h2, h3,
.display {
  font-family: var(--display);
  font-stretch: 125%;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0;
}

.display-hero { font-size: clamp(29px, 7.4vw, 56px); line-height: 1.02; text-wrap: balance; margin: 20px 0 28px; }
.display-l { font-size: clamp(26px, 8.2vw, 48px); line-height: 1.05; }
.h2 { font-size: clamp(27px, 5.4vw, 40px); line-height: 1.05; }
.h3 { font-size: clamp(22px, 4vw, 28px); line-height: 1.15; }
.h4 { font-size: 20px; line-height: 1.2; }

.body-l { font-size: clamp(18px, 2.4vw, 20px); color: var(--ink-soft); }
.small { font-size: 15px; line-height: 1.5; color: var(--muted); }
.meta { font-size: 14px; line-height: 1.5; color: var(--muted); }
.soft { color: var(--ink-soft); }
.username { color: var(--violet-text); font-weight: 500; }
.username-alm { color: var(--pink); font-weight: 700; }

.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow-l { font-size: 14px; }
.eyebrow-pink { color: var(--pink); }

/* Layout */
.wrap { max-width: 1312px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section); padding-bottom: var(--section); }
.ruled-top { border-top: 1px solid var(--rule); }
.ruled-bottom { border-bottom: 1px solid var(--rule); }
.page-head { padding-top: 80px; padding-bottom: 56px; }
.page-body { padding-top: 56px; padding-bottom: var(--section); }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 24px; align-items: start; }
.grid-2-wide { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 64px; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.reading { max-width: 720px; }

@media (max-width: 720px) {
  .page-head { padding-top: 56px; padding-bottom: 40px; }
  .page-body { padding-top: 40px; }
  .grid-2-wide { gap: 40px; }
}

/* Header */
.site-header {
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { flex: none; }
.logo img { width: clamp(130px, 42vw, 360px); height: auto; }
.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-left: auto;
  font-size: 15px;
  white-space: nowrap;
}
.nav-main a {
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  line-height: 1.15;
}
.nav-main a:hover { color: var(--cyan); }
.nav-main a[aria-current="page"] { color: var(--cyan); border-bottom-color: var(--pink); }
.nav-account { display: flex; align-items: center; gap: 22px; font-size: 15px; white-space: nowrap; }

@media (max-width: 1240px) {
  .nav-main { order: 3; width: 100%; margin-left: 0; }
  .nav-account { margin-left: auto; }
}
@media (max-width: 720px) {
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
  .header-row { padding-top: 12px; padding-bottom: 8px; }
  .nav-main { gap: 0 18px; }
  .nav-main a { display: inline-block; padding: 10px 0 8px; }
  .nav-account { gap: 14px; }
  .nav-account a:not(.btn) { padding: 10px 0; }
}

/* Phones: the logo gets its own centred row, 72% of the screen wide.
   Below it, the menu links and Log in / Register share two evenly spread rows. */
@media (max-width: 560px) {
  .header-row { gap: 0 clamp(8px, 3.2vw, 14px); }
  .logo { width: 100%; margin-bottom: 4px; }
  .logo img { width: 72vw; margin: 0 auto; }
  .nav-main, .nav-account { display: contents; font-size: clamp(13px, 3.9vw, 15px); }
  .nav-main a, .nav-account a { font-size: clamp(13px, 3.9vw, 15px); white-space: nowrap; }
  .btn-header { padding: 7px 14px; }
  /* Row break: first three links, then the rest with Log in and Register */
  .header-row::after { content: ""; order: 2; width: 100%; }
  .nav-main a:nth-child(-n+3) { order: 1; }
  .nav-main a:nth-child(n+4), .nav-account a { order: 3; }
}
@media (max-width: 340px) {
  .header-row { column-gap: 5px; }
  .nav-main a, .nav-account a { font-size: 12.5px; }
  .btn-header { padding: 7px 10px; }
}

/* Footer */
.site-footer { background: var(--band); border-top: 1px solid var(--pink); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 32px;
}
.footer-logo { width: min(280px, 100%); height: auto; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 15px; min-width: 0; align-items: flex-start; }
.footer-col a.plain { color: var(--ink); }
.footer-col a.plain:hover { color: var(--cyan); }
.footer-title { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}
.footer-legal-rule { border-top: 1px solid var(--rule); }
.footer-legal nav { display: flex; gap: 20px; }

/* Buttons. The slant is on ::before so the focus outline is not cut off. */
.btn {
  --cut: 10px;
  --fill: var(--pink);
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 12px 26px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill);
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}
.btn:hover { text-shadow: none; }
.btn-primary, .btn-primary:hover { color: var(--base); }
.btn-primary:hover { --fill: var(--pink-hover); }
.btn-primary:active { --fill: var(--pink-active); }
.btn-secondary { --fill: var(--violet); color: #fff; }
.btn-secondary:hover { --fill: var(--violet-hover); color: var(--base); }
.btn-secondary:active { --fill: var(--violet); color: #fff; }
.btn-large { --cut: 12px; padding: 14px 32px; }
.btn-header { padding: 8px 22px; }
.btn-compact { padding: 10px 22px; }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 12px 24px;
  line-height: 1.4;
}
.btn-outline:hover { background: rgba(34, 228, 242, .12); }
.btn-outline:active { background: var(--cyan); color: var(--base); text-shadow: none; }
.btn-outline-compact { padding: 10px 22px; }

@media (max-width: 720px) {
  .btn-header { padding: 8px 18px; }
}

/* Tags */
.tag {
  --cut: 6px;
  position: relative;
  isolation: isolate;
  display: inline-block;
  color: var(--base);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 14px;
}
.tag::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pink);
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}
.tag-pinned { background: var(--surface); color: var(--muted); font-size: 12px; padding: 2px 10px; white-space: nowrap; }

/* Filter buttons */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.filter {
  font: inherit;
  font-size: 14px;
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--rule);
  padding: 6px 16px;
  cursor: pointer;
}
.filter:hover { border-color: var(--cyan); }
.filter[aria-pressed="true"] { background: var(--cyan); color: var(--base); border-color: var(--cyan); }

/* Breadcrumb */
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }

/* Pagination */
.pagination { display: flex; gap: 6px; font-family: var(--mono); font-size: 14px; margin-top: 40px; }
.pagination-center { justify-content: center; }
.pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--disabled-rule);
  color: var(--disabled-ink);
}
.pagination .current { background: var(--cyan); border-color: var(--cyan); color: var(--base); }

/* Hero, with the perspective grid (once per page) */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.neon-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -40px;
  height: 260px;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 60px 40px;
  transform: perspective(360px) rotateX(58deg);
  transform-origin: bottom;
  opacity: .55;
}
.hero-inner {
  position: relative;
  padding-top: 110px;
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 64px;
  align-items: end;
}
.hero-inner > div { min-width: 0; }
.hero-card { max-width: 440px; justify-self: end; background: var(--base); padding: 32px; }

/* Stacks early: the longest headline word needs about 450px at full size */
@media (max-width: 1180px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-card { justify-self: start; width: 100%; }
}
@media (max-width: 720px) {
  .hero-inner { padding-top: 56px; padding-bottom: 72px; gap: 40px; }
  .hero-card { padding: 24px; }
}

/* Author card */
.author-card { border: 1px solid var(--pink); }
.author-card-pad { padding: 24px; }
.author-name { font-family: var(--display); font-stretch: 125%; font-style: italic; font-weight: 800; line-height: 1; margin: 10px 0; font-size: 36px; }
.author-name-l { font-size: 44px; margin: 12px 0; }

/* Benefits and side effects */
.effects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; margin-bottom: 40px; }
.effects-home { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 48px; margin-bottom: 0; }
.effects-col { border-top: 2px solid var(--cyan); padding-top: 16px; }
.effects-col-side { border-top-color: var(--pink); }
.effects-title { font-family: var(--display); font-stretch: 125%; font-style: italic; font-weight: 800; font-size: 20px; color: var(--cyan); text-transform: uppercase; margin: 0 0 8px; }
.effects-home .effects-title { font-size: 22px; margin-bottom: 12px; }
.effects-col-side .effects-title { color: var(--pink); }
.effects-col ul { list-style: none; margin: 0; padding: 0; }
.effects-col li { padding: 10px 0; border-bottom: 1px solid var(--rule); }

/* Forum table */
.forum-box { border: 1px solid var(--rule); }
.forum { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 16px; }
.forum th, .forum td { padding: 10px 16px; text-align: left; vertical-align: top; font-weight: 400; }
.forum thead th {
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
}
.forum thead th + th, .forum tbody td + td { border-left: 1px solid var(--rule); }
.forum .col-by { width: 180px; }
.forum .col-replies { width: 112px; }
.forum .col-last { width: 130px; }
.forum tbody tr { border-top: 1px solid var(--rule); }
.forum tbody tr.topic-row:hover { background: var(--surface); }
.forum .cat-cell { background: var(--surface-2); }
.cat-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cat-bar-text { display: flex; gap: 4px 14px; align-items: baseline; flex-wrap: wrap; }
.cat-name { font-family: var(--display); font-stretch: 125%; font-style: italic; font-weight: 800; text-transform: uppercase; color: var(--pink); }
.cat-link { font-size: 14px; white-space: nowrap; }
.forum .topic-link { color: var(--ink); }
.forum .topic-link:hover { color: var(--cyan); }
.forum .replies { text-align: right; }
.forum .last { color: var(--muted); font-size: 15px; }
.forum .pinned-row { background: var(--surface-2); }
.pinned-cell { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }

@media (max-width: 720px) {
  .forum, .forum tbody, .forum tr, .forum th, .forum td { display: block; width: 100%; }
  .forum thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .forum tbody tr.topic-row, .forum tbody tr.pinned-row { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 12px 16px; }
  .forum tbody .topic-row td, .forum tbody .pinned-row td { width: auto; padding: 0; border: 0; font-size: 14px; text-align: left; }
  .forum tbody .topic-row td:first-child, .forum tbody .pinned-row td:first-child { width: 100%; font-size: 16px; padding-bottom: 4px; }
  .forum .replies::after { content: " replies"; }
  .forum .last { font-size: 14px; }
}

/* Article cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 24px; }
.article-card { display: flex; flex-direction: column; border: 1px solid var(--rule); color: var(--ink); }
.article-card[hidden] { display: none; }
.article-card:hover { border-color: var(--cyan); background: var(--surface); color: var(--ink); text-shadow: none; }
.article-card:hover .card-title { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.article-card img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 22px; line-height: 1.15; }
.card-text { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.card-body .meta { margin-top: auto; }

/* Article page */
.article-title-block { max-width: 880px; margin-top: 32px; }
.article-title-block h1 { margin: 20px 0 16px; }
.article-header-img { width: 100%; height: clamp(200px, 30vw, 360px); object-fit: cover; margin: 40px 0; border: 1px solid var(--rule); }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 320px); gap: 64px; justify-content: space-between; }
.article-main h2 { margin-bottom: 12px; }
.article-main > p { margin-bottom: 32px; }
.article-aside { display: flex; flex-direction: column; gap: 24px; align-self: start; position: sticky; top: 120px; }
.sources { border-top: 1px solid var(--rule); padding-top: 16px; }

@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .article-main { max-width: 720px; }
  .article-aside { position: static; max-width: 720px; }
}

/* Data table */
.data-table { width: 100%; border: 1px solid var(--rule); border-collapse: collapse; margin-bottom: 40px; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
.data-table td { border-left: 1px solid var(--rule); }
.data-table thead th { padding: 10px 16px; font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.data-table thead th + th { border-left: 1px solid var(--rule); }
.data-table tbody th { color: var(--cyan); width: 150px; }

/* Alerts */
.alert { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 4px 12px; border: 1px solid var(--cyan); }
.alert[hidden] { display: none; }
.alert b { color: var(--cyan); }
.alert-error { border-color: var(--pink); }
.alert-error b { color: var(--pink); }
.alert-note { border-color: var(--violet-line); }
.alert-note b { color: var(--violet-soft); }
.alert > span { flex: 1 1 200px; }
.article-note { padding: 16px 20px; margin-bottom: 32px; }

/* Panels (titled boxes) */
.panel { border: 1px solid var(--rule); min-width: 0; }
.panel-action { border-color: var(--cyan); }
.panel-title {
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 10px 20px;
  background: var(--surface);
  color: var(--muted);
}
.panel-action > .panel-title { background: var(--cyan); color: var(--base); }
.panel-body { padding: 24px 20px; }
.panel-body > p:first-child { font-size: 16px; margin-bottom: 16px; }
.panel-note { margin-top: 16px; }
.details-grid { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px 16px; font-size: 16px; }
.details-grid dt { color: var(--muted); }
.details-grid dd { margin: 0; min-width: 0; }
.details-box { border: 1px solid var(--cyan); padding: 24px; font-size: 15px; }
.details-box .details-grid { font-size: 15px; gap: 10px 16px; }
@media (max-width: 480px) {
  .details-grid { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .details-grid dd { margin-bottom: 12px; }
}

/* Forum category cards */
.cat-card { border: 1px solid var(--rule); padding: 28px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.cat-card:hover { border-color: var(--cyan); background: var(--surface); color: var(--ink); text-shadow: none; }
.cat-card .cat-name { font-size: 22px; line-height: 1.15; }
.cat-card-text { color: var(--ink-soft); font-size: 15px; }
.cat-stats { display: flex; gap: 24px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.cat-stats b { color: var(--ink); }
.cat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; margin-bottom: 48px; }

/* Forum topic */
.topic-title { font-size: clamp(27px, 5.4vw, 40px); line-height: 1.08; margin: 24px 0 10px; max-width: 900px; }
.posts { border: 1px solid var(--rule); max-width: 960px; margin-top: 40px; }
.post { display: grid; grid-template-columns: 180px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.post-author { padding: 20px; border-right: 1px solid var(--rule); background: var(--band); display: flex; flex-direction: column; gap: 8px; }
.post-author img { width: 48px; height: 48px; }
.post-author b { color: var(--violet-text); }
.post-author span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.post-body { padding: 20px 24px; }
.post-when { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.reply-cta { padding: 24px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }

@media (max-width: 720px) {
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author { border-right: 0; border-bottom: 1px solid var(--rule); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 4px 12px; }
  .post-author img { width: 36px; height: 36px; }
  .post-body { padding: 16px; }
  .reply-cta { padding: 20px 16px; }
}

/* Numbered lists (about, rules, privacy) */
.num-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.num-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.num-row-text { display: block; color: var(--ink-soft); font-size: 15px; }
.num { font-family: var(--mono); color: var(--pink); }
.text-list { max-width: 720px; display: flex; flex-direction: column; }
.text-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.text-row h2 { margin-bottom: 6px; }
.about-photo { width: 100%; height: clamp(280px, 40vw, 420px); object-fit: cover; border: 1px solid var(--rule); }

/* Register and log in */
.info-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); font-size: 15px; margin-top: 32px; }
.info-list p { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; }
.tabs a, .tabs span {
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
}
.tabs a { background: var(--surface); color: var(--muted); }
.tabs a:hover { color: var(--cyan); }
.tabs span { background: var(--cyan); color: var(--base); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input {
  font: inherit;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  outline: none;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
input[type="file"].input { height: auto; padding: 9px 14px; font-size: 15px; }
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 228, 242, .25); }
.is-invalid .input { border-color: var(--pink); }
.is-invalid .input:focus { box-shadow: 0 0 0 3px rgba(255, 77, 141, .25); }
.field-error { color: var(--pink); font-size: 14px; }
.field-error[hidden] { display: none; }

.check { display: flex; gap: 12px; align-items: center; font-size: 15px; cursor: pointer; position: relative; }
.check input { position: absolute; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.check-box { flex: none; width: 20px; height: 20px; border: 1px solid var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--base); }
.check input:checked + .check-box { background: var(--cyan); border-color: var(--cyan); }
.check input:checked + .check-box::after { content: "✓"; }
.check input:focus-visible + .check-box { border-color: var(--cyan); outline: 2px solid var(--cyan); outline-offset: 3px; }
.check.is-invalid .check-box { border-color: var(--pink); }
.check-group { display: flex; flex-direction: column; gap: 12px; }
.form-note { font-size: 14px; color: var(--muted); }
.form-promise { color: var(--cyan); font-size: 15px; font-weight: 700; }

/* Message form on the home page */
.chat { border: 1px solid var(--cyan); background: var(--band); min-width: 0; }
.chat-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
}
.chat-log { padding: 20px; min-height: 120px; color: var(--muted); font-size: 15px; }
.chat-part { padding: 16px 20px; border-top: 1px solid var(--rule); }
.chat-fields { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }
.chat-send { display: flex; flex-wrap: wrap; gap: 12px; }
.chat-send .input { flex: 1 1 200px; width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; border: 0; margin: 0; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  --cut: 8px;
  position: relative;
  isolation: isolate;
  display: block;
  font-size: 14px;
  color: var(--cyan);
  padding: 7px 18px;
}
/* Two stacked slants make the outline: a clipped CSS border loses its slanted sides */
.chip span::before, .chip span::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}
.chip span::before { inset: 0; background: var(--cyan); }
.chip span::after { inset: 1px; background: var(--band); }
.chip:hover span, .chip input:checked + span { color: var(--base); }
.chip:hover span::after, .chip input:checked + span::after { background: var(--cyan); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* 404 */
.not-found { position: relative; overflow: hidden; min-height: 560px; display: flex; align-items: center; }
.not-found-inner { position: relative; width: 100%; padding-top: 80px; padding-bottom: 80px; }
.not-found-code { font-family: var(--display); font-stretch: 125%; font-style: italic; font-weight: 800; font-size: clamp(96px, 22vw, 160px); line-height: .9; color: var(--pink); text-shadow: 0 0 30px rgba(255, 77, 141, .5); }
.not-found h1 { margin: 24px 0 12px; }
.not-found .body-l { margin-bottom: 32px; }

/* Spacing helpers */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-18 { margin-bottom: 18px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.title-gap { margin: 16px 0; }
.title-gap-l { margin: 16px 0 24px; }
.h2-gap { margin: 16px 0 12px; }
.intro-limit { max-width: 720px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Loading animation (js/intro.js). 1s in total: needle in, liquid up, needle out, fade. */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 36, .62); /* --base, page stays visible behind it */
  pointer-events: none;
  animation: intro-overlay 1s linear both;
}
.intro-art { height: min(46vh, 320px); width: auto; max-width: 60vw; overflow: visible; }
.intro-art * { vector-effect: non-scaling-stroke; }
.intro-vial, .intro-barrel, .intro-flange, .intro-ticks, .intro-needle, .intro-rod { fill: none; stroke-width: 2.5px; }
.intro-vial { stroke: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.intro-vial-liquid, .intro-barrel-liquid { fill: var(--cyan); transform-box: fill-box; transform-origin: bottom; }
.intro-cap { fill: var(--violet-line); filter: drop-shadow(0 0 6px var(--violet-line)); }
.intro-barrel, .intro-flange { stroke: var(--pink); filter: drop-shadow(0 0 6px var(--pink)); }
.intro-ticks { stroke: var(--pink); stroke-width: 1.5px; }
.intro-hub { fill: var(--pink); }
.intro-needle { stroke: var(--ink); filter: drop-shadow(0 0 4px var(--cyan)); }
.intro-rod { stroke: var(--violet-hover); }
.intro-thumb, .intro-stopper { fill: var(--violet-line); }
.intro-syringe { animation: intro-syringe 1s linear both; }
.intro-plunger { animation: intro-plunger 1s linear both; }
.intro-barrel-liquid { animation: intro-barrel-liquid 1s linear both; }
.intro-vial-liquid { animation: intro-vial-liquid 1s linear both; }

@keyframes intro-overlay {
  0% { opacity: 0; }
  5%, 85% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes intro-syringe {
  0%, 8% { transform: translateY(-135px); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  30%, 68% { transform: translateY(0); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  84%, 100% { transform: translateY(-135px); }
}
@keyframes intro-plunger {
  0%, 34% { transform: translateY(0); animation-timing-function: ease-in-out; }
  64%, 100% { transform: translateY(-92px); }
}
@keyframes intro-barrel-liquid {
  0%, 34% { transform: scaleY(0); animation-timing-function: ease-in-out; }
  64%, 100% { transform: scaleY(1); }
}
@keyframes intro-vial-liquid {
  0%, 34% { transform: scaleY(1); animation-timing-function: ease-in-out; }
  64%, 100% { transform: scaleY(.35); }
}
