/* Thingy — standalone stylesheet.
   Extracted verbatim from weekly.thingelstad.com/apps/site/css/style.css
   (design tokens + base + thingy-*/librarian-* rules). Phase A1 port. */

/* --- Reset, tokens, base typography (style.css 6-273) --- */
/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors — Refined palette */
  --color-bg: #fcfcfa;
  --color-surface: #ffffff;
  --color-surface-2: #f4f6fa;
  --color-text: #14181f;
  --color-text-soft: #3d4654;
  --color-text-muted: #7d8694;
  --color-accent: #1f6fd6;
  --color-accent-hover: #134d99;
  --color-accent-soft: #e1edff;
  --color-audio-accent: #c44d2b;
  --color-border: #e6ebf2;
  --color-border-light: #f0f3f8;
  --color-highlight: #fff3a8;
  --color-code-bg: #eef2f8;
  --shadow-subtle: 0 1px 2px rgba(20, 24, 31, 0.04);

  /* Design-token aliases (preferred for new rules) */
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --surface-2: var(--color-surface-2);
  --ink: var(--color-text);
  --ink-soft: var(--color-text-soft);
  --muted: var(--color-text-muted);
  --line: var(--color-border);
  --line-soft: var(--color-border-light);
  --accent: var(--color-accent);
  --accent-deep: var(--color-accent-hover);
  --accent-soft: var(--color-accent-soft);
  --highlight: var(--color-highlight);
  --code-bg: var(--color-code-bg);

  /* Typography */
  --serif: "Source Serif 4", "Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-body: var(--sans);
  --font-heading: var(--serif);
  --font-mono: var(--mono);
  --font-ui: var(--sans);

  /* Sizes */
  --size-base: 1.0625rem;
  --size-sm: 0.875rem;
  --size-xs: 0.75rem;
  --size-lg: 1.25rem;
  --size-xl: 1.5rem;
  --size-2xl: 2rem;
  --size-3xl: 2.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container-width: 48rem;
  --container-wide: 68rem;
  --sidebar-width: 14rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14181f;
    --color-surface: #1c2129;
    --color-surface-2: #232a35;
    --color-text: #e8ecf2;
    --color-text-soft: #b6bdc8;
    --color-text-muted: #8a93a0;
    --color-accent: #5fa0ec;
    --color-accent-hover: #8cbcf3;
    --color-accent-soft: rgba(95, 160, 236, 0.16);
    --color-audio-accent: #e07a5f;
    --color-border: #2c333e;
    --color-border-light: #232a35;
    --color-highlight: #3a3a1a;
    --color-code-bg: #232a35;
    --shadow-subtle: none;
  }
}

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

body {
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

em, i {
  font-style: italic;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  text-wrap: pretty;
}

h1 { font-size: var(--size-3xl); }
h2 { font-size: var(--size-2xl); }
h3 { font-size: var(--size-xl); }
h4 { font-size: var(--size-lg); }

p { margin-bottom: var(--space-md); }

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover { color: var(--color-accent-hover); }

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

blockquote ol,
blockquote ul {
  padding-left: 1.5rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--color-code-bg);
  padding: var(--space-lg);
  border-radius: 6px;
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: var(--size-sm);
}

th, td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

th {
  font-weight: 700;
  border-bottom-width: 2px;
}

/* --- Layout --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-accent);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  z-index: 1000;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: var(--size-sm);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Wide container variant (used by home, archive, issue, search, librarian) --- */
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Narrow container (issue hero, search hero, librarian) */
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Shared design tokens / chrome --- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 var(--space-sm);
}

/* --- Subscriber form fields (style.css 557-625) --- */
.subscribe-input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.subscribe-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.subscribe-input::placeholder {
  color: var(--muted);
}

.subscribe-button {
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.subscribe-button:hover {
  background: var(--accent);
}

.subscribe-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.subscribe-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.subscribe-field .subscribe-input {
  flex: none;
}

.subscribe-input.invalid {
  border-color: #c44d2b;
}

.subscribe-error {
  font-size: var(--size-xs);
  color: var(--color-audio-accent);
  margin-top: var(--space-xs);
  min-height: 0;
}

.subscribe-shell {
  width: 100%;
}

/* --- Thingy + Librarian UI, incl. form-note/message (style.css 3614-4323) --- */
.thingy-page { padding: 0 0 80px; }

.thingy-hero {
  padding: 48px 0 24px;
  text-align: center;
}
.thingy-hero-art {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.thingy-hero-thingy {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(31, 111, 214, 0.18));
}
.thingy-h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 12px 0 14px;
  color: var(--ink);
}
.thingy-h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.thingy-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.thingy-shell { padding-top: 16px; }
.thingy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px -32px rgba(40, 30, 20, 0.2);
}
.thingy-card-head {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.thingy-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
}
.thingy-card-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.thingy-card-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.thingy-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a8a5a;
  display: inline-block;
}
.thingy-card-tools {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.thingy-card:has(.librarian-chat:not([hidden])) .thingy-card-tools {
  display: inline-flex;
}
.thingy-card-tool {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.thingy-card-tool:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.thingy-foot-note {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
  letter-spacing: 0.04em;
}

/* Inner panel adjustments — strip the old border-top/padding now that
   the card supplies its own chrome. */
.librarian-auth.thingy-auth,
.librarian-chat.thingy-chat {
  border-top: none;
  padding: 22px;
}
.librarian-auth.thingy-auth { padding-top: 24px; }

.librarian-form {
  font-family: var(--font-ui);
}

.librarian-form label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--size-sm);
  font-weight: 700;
}

