/* Shurah (shurah.org) — V19 Clean-Slate Mobile-First 5-Button Command Bar & Desktop Rail CSS
 * Colour palette sampled from Norwegian Eurasian Magpie (Pica pica / Sjura) plumage & fjord timber.
 */
:root {
  color-scheme: light dark;
  --sjura-obsidian: #14181F;
  --sjura-charcoal-beak: #252B34;
  --sjura-snow-belly: #F8FAFC;
  --sjura-wing-cobalt: #1E4E8C;
  --sjura-wing-shimmer: #3B76B8;
  --sjura-wing-petrol: #1B5E68;
  --sjura-tail-emerald: #1E4D3B;
  --sjura-fjord-mist: #EBF2F7;
  --sjura-timber-rail: #8C7355;
  --sjura-birch-gold: #D99B26;

  --sjura-night-bg: #0D1219;
  --sjura-night-surface: #151D28;
  --sjura-night-elevated: #1D2837;
  --sjura-night-border: #2C3C52;
  --sjura-night-shimmer: #4B8FD8;

  --ds-color-accent-base: var(--sjura-wing-cobalt);
  --ds-color-accent-hover: #163E70;
  --ds-color-surface-bg: #F3F7FB;
  --ds-color-surface-default: #FFFFFF;
  --ds-color-surface-subtle: #EDF3F8;
  --ds-color-text-default: var(--sjura-obsidian);
  --ds-color-text-subtle: #3E4C5E;
  --ds-color-border-strong: #8A9EB5;
  --ds-color-border-subtle: #D5E0EC;
  --ds-color-focus: var(--sjura-birch-gold);
  --ds-shadow-card: 0 4px 20px -2px rgba(20, 24, 31, 0.06), 0 1px 4px -1px rgba(20, 24, 31, 0.04);
  --ds-shadow-drawer: 0 12px 32px -4px rgba(20, 24, 31, 0.14);

  --pica-canvas: var(--ds-color-surface-bg);
  --pica-surface: var(--ds-color-surface-default);
  --pica-timber: var(--sjura-timber-rail);
  --pica-ink: var(--ds-color-text-default);
  --pica-cobalt: var(--sjura-wing-cobalt);
  --pica-emerald: var(--sjura-tail-emerald);
  --pica-amber: var(--sjura-birch-gold);
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ds-color-accent-base: var(--sjura-night-shimmer);
  --ds-color-accent-hover: #64A2E6;
  --ds-color-surface-bg: var(--sjura-night-bg);
  --ds-color-surface-default: var(--sjura-night-surface);
  --ds-color-surface-subtle: var(--sjura-night-elevated);
  --ds-color-text-default: #F1F5F9;
  --ds-color-text-subtle: #A3B4C8;
  --ds-color-border-strong: #3E536E;
  --ds-color-border-subtle: var(--sjura-night-border);
  --ds-color-focus: #F5B841;
  --ds-shadow-card: 0 8px 28px -4px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --ds-shadow-drawer: 0 16px 36px -4px rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]),
  [data-theme="auto"] {
    --ds-color-accent-base: var(--sjura-night-shimmer);
    --ds-color-accent-hover: #64A2E6;
    --ds-color-surface-bg: var(--sjura-night-bg);
    --ds-color-surface-default: var(--sjura-night-surface);
    --ds-color-surface-subtle: var(--sjura-night-elevated);
    --ds-color-text-default: #F1F5F9;
    --ds-color-text-subtle: #A3B4C8;
    --ds-color-border-strong: #3E536E;
    --ds-color-border-subtle: var(--sjura-night-border);
    --ds-color-focus: #F5B841;
    --ds-shadow-card: 0 8px 28px -4px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
    --ds-shadow-drawer: 0 16px 36px -4px rgba(0, 0, 0, 0.65);
  }
}

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

[x-cloak]:not(body) {
  display: none;
}

html,
body {
  overflow-x: hidden;
  min-height: 100dvh;
}

body {
  background-color: var(--ds-color-surface-bg);
  color: var(--ds-color-text-default);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--ds-font-size-base, 18px);
  line-height: 1.5;
  margin: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
}

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

.skip-link {
  position: fixed;
  inset-block-start: -120px;
  inset-inline-start: 12px;
  z-index: 200;
  background: var(--ds-color-accent-base);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  inset-block-start: 8px;
}

/* Sticky Topbar (<= 48px on mobile) */
.shurah-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.85rem;
  min-block-size: 44px;
  background: var(--ds-color-surface-default);
  border-bottom: 1px solid var(--ds-color-border-subtle);
  box-shadow: var(--ds-shadow-card);
}

