/* HaughtAI styles — the Apex layer on the HaughtStudio design system.
 *
 * Plain CSS, served as-is. No build step, no preprocessor, no bundler -- the
 * target machine has no Node.js, and a build step would be a hard blocker.
 *
 * `studio.css` is a verbatim copy of HaughtStudio's stylesheet
 * (web_App/static/css/app.css), the design system behind studio.haughtai.com.
 * It defines the tokens, the two-column app shell (`.app` / `.drawer` / `.main`
 * / `.topbar` / `.view`) and the shared components. This file is the Apex layer:
 * it re-points the account and marketing components at those tokens so every
 * page shares the Studio look -- near-black `--bg`, layered `--card` surfaces,
 * `--purple-300` accents, and the violet -> blue `--grad` kept for primary
 * actions.
 *
 * NO JAVASCRIPT. The drawer collapses on narrow screens with a hidden checkbox
 * plus two `<label>`s (the hamburger and the backdrop) -- a CSS-only toggle, so
 * no `<script>` is needed anywhere.
 *
 * Autoplaying video is a plain <video> element, and `prefers-reduced-motion`
 * swaps the hero video for its poster image rather than trying to pause it.
 */

:root {
  /* The only Apex-only token: the content width for the wide detail pane.
   * Everything else comes from studio.css (:root), which loads first. */
  --wrap: 1120px;
}

/* --- App shell: CSS-only drawer ---------------------------------------- */
/* studio.css already turns `.drawer` into an off-canvas panel under 900px and
 * only reveals it for `body.drawer-open` (a class its JavaScript adds). With no
 * JavaScript here, the hidden checkbox beside the drawer plays that role. */

.drawer-toggle-label { display: none; }

.drawer-backdrop { display: none; }

@media (max-width: 900px) {
  .drawer-toggle-label { display: inline-grid; }

  /* Specificity beats studio.css's `body.drawer-open .drawer` rule. */
  #drawer-toggle:checked ~ .drawer { transform: none; }

  #drawer-toggle:checked ~ .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(6, 4, 10, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}

/* The brand tile carries the gradient; the dot is the Apex wordmark's mark. */
.brand-mark {
  position: relative;
  background: var(--grad);
}
.brand-mark::after {
  content: "";
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff;
  opacity: 0.92;
}
.brand-text { display: flex; flex-direction: column; }

.drawer-foot .btn { width: 100%; }

/* Pages draw their own full-width sections; inside the fixed-width detail pane
 * the marketing `.wrap` wrappers would add a second, narrower gutter. */
.view-inner .wrap { max-width: none; padding-inline: 0; }
.view-inner .panel-page { padding: 0; }

/* --- Base type ---------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 3vw, 2.05rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

/* Display type keeps Studio's heavy weight; the old editorial italic is gone. */
.display { font-weight: 650; letter-spacing: -0.02em; }
.display-xl {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 0.55em;
  max-width: 22ch;
}

a:hover { text-decoration: none; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.narrow { max-width: 640px; }
.muted { color: var(--text-dim); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--purple-500); color: #fff;
  padding: 0.5rem 1rem; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------ */
/* Mirrors studio.css `.btn`: the same surfaces, radius and gradient primary. */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--card-2);
  color: var(--text);
  font: inherit; font-size: 0.875rem; font-weight: 550;
  text-decoration: none; cursor: pointer;
  /* A button label is one line. Wrapping it turns the control into a blob. */
  white-space: nowrap;
  transition: background 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--card-3); }
.button:active { transform: translateY(1px); }

.button-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(110, 90, 230, 0.25);
}
.button-primary:hover { filter: brightness(1.06); }

.button-quiet { background: transparent; border-color: transparent; color: var(--text-dim); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

.button-danger { border-color: rgba(229, 72, 77, 0.35); color: var(--danger); background: rgba(229, 72, 77, 0.08); }
.button-danger:hover { background: rgba(229, 72, 77, 0.16); }

.button-large { padding: 0.85rem 1.5rem; font-size: 0.96875rem; border-radius: var(--radius); }
.button-block { display: flex; width: 100%; }

.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; align-items: flex-end; gap: 0.5rem; flex-wrap: wrap; margin: 0; }

/* --- Text bits ---------------------------------------------------------- */

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.7rem; font-weight: 650;
  color: var(--purple-300); margin: 0 0 0.9rem;
}