.librarian-auth-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
}

.librarian-form input,
.librarian-form textarea {
  width: 100%;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.librarian-form input.invalid {
  border-color: #c44d2b;
}

.librarian-form textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.5;
}

.librarian-form input:focus,
.librarian-form textarea:focus {
  outline: 2px solid var(--color-highlight);
  border-color: var(--color-accent);
}

/* Source-scope checkboxes under the question box. Reset the default
   fieldset chrome and lay the options out inline; override the
   width:100% / block-bold label rules above (equal specificity, so this
   must follow them in source order to win). */
.librarian-scope {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-sm) 0 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.librarian-scope label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: var(--size-sm);
  font-weight: 400;
  cursor: pointer;
}

.librarian-scope input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.librarian-form button,
.librarian-prompts button {
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-accent);
  color: #fff;
  padding: 0.8rem 1rem;
  font: 700 var(--size-sm) / 1 var(--font-ui);
  cursor: pointer;
}

.librarian-form button:hover,
.librarian-prompts button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.librarian-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.librarian-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.librarian-auth-actions[hidden],
.librarian-auth-actions button[hidden] {
  display: none;
}

.librarian-email-error {
  display: block;
}

.librarian-chat-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-md);
}

.librarian-chat-tools button {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.55rem 0.75rem;
  font: 700 var(--size-sm) / 1 var(--font-ui);
  cursor: pointer;
}

.librarian-chat-tools button:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.form-note {
  margin-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: var(--size-sm);
}

.form-message {
  min-height: 1.4em;
  margin-top: var(--space-sm);
  color: var(--color-accent);
  font-size: var(--size-sm);
  font-weight: 700;
}

.librarian-messages {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.librarian-message {
  max-width: 44rem;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: var(--space-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-subtle);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.librarian-message-pending {
  border-color: var(--color-highlight);
}

.librarian-message p:last-child {
  margin-bottom: 0;
}

.librarian-message h2,
.librarian-message h3,
.librarian-message h4 {
  margin: var(--space-sm) 0 var(--space-xs);
  font-family: var(--font-sans);
  font-size: var(--size-base);
  line-height: 1.3;
}

.librarian-message ul,
.librarian-message ol {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-lg);
}

.librarian-message li {
  margin-bottom: var(--space-xs);
}

.librarian-message blockquote {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-border);
  color: var(--color-text-muted);
}

.librarian-message code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--color-accent-soft);
  font-size: 0.92em;
}

.librarian-message-user {
  justify-self: end;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  border-bottom-right-radius: 2px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
}
.librarian-message-user p { color: #fff; }
.librarian-message-user a { color: #fff; text-decoration: underline; }
.librarian-message-assistant {
  background: var(--surface-2);
  border-color: var(--line);
  border-bottom-left-radius: 2px;
}

.librarian-message-system {
  color: var(--color-text-muted);
}

.librarian-status-line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-muted);
}

.librarian-thinking-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 rgba(42, 103, 180, 0.35);
  animation: librarian-pulse 1.35s ease-in-out infinite;
}

@keyframes librarian-pulse {
  0% {
    transform: scale(0.86);
    box-shadow: 0 0 0 0 rgba(42, 103, 180, 0.32);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 0.55rem rgba(42, 103, 180, 0);
  }
  100% {
    transform: scale(0.86);
    box-shadow: 0 0 0 0 rgba(42, 103, 180, 0);
  }
}

.librarian-feedback {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
}