.shurah-brand-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.shurah-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.shurah-brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.shurah-brand-title-row h1 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
}

#shurah-subtitle {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ds-color-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--ds-color-surface-subtle);
  color: var(--ds-color-accent-base);
  border: 1px solid var(--ds-color-border-strong);
}

.shurah-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Welcome Banner */
#shurah-top-banner {
  background: var(--ds-color-surface-subtle);
  border-bottom: 1px solid var(--ds-color-border-subtle);
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Responsive Shell: 220px Desktop Rail + Single Main Column */
.shurah-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.9rem 1rem 2rem;
}

.shurah-desktop-rail {
  position: sticky;
  top: 3.6rem;
  align-self: start;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--ds-color-surface-default);
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 12px;
  padding: 0.7rem;
  box-shadow: var(--ds-shadow-card);
}

.rail-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  border-inline-start: 4px solid transparent;
  background: transparent;
  color: var(--ds-color-text-default);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
  text-decoration: none;
}

.rail-btn:hover {
  background: var(--ds-color-surface-subtle);
}

.rail-btn[aria-current="page"] {
  background: var(--ds-color-surface-subtle);
  border-color: var(--ds-color-border-subtle);
  border-inline-start-color: var(--ds-color-accent-base);
  font-weight: 800;
  color: var(--ds-color-accent-base);
}

.rail-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ds-color-text-subtle);
  margin: 0.45rem 0 0.15rem;
}

.rail-locale-row {
  display: flex;
  gap: 0.25rem;
}

.rail-locale-row .kinetisk-btn {
  flex: 1 1 0;
  min-height: 36px;
  padding: 0.25rem 0.35rem;
  font-size: 0.78rem;
}

.shurah-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.kinetisk-card {
  background: var(--ds-color-surface-default);
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  box-shadow: var(--ds-shadow-card);
  min-width: 0;
}

/* Shared Buttons, Badges & Form Controls */
.kinetisk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--ds-color-border-strong);
  border-radius: 8px;
  background: var(--ds-color-surface-default);
  color: var(--ds-color-text-default);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.kinetisk-btn:hover {
  background: var(--ds-color-surface-subtle);
}

.kinetisk-btn.is-active {
  background: var(--ds-color-accent-base);
  color: #ffffff;
  border-color: var(--ds-color-accent-base);
}

.kinetisk-btn.btn-sm {
  min-height: 36px;
  min-width: 36px;
  padding: 0.3rem 0.6rem;
  font-size: 0.84rem;
}

.accent-btn {
  background: var(--ds-color-accent-base);
  color: #ffffff;
  border-color: var(--ds-color-accent-base);
}

.accent-btn:hover {
  background: var(--ds-color-accent-hover);
}

.danger-btn {
  color: #b91c1c;
  border-color: #fca5a5;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--ds-color-surface-subtle);
  color: var(--ds-color-text-default);
  border: 1px solid var(--ds-color-border-subtle);
}

.bot-badge {
  background: #ede9fe;
  color: #4c1d95;
  border-color: #c4b5fd;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
}

.field label {
  font-weight: 700;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ds-color-border-strong);
  border-radius: 8px;
  background: var(--ds-color-surface-default);
  color: var(--ds-color-text-default);
  font: inherit;
}

textarea {
  min-height: 72px;
}

input:user-invalid,
textarea:user-invalid,
select:user-invalid {
  border-color: #dc2626;
}

.hint { font-size: 0.84rem; color: var(--ds-color-text-subtle); }
.error-text { color: #b91c1c; font-weight: 700; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-md { display: flex; flex-direction: column; gap: 0.85rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.grow-1 { flex: 1 1 0; min-width: 0; }
.heading-flush { margin-top: 0; }
.heading-mt { margin-top: 1.25rem; }
.mb-sm { margin-bottom: 0.65rem; }
.mb-md { margin-bottom: 1rem; }

/* Channel, Topic, Message Stream & Mailing List */
.channel-nav,
.channel-subtabs,
.topic-nav,
.kinetisk-nav,
.kinetisk-3tab-nav,
.wiki-talk-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.stream-scroll-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.messages-container,
#search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 2.5rem;
  overflow-wrap: anywhere;
}

.message-item {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: var(--ds-color-surface-default);
  max-width: 65ch;
  overflow-wrap: anywhere;
}

.message-item.is-highlighted {
  border-color: var(--ds-color-focus);
  box-shadow: 0 0 0 2px var(--ds-color-focus);
}

.message-item.is-reply {
  margin-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--ds-color-accent-base);
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.reply-context-chip,
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: var(--ds-color-surface-subtle);
  color: var(--ds-color-text-subtle);
  border: 1px solid var(--ds-color-border-subtle);
}