.lede { font-size: 1.0625rem; color: var(--text-dim); max-width: 62ch; }

.tick-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tick-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4rem; color: var(--text-dim); }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }

/* --- Notices ------------------------------------------------------------ */

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple-500);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice-warn { border-left-color: var(--warn); }
.notice-good { border-left-color: var(--ok); }

.key-value {
  word-break: break-all;
  background: var(--bg);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }

/* The looping video is decorative; its <source> file is a placeholder
 * (static/video/hero_loop.mp4) and is replaced with real footage later. */
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.30;
}
/* Three passes: fade into the page at the bottom, hold the text column dark on
 * the left, and add one soft brand glow (the Studio gradient's endpoints). */
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 9, 18, 0.35) 0%, rgba(11, 9, 18, 0.86) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11, 9, 18, 0.85) 0%, rgba(11, 9, 18, 0.25) 65%, transparent 100%),
    radial-gradient(40rem 30rem at 20% 20%, rgba(124, 92, 230, 0.24), transparent 70%);
}

.hero-inner { max-width: 760px; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0 0; }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; margin: 1.5rem 0 0; padding: 0;
}
.hero-badges li {
  font-size: 0.8125rem; color: var(--text-dim);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
}

@media (min-width: 820px) {
  .hero { padding: 3.5rem 0 3rem; }
}

/* A small in-page jump nav for the marketing sections. */
.section-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }

/* No motion allowed: drop the video and show its poster as a still backdrop. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-bg {
    background: url("../img/logo_placeholder_hero.6dcddc2865e5.png") center / cover no-repeat;
  }
}

/* --- Sections ----------------------------------------------------------- */

.section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--surface); border-radius: var(--radius-lg); padding-inline: 1.25rem; }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head .lede { margin-bottom: 0; }

@media (min-width: 820px) {
  .section { padding: 4.5rem 0; }
  .section-head { margin-bottom: 2.5rem; }
}

/* --- Bento grid --------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tile-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  aspect-ratio: 16 / 10;
}
.tile-media video,
.tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tile-body { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.tile-kicker {
  text-transform: uppercase; letter-spacing: 0.13em;
  font-size: 0.68rem; font-weight: 650; color: var(--purple-300);
  margin: 0 0 0.5rem;
}
.tile-title { font-size: 1.2rem; margin: 0 0 0.4rem; font-weight: 650; letter-spacing: -0.01em; }
.tile-text { color: var(--text-dim); font-size: 0.9375rem; margin: 0; }

.tile-accent {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.22), var(--shadow);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0.25rem 0 0; padding: 0; }
.chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 0.8125rem; color: var(--text-dim);
}
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--line-strong); color: var(--text); }

/* Tablet: two columns. */
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-3, .span-4, .span-6 { grid-column: span 2; }
}

/* Desktop: six columns, so tiles can be 1/6, 1/3, 1/2 or 2/3 wide. */
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-6 { grid-column: span 6; }
  .tile { padding: 1.6rem; }
}

/* --- Pricing ------------------------------------------------------------ */

.pricing { padding: 3rem 0; border-bottom: 1px solid var(--line); }

.plan-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.25rem; margin: 2rem 0 1rem;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 1.6rem;
}
.plan-featured {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 30px 70px -40px rgba(139, 92, 246, 0.9);
}
.plan-badge {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--purple-300); margin: 0 0 0.6rem; font-weight: 650;
}
.plan-price { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1rem; }
.pricing-note { margin-top: 1rem; }

@media (min-width: 700px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 820px) {
  .pricing { padding: 4.5rem 0; }
}

/* --- Closing ------------------------------------------------------------ */

.closing { padding: 3rem 0 3.5rem; }
.closing-inner { max-width: 640px; }

/* --- Cards and lists ---------------------------------------------------- */

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 1.5rem;
  display: flex; flex-direction: column;
}
.card h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.card .button { margin-top: auto; align-self: flex-start; }
/* A locked card is dimmed but still readable: the user needs to know what they
 * are missing in order to want it. */
.card-locked { opacity: 0.72; }

/* One MCP server on the account page. */
.mcp-card { margin: 1.5rem 0; }
.mcp-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.mcp-card .facts { margin-bottom: 1rem; }