.librarian-feedback-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.librarian-feedback button {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.librarian-feedback button:hover,
.librarian-feedback button.selected {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.librarian-feedback button:hover {
  transform: translateY(-1px);
}

.librarian-feedback button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.librarian-share-anchor {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: 0.7em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 140ms ease, color 140ms ease;
  vertical-align: baseline;
}
@media (hover: none) {
  .librarian-share-anchor { opacity: 0.55; }
}
.librarian-message-user:hover .librarian-share-anchor,
.librarian-message-user:focus-within .librarian-share-anchor {
  opacity: 1;
}
.librarian-share-anchor:hover {
  color: #fff;
}
.librarian-share-anchor:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
  opacity: 1;
}
.librarian-share-anchor[data-kind="success"] {
  color: #fff;
  opacity: 1;
}
.librarian-share-anchor[data-kind="error"] {
  color: #ffd7d2;
  opacity: 1;
}

.librarian-feedback-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-left: 4px;
  min-width: 0;
}
.librarian-feedback-status:empty { display: none; }

.librarian-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  min-height: 2.75rem;
}

.librarian-prompts[hidden] {
  display: none;
}

.librarian-prompts span {
  color: var(--color-text-muted);
  font: 700 var(--size-sm) / 1.4 var(--font-ui);
}

.librarian-prompts button {
  background: transparent;
  color: var(--color-accent);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.librarian-prompts button:hover {
  color: #fff;
  transform: translateY(-1px);
}

.librarian-prompts-loading span::after {
  display: inline-block;
  width: 1.4em;
  content: "";
  animation: librarian-loading-dots 1.2s steps(4, end) infinite;
}

@keyframes librarian-loading-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}

.librarian-beta-open {
  overflow: hidden;
}

.librarian-beta-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--space-lg);
  background: rgba(31, 38, 32, 0.48);
}

.librarian-beta-overlay[hidden] {
  display: none;
}

.librarian-beta-modal {
  width: min(100%, 32rem);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-xl);
  background: var(--color-surface);
  box-shadow: 0 1.4rem 4rem rgba(31, 38, 32, 0.22);
}

.librarian-beta-modal h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--size-2xl);
  line-height: 1.2;
}

.librarian-beta-modal p {
  color: var(--color-text-muted);
}

.librarian-beta-modal button {
  margin-top: var(--space-sm);
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-accent);
  color: #fff;
  padding: 0.8rem 1rem;
  font: 700 var(--size-sm) / 1 var(--font-ui);
  cursor: pointer;
}

.librarian-beta-modal button:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.librarian-question-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: end;
}

.librarian-question-form textarea {
  grid-column: 1;
  grid-row: 1;
  overflow-y: auto;
}

.librarian-question-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: var(--space-xs);
}

.librarian-question-actions button {
  min-width: 4.25rem;
}

.librarian-question-form .librarian-clear-button {
  background: transparent;
  color: var(--color-accent);
}

.librarian-question-form .librarian-clear-button:hover {
  color: #fff;
}

.librarian-question-form.is-busy button:disabled {
  cursor: wait;
}

.librarian-question-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: flex-end;
  min-height: 1.2rem;
  color: var(--color-text-muted);
  font: 700 var(--size-xs) / 1 var(--font-ui);
}

.librarian-question-meta .warning {
  color: #a84f2a;
}

.librarian-citations {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
}

.librarian-citations h2 {
  margin: 0 0 var(--space-sm);
  font-size: var(--size-base);
}

.librarian-citations ul {
  list-style: none;
  padding: 0;
}

.librarian-citations li {
  margin-bottom: var(--space-xs);
  font-size: var(--size-sm);
}

.librarian-citations span {
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .librarian-header {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .librarian-header-copy {
    max-width: none;
  }

  .librarian-persona {
    justify-self: center;
    width: min(15rem, 72vw);
  }

  .librarian-auth-row,
  .librarian-question-form {
    grid-template-columns: 1fr;
  }

  .librarian-message {
    max-width: 100%;
  }

  .librarian-question-form textarea,
  .librarian-question-actions,
  .librarian-question-meta {
    grid-column: 1;
  }

  .librarian-question-actions {
    grid-row: 3;
    width: 100%;
  }

  .librarian-question-actions button {
    flex: 1 1 0;
  }
}

/* --- Standalone footer: Tinylytics hit counter + visitor countries.
   Not in the source page; specific to thingy.thingelstad.com. --- */
.thingy-site-foot {
  margin-top: 56px;
  padding: 22px 0 4px;
  border-top: 1px solid var(--line-soft);
}
/* Only reveal the footer once Tinylytics has populated the hit count — keeps
   it hidden on localhost (script self-disables) and if the script is blocked,
   instead of showing a bare "views ·". Degrades safely where :has is absent. */
.thingy-site-foot:has(.tinylytics_hits:empty) {
  display: none;
}
.thingy-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.thingy-stats .tinylytics_hits {
  font-weight: 600;
  color: var(--ink-soft);
}
.thingy-stats-sep {
  opacity: 0.45;
}
.thingy-stats .tinylytics_countries {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