.faq-accepted-box {
  margin-top: 0.45rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border-inline-start: 4px solid var(--sjura-tail-emerald);
  background: var(--ds-color-surface-subtle);
  font-size: 0.88rem;
}

.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 32px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--ds-color-border-subtle);
  background: var(--ds-color-surface-subtle);
  color: var(--ds-color-text-default);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.approval-banner {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fef3c7;
  color: #14181F;
  border: 1px solid #f59e0b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wiki-card,
.passkey-login-box,
.passkey-management-box {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: var(--ds-color-surface-default);
  overflow-wrap: anywhere;
}

.wiki-body.markdown-prose {
  white-space: normal;
  max-width: 65ch;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.feed-item {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: var(--ds-color-surface-default);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.search-hit-btn {
  text-align: start;
  width: 100%;
  justify-content: flex-start;
}

mark.shurah-hit {
  background: #fde047;
  color: #14181F;
  padding: 0 0.18rem;
  border-radius: 3px;
}

/* Mutt / Alpine Mailing-List View */
.mail-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.75rem;
}

.mail-index-wrap {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 8px;
  overflow: auto;
  max-height: 62dvh;
}

.mail-index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mail-index-table th,
.mail-index-table td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid var(--ds-color-border-subtle);
  text-align: start;
}

.mail-index-table tr.is-active {
  background: var(--ds-color-surface-subtle);
  font-weight: 700;
}

.mail-pager {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 8px;
  padding: 0.85rem;
  background: var(--ds-color-surface-default);
  overflow-wrap: anywhere;
}

.mail-headers-disclosure {
  margin: 0.4rem 0 0.75rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 6px;
  background: var(--ds-color-surface-subtle);
  font-size: 0.82rem;
}

.mail-quote-d1 {
  border-inline-start: 3px solid var(--sjura-wing-petrol);
  padding-inline-start: 0.65rem;
  color: var(--ds-color-text-subtle);
  margin: 0.35rem 0;
}

/* Avatars & Deterministic Color Classes (zero inline styles) */
.shurah-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.82rem;
}

.shurah-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
}