.locked-reason { color: var(--warn); font-size: 0.9375rem; margin: 1rem 0 0; }

/* --- Apps list ---------------------------------------------------------- */
/* Each app is a row with an icon, its copy, and a single gradient action. The
 * gated features read as chips rather than full-width rows. */

/* Each app is its own card, with space between them, rather than one panel
 * split by dividers. */
.list.apps-list {
  border: 0;
  background: transparent;
  overflow: visible;
  display: grid;
  gap: 12px;
}
.apps-list .list-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.apps-list .list-row:hover { background: var(--card); }

.app-row { gap: 16px; padding: 18px 20px; cursor: default; }
.app-row .avatar { color: var(--purple-300); }
.app-row .list-row-main { display: flex; flex-direction: column; gap: 5px; }
.app-row .list-row-title { font-size: 16.5px; }

.app-features { margin: 6px 0 0; }
.app-features .chip { gap: 9px; }
.app-features .chip .state { color: var(--text-faint); font-size: 0.75rem; }
.app-features .chip.on .state { color: var(--ok); }
.app-features .chip.off { opacity: 0.9; }
.app-features .chip.off .state { color: var(--warn); }

.app-row .locked-reason { margin: 8px 0 0; }
.app-row .list-row-end .button { white-space: nowrap; }

.feature-states { list-style: none; margin: 1rem 0 1.25rem; padding: 0; font-size: 0.9375rem; }
.feature-states li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line);
}
.feature-states li:last-child { border-bottom: 0; }
.feature-states .state { color: var(--text-dim); font-size: 0.875rem; white-space: nowrap; }
.feature-states li.on .state { color: var(--ok); }
.feature-states li.off .state { color: var(--text-dim); }

/* --- Account page ------------------------------------------------------- */

/* Account sections: a consistent gap above each block, so a heading never
 * collides with the content above it. */
.acct-section { margin-top: 2.75rem; }
.acct-section > h2 { margin: 0 0 1rem; }
.acct-section > .page-lede { margin-top: 0; margin-bottom: 1.25rem; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; align-items: start; margin: 0; }

/* Cards in the account grid: a little more air, and the trailing control sits
 * on the right, vertically centred against the text. */
.setting-card { align-items: center; gap: 20px; padding: 18px 20px; }
.setting-card > .body > :first-child { margin-top: 0; }
.setting-card > .body > :last-child { margin-bottom: 0; }
.setting-card .button-row { flex: 0 0 auto; margin: 0; }

.facts { margin: 0.25rem 0 0.75rem; }
.facts dt { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-top: 1.15rem; }
.facts dd { margin: 0.3rem 0 0; }

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 1.25rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* The key-name field should not stretch across the whole pane. */
.key-create { align-items: center; }
.view-inner .key-create input[type="text"] { width: auto; min-width: 14rem; }

/* Danger card closes the page. */
.danger-card { border-color: rgba(229, 72, 77, 0.3); }
.danger-card h2 { margin-top: 0; color: var(--danger); }

.pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-2);
  font-size: 0.875rem; color: var(--text-dim);
}
/* A revoked key is a state the owner needs to notice, not a neutral label. */
.pill-warn { border-color: rgba(226, 163, 60, 0.4); color: var(--warn); }

.small-heading { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: 1.5rem 0 0.25rem; }

.table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9375rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.table th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-weight: 600; }

.danger-heading { color: var(--danger); margin-top: 3rem; }

.dev-login { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.5rem; }
.dev-login h2 { font-size: 1rem; color: var(--text-dim); }

/* Inputs mirror studio.css `.input`: `--surface`, `--line-strong`, and the
 * purple focus ring. */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 0.9375rem;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(124, 92, 230, 0.18);
}
::placeholder { color: var(--text-faint); }

label { color: var(--text-faint); font-size: 0.8125rem; }

/* --- Marketplace (stuff/) ----------------------------------------------- */
/* A persona's system prompt is shown verbatim, so it needs a surface that
 * keeps its line breaks and stays readable at any length. */
.prompt-box {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 32rem;
  overflow-y: auto;
}

/* --- Accessibility ------------------------------------------------------ */

:focus-visible { outline: 2px solid var(--purple-500); outline-offset: 2px; }

