/* WeaveMove Journal: the articles section and the other static site pages.
   The colours, the header and its menu come from the app (src/index.css,
   loaded by src/site/main.tsx), so the palette picked in the header applies
   here too. Below are only the extra colours of these pages. */

:root {
  --text-soft: color-mix(in srgb, var(--text) 80%, var(--muted));
  --link: color-mix(in srgb, var(--green-dark) 85%, var(--text));
  --shadow-hover: 0 2px 4px rgba(31, 42, 36, 0.06), 0 18px 40px rgba(31, 42, 36, 0.1);
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --danger: #c2413b;
  --danger-soft: #fdecea;
  --chip-l: 42%;
  --chip-bg-l: 93%;
}

:root[data-theme='dark'] {
  --link: color-mix(in srgb, var(--green) 75%, var(--text));
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.4);
  --danger: #ff8a80;
  --danger-soft: #3a1f1d;
  --chip-l: 78%;
  --chip-bg-l: 20%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --link: color-mix(in srgb, var(--green) 75%, var(--text));
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.4);
    --danger: #ff8a80;
    --danger-soft: #3a1f1d;
    --chip-l: 78%;
    --chip-bg-l: 20%;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Elements with display set below still hide with the hidden attribute */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.wrap-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap-wide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
}

.skip:focus {
  left: 8px;
}

/* Header: the app's own (.header, .brand, HeaderMenu from src/index.css),
   at the same width and spacing as on the main page */

.site-header {
  padding-top: env(safe-area-inset-top);
}

.site-header .header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
}

.site-header .brand {
  color: inherit;
  text-decoration: none;
}

/* The menu mounts here; until then (and without JS) the fallback links */
#site-menu {
  display: contents;
}

.menu-fallback {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
}

.menu-fallback a {
  text-decoration: none;
}

.wm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--green) 30%, transparent);
  transition:
    background 0.15s,
    transform 0.15s;
}

.wm-btn:hover {
  background: var(--green-dark);
}

.wm-btn:active {
  transform: translateY(1px);
}

.wm-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Hero */

.hero {
  padding-top: 64px;
  padding-bottom: 36px;
}

.kicker {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
}

:root[data-theme='dark'] .kicker {
  color: var(--link);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .kicker {
    color: var(--link);
  }
}

h1,
h2,
h3 {
  font-family: var(--sans);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 900;
  max-width: 14ch;
}

.hero .lead {
  margin: 18px 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-soft);
}

.hero-topic h1 {
  max-width: none;
  color: hsl(var(--hue) 55% var(--chip-l));
}