.shurah-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shurah-avatar-fallback {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.avatar-c0 { background: #1E4E8C; color: #ffffff; }
.avatar-c1 { background: #1B5E68; color: #ffffff; }
.avatar-c2 { background: #1E4D3B; color: #ffffff; }
.avatar-c3 { background: #7A4E1D; color: #ffffff; }
.avatar-c4 { background: #5B326B; color: #ffffff; }
.avatar-c5 { background: #8C2F39; color: #ffffff; }
.avatar-c6 { background: #252B34; color: #ffffff; }
.avatar-c7 { background: #2D5A7B; color: #ffffff; }

/* Poll Progress Bars (.poll-w-0 .. .poll-w-100) */
.poll-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--ds-color-surface-subtle);
  overflow: hidden;
  margin-top: 0.25rem;
}

.poll-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ds-color-accent-base);
  transition: width 0.2s ease;
}

.poll-w-0 { width: 0%; } .poll-w-1 { width: 1%; } .poll-w-2 { width: 2%; } .poll-w-3 { width: 3%; } .poll-w-4 { width: 4%; } .poll-w-5 { width: 5%; } .poll-w-6 { width: 6%; } .poll-w-7 { width: 7%; } .poll-w-8 { width: 8%; } .poll-w-9 { width: 9%; }
.poll-w-10 { width: 10%; } .poll-w-11 { width: 11%; } .poll-w-12 { width: 12%; } .poll-w-13 { width: 13%; } .poll-w-14 { width: 14%; } .poll-w-15 { width: 15%; } .poll-w-16 { width: 16%; } .poll-w-17 { width: 17%; } .poll-w-18 { width: 18%; } .poll-w-19 { width: 19%; }
.poll-w-20 { width: 20%; } .poll-w-21 { width: 21%; } .poll-w-22 { width: 22%; } .poll-w-23 { width: 23%; } .poll-w-24 { width: 24%; } .poll-w-25 { width: 25%; } .poll-w-26 { width: 26%; } .poll-w-27 { width: 27%; } .poll-w-28 { width: 28%; } .poll-w-29 { width: 29%; }
.poll-w-30 { width: 30%; } .poll-w-31 { width: 31%; } .poll-w-32 { width: 32%; } .poll-w-33 { width: 33%; } .poll-w-34 { width: 34%; } .poll-w-35 { width: 35%; } .poll-w-36 { width: 36%; } .poll-w-37 { width: 37%; } .poll-w-38 { width: 38%; } .poll-w-39 { width: 39%; }
.poll-w-40 { width: 40%; } .poll-w-41 { width: 41%; } .poll-w-42 { width: 42%; } .poll-w-43 { width: 43%; } .poll-w-44 { width: 44%; } .poll-w-45 { width: 45%; } .poll-w-46 { width: 46%; } .poll-w-47 { width: 47%; } .poll-w-48 { width: 48%; } .poll-w-49 { width: 49%; }
.poll-w-50 { width: 50%; } .poll-w-51 { width: 51%; } .poll-w-52 { width: 52%; } .poll-w-53 { width: 53%; } .poll-w-54 { width: 54%; } .poll-w-55 { width: 55%; } .poll-w-56 { width: 56%; } .poll-w-57 { width: 57%; } .poll-w-58 { width: 58%; } .poll-w-59 { width: 59%; }
.poll-w-60 { width: 60%; } .poll-w-61 { width: 61%; } .poll-w-62 { width: 62%; } .poll-w-63 { width: 63%; } .poll-w-64 { width: 64%; } .poll-w-65 { width: 65%; } .poll-w-66 { width: 66%; } .poll-w-67 { width: 67%; } .poll-w-68 { width: 68%; } .poll-w-69 { width: 69%; }
.poll-w-70 { width: 70%; } .poll-w-71 { width: 71%; } .poll-w-72 { width: 72%; } .poll-w-73 { width: 73%; } .poll-w-74 { width: 74%; } .poll-w-75 { width: 75%; } .poll-w-76 { width: 76%; } .poll-w-77 { width: 77%; } .poll-w-78 { width: 78%; } .poll-w-79 { width: 79%; }
.poll-w-80 { width: 80%; } .poll-w-81 { width: 81%; } .poll-w-82 { width: 82%; } .poll-w-83 { width: 83%; } .poll-w-84 { width: 84%; } .poll-w-85 { width: 85%; } .poll-w-86 { width: 86%; } .poll-w-87 { width: 87%; } .poll-w-88 { width: 88%; } .poll-w-89 { width: 89%; }
.poll-w-90 { width: 90%; } .poll-w-91 { width: 91%; } .poll-w-92 { width: 92%; } .poll-w-93 { width: 93%; } .poll-w-94 { width: 94%; } .poll-w-95 { width: 95%; } .poll-w-96 { width: 96%; } .poll-w-97 { width: 97%; } .poll-w-98 { width: 98%; } .poll-w-99 { width: 99%; }
.poll-w-100 { width: 100%; }

/* Native Top-Layer Dialog Action Sheet (no bare dialog display override) */
dialog[open],
#shurah-action-dialog[open] {
  display: grid;
  margin: auto;
  padding: 0;
  width: min(92vw, 34rem);
  max-height: 85dvh;
  border: 1px solid var(--ds-color-border-strong);
  border-radius: 14px;
  background: var(--ds-color-surface-default);
  color: var(--ds-color-text-default);
  box-shadow: var(--ds-shadow-drawer);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.55);
}

.dialog-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
}

.dialog-form {
  display: grid;
  gap: 0.65rem;
}

.revision-history-drawer {
  display: grid;
  gap: 0.5rem;
  max-height: 50dvh;
  overflow-y: auto;
}

.revision-entry {
  border: 1px solid var(--ds-color-border-subtle);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: var(--ds-color-surface-subtle);
}

.passkey-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0;
}

.passkey-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ds-color-border-subtle);
}

/* Mobile 5-Button Command Bar (hidden on desktop >= 769px) */
.shurah-bottom-nav {
  display: none;
}

.shurah-cmd-btn {
  flex: 1 1 0;
  min-width: 44px;
  min-block-size: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  border-top: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ds-color-text-default);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
}

.shurah-cmd-btn[aria-current="page"] {
  border-top-color: var(--ds-color-accent-base);
  background: var(--ds-color-surface-subtle);
  color: var(--ds-color-accent-base);
  font-weight: 800;
}