/* --- HaughtCity (city/) ------------------------------------------------- */
/* The forum. Markdown is rendered to HTML once on write and stored (see
 * city/rendering.py), so ``.md`` styles sanitised markup this project produced
 * rather than arbitrary user HTML -- but it is still written defensively:
 * nothing here assumes a tag is present, and a stray tag cannot escape the
 * block. */

/* A rendered post or comment. The block is capped so a line of prose stays
 * readable, and long words and code are allowed to wrap rather than forcing the
 * whole thread wider than the pane. */
.md {
  font-size: 0.9688rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 74ch;
  overflow-wrap: anywhere;
}
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 0.9rem; }
.md a { color: var(--purple-300); text-decoration: underline; text-underline-offset: 2px; }
.md strong { color: var(--text); font-weight: 650; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.md ul, .md ol { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.md li { margin: 0.2rem 0; }
.md blockquote {
  margin: 0 0 0.9rem;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--purple-500);
  color: var(--text-dim);
}
.md code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--card-3);
}
.md pre {
  margin: 0 0 0.9rem;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow-x: auto;
}
.md pre code { padding: 0; background: none; font-size: 0.85rem; line-height: 1.6; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.md table { width: 100%; border-collapse: collapse; margin: 0 0 0.9rem; font-size: 0.9rem; }
.md th, .md td { padding: 0.45rem 0.6rem; border: 1px solid var(--line); text-align: left; }
.md th { background: var(--surface); color: var(--text-dim); font-weight: 600; }

/* --- Forms -------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.field-label { color: var(--text-faint); font-size: 0.8125rem; }
.field-error { margin: 0; color: var(--danger); font-size: 0.8125rem; }

/* The composer and the opening post share one card surface. */
.composer,
.thread {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.composer textarea,
.reply-form textarea { min-height: 5rem; resize: vertical; }

.back-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.pager { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }

/* --- Threads ------------------------------------------------------------ */
.thread .md { margin-top: 0.5rem; }

.thread-row .list-row-title { font-size: 1.05rem; }

.thread-comments {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.comment {
  /* Nested comments are siblings in the DOM, indented by their stored depth
   * (``city.views._ordered_thread`` sets ``display_depth``). The multiplier
   * lives in a variable so the narrow-screen rule below only has to change the
   * step, not eleven depth rules. */
  --indent: 1.35rem;
  margin-left: calc(var(--indent) * var(--depth, 0));
  padding: 14px 0 14px 14px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line);
}
.comment.depth-1, .comment.depth-2, .comment.depth-3, .comment.depth-4,
.comment.depth-5, .comment.depth-6, .comment.depth-7, .comment.depth-8,
.comment.depth-9, .comment.depth-10 { border-left-color: var(--line-strong); }

/* The depth multiplier -- one rule per level, the value the template can emit
 * as a class name. ``--depth`` is set here so the single ``margin-left`` rule
 * above does the maths. */
.depth-0 { --depth: 0; }
.depth-1 { --depth: 1; }
.depth-2 { --depth: 2; }
.depth-3 { --depth: 3; }
.depth-4 { --depth: 4; }
.depth-5 { --depth: 5; }
.depth-6 { --depth: 6; }
.depth-7 { --depth: 7; }
.depth-8 { --depth: 8; }
.depth-9 { --depth: 9; }
.depth-10 { --depth: 10; }

@media (max-width: 720px) {
  .comment { --indent: 0.6rem; }
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
  font-size: 0.8125rem;
}
.comment-author { color: var(--text); font-weight: 600; }
.comment-sep { color: var(--text-faint); }

.comment-removed {
  margin: 0.25rem 0;
  color: var(--text-faint);
  font-style: italic;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
}

/* A collapsible action: the Reply and Flag forms stay folded until a reader
 * opens one, so a long thread is not a wall of text areas. No JavaScript --
 * <details>/<summary> is the native disclosure. */
.disclosure summary {
  list-style: none;
  cursor: pointer;
  color: var(--purple-300);
  user-select: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "+ "; }
.disclosure[open] > summary::before { content: "\2212 "; }
.disclosure[open] > summary { margin-bottom: 0.6rem; }
.disclosure .reply-form,
.disclosure .flag-form {
  margin-top: 0.5rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.disclosure .flag-form { max-width: 32rem; }
.danger-text { color: var(--danger); }

.reply-top { margin: 0 0 0.5rem; }