.hero-topic .count {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.pill {
  --hue: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.pill span {
  font-size: 0.78rem;
  color: var(--muted);
}

.pill:hover {
  border-color: hsl(var(--hue) 50% 60%);
}

.pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.pill.active span {
  color: inherit;
  opacity: 0.7;
}

.chip {
  --hue: 150;
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: hsl(var(--hue) 60% var(--chip-bg-l));
  color: hsl(var(--hue) 55% var(--chip-l));
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Covers */

.cover {
  overflow: hidden;
  background: var(--soft);
}

.cover img,
.cover .cover-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:root[data-theme='dark'] .cover-art {
  filter: brightness(0.78) saturate(1.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .cover-art {
    filter: brightness(0.78) saturate(1.1);
  }
}

/* Featured article */

.featured {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.featured:hover {
  box-shadow: var(--shadow-hover);
}

.featured-cover .cover {
  height: 100%;
  min-height: 320px;
}

.featured-body {
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

.featured h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 900;
}

.featured h2 a,
.post-card h3 a {
  text-decoration: none;
}

.featured p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.featured .wm-btn {
  margin-top: 8px;
}

@media (max-width: 820px) {
  .featured {
    grid-template-columns: 1fr;
  }
  .featured-cover .cover {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

/* Cards */

.section {
  padding-top: 56px;
}

.list-title {
  margin: 0 0 22px;
  font-size: 1.5rem;
  font-weight: 900;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 26px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.post-card-cover .cover {
  aspect-ratio: 16 / 9;
}

.post-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.post-card h3 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}

/* The whole card is clickable through the title link */
.post-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-card .chip {
  position: relative;
  z-index: 1;
}

.post-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.97rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .meta {
  margin-top: auto;
  padding-top: 6px;
}

.empty {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Article */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green), #ff8a3d);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--text);
}

.crumbs [aria-current] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40ch;
}

.post-header {
  padding-top: 48px;
  padding-bottom: 34px;
}

.post-header h1 {
  margin: 18px 0 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 900;
}

.post-header .lead {
  margin: 18px 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  line-height: 1.5;
  color: var(--text-soft);
}

.post-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.meta-updated {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.cover-post {
  aspect-ratio: 2 / 1;
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .cover-post {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
  }
  .wrap-wide {
    padding: 0 12px;
  }
}

.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: 64px;
  padding-top: 48px;
}

.post-aside .toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.toc .toc-l3 a {
  padding-left: 26px;
  font-size: 0.85rem;
}

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

.toc a.active {
  color: var(--text);
  border-left-color: var(--green);
}

.toc-mobile {
  display: none;
  margin-bottom: 28px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.toc-mobile summary {
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
}

.toc-mobile .toc {
  padding: 0 18px 14px;
}

.toc-mobile .toc-title {
  display: none;
}

@media (max-width: 1020px) {
  .post-layout {
    grid-template-columns: minmax(0, 720px);
  }
  .post-aside {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
}

/* Article text */

.prose {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--text);
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .prose {
    font-size: 1.1rem;
    line-height: 1.7;
  }
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose .table-wrap,
.prose pre {
  margin: 0 0 1.35em;
}

.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--text);
}

.prose h2 {
  margin: 2.1em 0 0.7em;
  font-size: 1.75rem;
  font-weight: 900;
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: 1.32rem;
  font-weight: 800;
}

.prose h4 {
  margin: 1.6em 0 0.5em;
  font-size: 1.1rem;
  font-weight: 800;
}

.prose .anchor {
  position: absolute;
  left: -1.1em;
  width: 1em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor {
  opacity: 0.6;
}

.prose a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose strong {
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--green);
  font-family: var(--sans);
  font-weight: 800;
}

.prose blockquote {
  padding: 18px 24px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  border-radius: 0 16px 16px 0;
  font-size: 1.08em;
  color: var(--text);
}

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

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.5em 0;
}

.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.prose figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose pre {
  overflow: auto;
  padding: 16px 18px;
  background: var(--soft);
  border-radius: 14px;
}

.prose pre code {
  background: none;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table-wrap th {
  font-weight: 800;
  background: var(--soft);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

/* References [1] and the sources list */

.prose sup.ref {
  font-family: var(--sans);
  font-size: 0.68em;
  font-weight: 800;
  line-height: 0;
  margin-left: 1px;
}

.prose sup.ref a {
  text-decoration: none;
  padding: 0 2px;
}

.prose .sources {
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.prose .sources li {
  scroll-margin-top: 96px;
}

.prose .sources li:target {
  background: var(--green-soft);
  border-radius: 8px;
}

/* "Do it now" card inside the text */

.prose .do-it {
  margin: 2em 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  font-family: var(--sans);
  font-size: 0.97rem;
  line-height: 1.45;
}

.do-it-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
}

.prose .do-it p {
  margin: 0;
  color: var(--text-soft);
}

.prose .do-it .do-it-title {
  margin-bottom: 2px;
  font-weight: 900;
  font-size: 1.08rem;
  color: var(--text);
}

.prose .do-it .wm-btn {
  color: #fff;
  text-decoration: none;
}

@media (max-width: 640px) {
  .prose .do-it {
    grid-template-columns: auto 1fr;
  }
  .prose .do-it .wm-btn {
    grid-column: 1 / -1;
  }
}

/* After the text */

.post-footer {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.share {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.share-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s;
}

.share-btn:hover {
  border-color: var(--green);
}

.share-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
}

.cta {
  margin-top: 44px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background:
    radial-gradient(400px 200px at 0% 0%, color-mix(in srgb, var(--green) 22%, transparent), transparent 70%),
    radial-gradient(400px 200px at 100% 100%, color-mix(in srgb, #ff8a3d 18%, transparent), transparent 70%),
    var(--card);
  box-shadow: var(--shadow);
}

.cta img {
  border-radius: 14px;
}

.cta h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.cta p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.97rem;
}

@media (max-width: 720px) {
  .cta {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .cta .wm-btn {
    justify-self: start;
  }
}

/* Comments */

.comments {
  margin-top: 64px;
  scroll-margin-top: 88px;
}

.comments h2 {
  margin: 0 0 22px;
  font-size: 1.6rem;
  font-weight: 900;
}

.comments-count {
  color: var(--muted);
  font-weight: 700;
  font-size: 1rem;
  margin-left: 6px;
}

.comments-empty {
  margin: 0 0 22px;
  color: var(--muted);
}

.comment-list,
.comment-replies {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list {
  margin-bottom: 28px;
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.comment-replies .comment {
  border-bottom: 0;
  padding-bottom: 0;
}

.comment-replies {
  grid-column: 2;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: hsl(var(--hue, 150) 55% 50%);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.comment-name {
  font-weight: 800;
}

.comment-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.comment-text {
  margin: 6px 0 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-soft);
}

.comment-actions {
  display: flex;
  gap: 16px;
}

.comment-actions button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.comment-actions button:hover {
  color: var(--text);
}

.comment.fresh {
  animation: fresh 1.6s ease-out;
}

@keyframes fresh {
  from {
    background: var(--green-soft);
  }
  to {
    background: transparent;
  }
}

.comment-form {
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.replying {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 12px;
  font-size: 0.92rem;
}

.form-field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .comment-form {
    padding: 18px;
  }
}

/* The honeypot: people don't see it, simple bots fill it */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.rules {
  flex: 1;
  min-width: 220px;
  font-size: 0.9rem;
  color: var(--muted);
}

.rules summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}

.rules p {
  margin: 4px 0 6px;
}

.rules ul {
  margin: 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 24px;
}

@media (max-width: 560px) {
  .rules ul {
    columns: 1;
  }
}

.form-message {
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  background: var(--green-soft);
}

.form-message.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.form-message b {
  display: block;
  margin-bottom: 2px;
}

.form-message .why {
  color: var(--text);
}

.form-message .hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* Footer */

.site-footer {
  margin-top: 96px;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  border-radius: 8px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--text);
}

@media print {
  .site-header,
  .site-footer,
  .post-aside,
  .toc-mobile,
  .cta,
  .comments,
  .related,
  .share,
  .progress {
    display: none !important;
  }
  body {
    background: #fff;
  }
}

/* Text pages (privacy) */

.text-page {
  padding-top: 48px;
}

.text-page h1 {
  margin: 0 0 28px;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 900;
}

.text-page .prose {
  font-size: 1.1rem;
}