/* Screen Transition Animations */
@keyframes shurah-slide-next {
  from { opacity: 0.65; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes shurah-slide-prev {
  from { opacity: 0.65; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-next {
  animation: shurah-slide-next 0.18s ease-out;
}

.slide-prev {
  animation: shurah-slide-prev 0.18s ease-out;
}

.heading-flush { margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row-wrap, .stream-reorg-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.poll-bar-track { height: 0.65rem; border-radius: 999px; background: var(--ds-color-surface-subtle); overflow: hidden; border: 1px solid var(--ds-color-border-subtle); }
.field-error-msg { display: none; color: #b91c1c; font-weight: 600; }
[aria-invalid="true"] ~ .field-error-msg { display: block; }
.action-menu-dropdown { margin-top: 0.5rem; padding: 0.65rem; border: 1px solid var(--ds-color-border-subtle); border-radius: 8px; background: var(--ds-color-surface-default); display: flex; flex-direction: column; gap: 0.45rem; }
.kode-boks { padding: 0.85rem 1rem; border: 2px solid var(--ds-color-accent-base); border-radius: 8px; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.08em; text-align: center; margin-top: 0.65rem; }

/* Mobile Viewport <= 768px: Content-First <= 160px & Fixed <= 68px 5-Button Bottom Command Bar */
@media (max-width: 768px) {
  html { scroll-padding-bottom: 84px; }
  button, input, textarea, select, a { scroll-margin-bottom: 84px; }
  .shurah-desktop-rail, .shurah-pier-nav, #panel-prat .thread-header-row, #thread-top-anchor .breadcrumb, #thread-top-anchor .channel-purpose-hint, #tittel-prat, #panel-prat .chat-lead,
  #panel-prat .view-lead, #org-switcher, #panel-prat .faq-filter-bar, #tittel-kunnskap,
  #tittel-wiki, #panel-kunnskap .wiki-lead, #panel-kunnskap .chat-lead, #panel-kunnskap .view-lead,
  #panel-kunnskap .wiki-toc, #tittel-sok, .search-lead, #sok-hint, .mail-kbd-hint { display: none; }
  label[for="sok-felt"] { position: absolute; inset-inline-start: -9999px; }
  .shurah-topbar { min-block-size: 38px; max-height: 48px; padding: 2px 6px; overflow: hidden; }
  .shurah-topbar-center { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; min-width: 0; }
  .shurah-topbar .kinetisk-btn.btn-sm { min-height: 30px; padding: 2px 6px; font-size: 0.74rem; white-space: nowrap; }
  .shurah-brand-title-row h1 { font-size: 0.94rem; }
  #shurah-subtitle { max-width: 155px; font-size: 0.68rem; }
  .shurah-shell { grid-template-columns: minmax(0, 1fr); padding: 2px 0.45rem calc(74px + env(safe-area-inset-bottom, 0px)); gap: 0.25rem; }
  .kinetisk-card { padding: 0.25rem 0.45rem; border-radius: 10px; }
  #panel-kanaler, #panel-wiki, #panel-sok { display: flex; flex-direction: column; gap: 0.15rem; }
  #panel-prat .channel-nav, #panel-prat .channel-subtabs, #panel-prat .topic-nav, #panel-kunnskap .wiki-talk-tabs, #panel-kunnskap .wiki-article-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0.25rem; margin: 0 0 2px; }
  #panel-prat .channel-nav .kinetisk-btn, #panel-prat .channel-subtabs .kinetisk-btn, #panel-prat .topic-nav .kinetisk-btn, #panel-kunnskap .wiki-talk-tabs .kinetisk-btn, #panel-kunnskap .wiki-article-nav .kinetisk-btn { min-height: 26px; padding: 1px 7px; font-size: 0.74rem; white-space: nowrap; flex-shrink: 0; }
  .mail-status-bar { margin: 0 0 2px; padding: 2px 6px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; font-size: 0.74rem; white-space: nowrap; }
  .mail-status-bar .kinetisk-btn.btn-sm { min-height: 24px; padding: 1px 6px; font-size: 0.72rem; white-space: nowrap; }
  .search-field-bar { margin: 0 0 2px; gap: 0.2rem; }
  #sok-felt { min-height: 36px; padding: 4px 8px; }
  #guest-readonly-banner, .guest-compact-banner { order: 99; margin: 0.2rem 0 0; }
  #thread-top-anchor { order: 98; margin: 2px 0 0; padding: 0; border: 0; background: transparent; }
  #thread-top-anchor .thread-nav-bar { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0; }
  #thread-top-anchor .thread-nav-bar .kinetisk-btn.btn-sm { min-height: 26px; padding: 1px 7px; font-size: 0.74rem; white-space: nowrap; flex-shrink: 0; }
  .mail-split { grid-template-columns: minmax(0, 1fr); }
  .is-hidden-mobile { display: none; }
  .shurah-cmd-btn, .shurah-bottom-nav button { min-width: 48px; min-height: 44px; flex: 1 1 0; }

  .shurah-bottom-nav {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 80;
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-block-size: 52px;
    max-height: 68px;
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom, 0px));
    background: var(--ds-color-surface-default);
    border-top: 1px solid var(--ds-color-border-strong);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  }
}
