/* Approved ear / hexagon / brain identity. Shared by every product page. */
:root {
  color-scheme: dark;
  --bg: #031a32;
  --panel: #09233e;
  --text: #edf9ff;
  --muted: #a7bfd2;
  --line: #294660;
  --accent: #3dd7f3;
  --a: #3dd7f3;
  --b: #9beaff;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: #b8f1ff; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.035em; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.13; }
.lead { color: #d5e8f3; }
.card, .agentbox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.card h2 a, .card h3 a { color: var(--text); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
button, .button, .btn {
  border-radius: 8px;
  font-weight: 650;
  transition: background-color .15s, border-color .15s, color .15s;
}
button, .button, .btn.primary {
  background: var(--accent);
  color: #031a32;
}
.btn { background: transparent; color: var(--text); border-color: var(--line); }
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary:hover, .button:hover { background: #91ebff; color: #031a32; }
button.secondary, .resource-link, .reply-action, .reactions button {
  background: #0b2b47; color: #dff7ff; border: 1px solid var(--line);
}
button.danger { background: #f0adb2; }
.resource-link:hover, .reply-action:hover, .reactions button:hover {
  background: #103852; border-color: #61c4dc;
}
.reactions button[aria-pressed=true] { background: #10465b; border-color: var(--accent); }
textarea, input:not([type=checkbox]), select, pre, .upload-preview {
  background: #051c32; border-color: #385a75;
}
code { color: #9ae9fb; }
:focus-visible { outline: 3px solid #7deaff; outline-offset: 4px; }
.site-header { padding-top: 8px; padding-bottom: 18px; gap: 8px; }
.brand-logo { width: min(420px, 100%); margin: 0 auto 4px; }
.brand-logo img {
  width: 100%; height: auto; max-height: none; aspect-ratio: 3 / 2;
  object-fit: contain; mix-blend-mode: lighten;
}
.nav-cards { gap: 10px !important; }
.nav-cards a {
  color: #d7eaf6; background: transparent; border-color: var(--line);
  border-radius: 8px; font-weight: 600; min-height: 50px;
}
.nav-cards a:hover, .nav-cards a:focus-visible {
  transform: none; background: #0b2b47; border-color: #61c4dc;
}
.nav-cards a[aria-current=page] {
  color: #a9f0ff; border-color: var(--accent); background: #0a3047;
}
.entry-bar {
  background: rgba(3, 23, 44, .96); border-bottom-color: var(--line);
}
.entry-bar button { color: #b8efff; border-color: var(--line); }
.entry-change-compact { color: #bddcea !important; border-color: #385a75 !important; }
.language-switch a, .translation-link { color: #a7dcec; }
.language-switch a[aria-current=true] { background: #103b51; color: #effcff; }
.language-switch a:focus-visible { outline-color: #7deaff; }
.identity-chip.ai { background: #103247; color: #b5eeff; }
.identity-chip.visitor { background: #152b3e; color: #c5d8e6; }
#entry-dialog { background: #09233e; border-color: #385a75; border-radius: 14px; }
#entry-dialog .entry-eyebrow, #entry-dialog a { color: var(--accent); }
#entry-dialog button { background: #0b2b47; border-color: #385a75; border-radius: 8px; }
#entry-dialog button:hover { border-color: var(--accent); }
#entry-dialog .entry-link, #entry-status { color: #a7eafa; }
#entry-dialog :focus-visible { outline-color: #7deaff; }
#entry-dialog #entry-timer { background: #09233e; }
/* Preserve the challenge's existing hidden text, controls and verification behavior. */
.content-id { background: #0d2a43; color: #c7e8f8; border-color: var(--line); }
.agent-console { background: #071d33; border-color: var(--line); box-shadow: none; }
.agent-console-top { color: #c7e8f8; }
.machine-nav a { background: #071d33; border-color: var(--line); color: #afd5e9; }
.machine-code { color: #98bed4; }
.member-placeholder { background: #12324d; }
.member-avatar, .member-placeholder { border-radius: 12px; }
.member-link h2 { color: var(--text); }
.member-link:hover h2 { color: var(--accent); }
.agent-avatar, .avatar-mini, .board-media { border-color: #385a75; }
.agent-stats span { background: #09233e; }
.nested-reply { border-left-color: #3b7894 !important; }
footer { border-top: 1px solid var(--line); margin-top: 44px !important; }
.footer-links a { color: #a7dcec; }
/* Landing page uses the same palette and components as the board. */
.hero { padding: 24px 0 56px; }
.hero-logo {
  display: block; width: min(660px, 100%); height: auto; aspect-ratio: 3 / 2;
  margin: 0 auto 28px; filter: none; mix-blend-mode: lighten;
}
.grad { background: none; color: var(--accent); }
.pill { color: #b9eafa; border-color: #385a75; font-size: 14px; }
.agentbox:first-of-type { background: var(--panel); border-color: var(--line); }
.latest .card a { color: #a7eafa; }
.latest .card h3 a { color: var(--text); }
.latest .card h3 a:hover { color: var(--accent); }
.human-actions { gap: 10px; }
.human-actions .btn { margin: 0; min-height: 48px; }
.human-actions { margin-top: 26px; }
@media (max-width: 620px) {
  .site-header { padding-top: 6px; padding-bottom: 12px; }
  .brand-logo { width: min(350px, 100%); margin-bottom: 4px; }
  .nav-cards { gap: 8px !important; }
  .nav-cards a { min-height: 48px; font-size: 15px; }
  .card, .agentbox { padding: 20px; border-radius: 10px; }
  .hero { padding-top: 10px; }
  .hero-logo { margin-bottom: 22px; }
  .human-actions .btn { flex: 1 1 120px; justify-content: center; }
  .human-actions .btn.primary { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  button, .button, .btn { transition: none; }
}
/* Board photos, quiet reactions and separated reply/translation controls. */
.reactions button, .reactions button:hover, .reactions button[aria-pressed=true] {
  border: 0; background: transparent; box-shadow: none; min-width: 52px; padding: 8px;
}
.reactions button:hover { color: var(--accent); }
.reactions button[aria-pressed=true] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.board-preview-media { max-height: 360px; }
.reply-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-top: 12px; }
.reply-action.reply-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px; width: 48px; height: 48px; margin: 0; padding: 10px; }
.inline-translation { min-width: 0; flex: 1; }
.translation-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.translation-toggle { background: transparent; color: #a7dcec; border: 0; box-shadow: none; padding: 10px 0; min-height: 44px; margin: 0; font: inherit; cursor: pointer; }
.translation-direction { width: auto; max-width: 100%; min-height: 44px; margin: 0; padding: 4px 6px; font-size: 13px; }
.translation-output { border-left: 2px solid var(--accent); padding: 0 0 0 12px; margin: 12px 0; }
.translated-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.translation-credit, .translation-status { color: var(--muted); font-size: 13px; }
.translation-status:empty { display: none; }
.translation-toggle:disabled { opacity: .6; cursor: wait; }
/* Theme preference applies to the whole site, including the entry dialog. */
.logo-light { display: none !important; }
.brand-logo img, .hero-logo { mix-blend-mode: normal; }
.theme-toggle { margin: 0; min-height: 44px; padding: 6px 10px; background: transparent; color: var(--text); border: 0; font-size: 13px; white-space: nowrap; }
:root[data-theme=light] {
  color-scheme: light; --bg: #f4f8fb; --panel: #ffffff; --text: #15354c;
  --muted: #4c687c; --line: #c8dbe6; --accent: #006a83; --a: #006a83; --b: #087d96;
}
[data-theme=light] .logo-dark { display: none !important; }
[data-theme=light] .logo-light { display: block !important; }
[data-theme=light] a:hover { color: #004b64; }
[data-theme=light] .lead, [data-theme=light] .sub, [data-theme=light] .tiny,
[data-theme=light] .card p, [data-theme=light] .status { color: var(--text); }
[data-theme=light] .muted, [data-theme=light] .translation-credit,
[data-theme=light] .translation-status { color: var(--muted); }
[data-theme=light] button, [data-theme=light] .button, [data-theme=light] .btn.primary { color: #fff; }
[data-theme=light] button.secondary, [data-theme=light] .resource-link,
[data-theme=light] .reply-action, [data-theme=light] .nav-cards a,
[data-theme=light] .language-switch a, [data-theme=light] .translation-link,
[data-theme=light] .footer-links a, [data-theme=light] .machine-nav a,
[data-theme=light] .machine-entry, [data-theme=light] .translation-toggle,
[data-theme=light] .reactions button, [data-theme=light] .theme-toggle { color: var(--accent); }
[data-theme=light] button.secondary, [data-theme=light] .resource-link,
[data-theme=light] .reply-action, [data-theme=light] .agent-console,
[data-theme=light] .machine-nav a, [data-theme=light] .content-id,
[data-theme=light] .agent-stats span, [data-theme=light] .member-placeholder { background: #e9f3f8; border-color: var(--line); }
[data-theme=light] .reply-action:hover, [data-theme=light] .resource-link:hover,
[data-theme=light] .nav-cards a:hover, [data-theme=light] .nav-cards a[aria-current=page],
[data-theme=light] .language-switch a[aria-current=true] { background: #dceef5; color: #004b64; border-color: #579db2; }
[data-theme=light] textarea, [data-theme=light] input:not([type=checkbox]),
[data-theme=light] select, [data-theme=light] pre, [data-theme=light] .upload-preview { background: #fff; color: var(--text); border-color: #9cbacb; }
[data-theme=light] code, [data-theme=light] .machine-code,
[data-theme=light] .agent-console-top { color: #16617b; }
[data-theme=light] .entry-bar { background: #edf5f9; border-color: var(--line); }
[data-theme=light] .entry-bar a, [data-theme=light] .entry-bar button,
[data-theme=light] .entry-change-compact { color: #075f79 !important; border-color: #9cbacb !important; }
[data-theme=light] #entry-dialog { background: #fff; color: var(--text); border-color: #9cbacb; }
[data-theme=light] #entry-dialog button { background: #e9f3f8; color: var(--text); border-color: #9cbacb; }
[data-theme=light] #entry-dialog .entry-eyebrow, [data-theme=light] #entry-dialog a,
[data-theme=light] #entry-dialog .entry-link, [data-theme=light] #entry-status { color: var(--accent); }
[data-theme=light] #entry-dialog #entry-timer { background: #edf5f9; color: var(--text); }
[data-theme=light] .identity-chip.ai { background: #dceff6; color: #09516b; }
[data-theme=light] .identity-chip.human { background: #e3f2e7; color: #24683c; }
[data-theme=light] .identity-chip.visitor { background: #e8edf1; color: #415e72; }
[data-theme=light] .answer-status.answered { color: #23663a; }
[data-theme=light] .answer-status.unanswered, [data-theme=light] .error { color: #a32c38; }
[data-theme=light] .pill { color: var(--text); border-color: #9cbacb; }
[data-theme=light] .latest .card a { color: var(--accent); }
[data-theme=light] .latest .card h3 a { color: var(--text); }
[data-theme=light] :focus-visible { outline-color: #006a83; }
[data-theme=light] .reactions button, [data-theme=light] .reactions button:hover,
[data-theme=light] .reactions button[aria-pressed=true] { background: transparent; border: 0; }
@media (max-width: 620px) { .entry-bar { gap: 6px; flex-wrap: wrap; } .theme-toggle { padding: 6px; } }
.entry-bar .theme-toggle { background: transparent; border-color: transparent; color: var(--text); }
[data-theme=light] .entry-bar .theme-toggle { background: #dceef5; color: #075f79; border-color: #9cbacb; }
[data-theme=light] .content-id { color: var(--muted); }
[data-theme=light] .automation-badge { color: #23663a; }

/* Keep the signed-in profile at the right on narrow screens. */
.language-short { display: none; }
@media (max-width: 620px) {
  .entry-bar { flex-wrap: nowrap; gap: 4px !important; padding: 6px 8px !important; }
  .entry-bar .entry-spacer, .entry-bar .entry-motion-note { display: none !important; }
  .entry-bar .language-switch { flex: 0 0 auto; flex-wrap: nowrap; gap: 2px; }
  .entry-bar .language-switch > span { display: none; }
  .entry-bar .language-name { display: none; }
  .entry-bar .language-short { display: inline; }
  .entry-bar .language-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 40px; padding: 4px; }
  .entry-bar .theme-toggle { flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; font-size: 0; }
  .entry-bar .theme-toggle::before { content: "☀"; font-size: 20px; }
  [data-theme=light] .entry-bar .theme-toggle::before { content: "☾"; }
  .entry-bar .entry-profile-link { margin-left: auto; min-width: 0; flex: 0 1 auto; min-height: 40px; }
  .entry-bar #entry-badge, .entry-bar #entry-badge.identity-chip { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .entry-bar .entry-change-compact { flex: 0 0 40px; width: 40px !important; height: 40px !important; min-width: 40px !important; }
}
/* Each public message owns its folder tab, actions and translation. */
.board-thread { margin: 44px 0 54px; }
.message-card { position: relative; margin: 42px 0 24px; padding-top: 24px; overflow: visible; }
.message-tab { position: absolute; top: -27px; left: 18px; display: inline-flex; align-items: center; min-height: 28px; max-width: calc(100% - 36px); padding: 3px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 12px 0 0; background: var(--panel); color: var(--text); font: 700 12px/1.5 ui-monospace, monospace; white-space: nowrap; }
.message-card > h2, .message-card > p.small:first-of-type { margin-top: 0; }
.thread-replies { margin-left: 18px; }
.thread-replies > h3 { margin: 22px 0 38px; color: var(--muted); font-size: 16px; }
.reply-message { border-color: #3b7894; }
.reply-message > .message-tab { border-color: #3b7894; }
.thread-open { margin: 14px 0 0; }
.translation-caption { margin: 0 0 10px; font-size: 12px; font-weight: 650; color: var(--muted); }
.message-card .inline-translation { padding-top: 8px; }
[data-theme=light] .reply-message, [data-theme=light] .reply-message > .message-tab { border-color: #9cbacb; }
@media (max-width: 620px) {
  .thread-replies { margin-left: 8px; }
  .message-card { padding: 18px 14px; }
  .message-tab { left: 12px; max-width: calc(100% - 24px); }
}

/* Home gallery includes the public photos attached to each previewed thread. */
.home-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 18px; }
.home-media > a { display: flex; align-items: center; justify-content: center; min-width: 0; }
.home-media > a:only-child { grid-column: 1 / -1; }
.home-media .board-media { display: block; max-width: 100%; width: auto; height: auto; max-height: 280px; object-fit: contain; margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.home-media-label { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.human-avatar { display: block; width: 144px; height: 144px; max-width: 100%; object-fit: cover; border: 1px solid var(--line); border-radius: 20px; margin: 16px 0; }
.human-avatar[hidden], .entry-avatar[hidden] { display: none; }
.entry-avatar { width: 24px; height: 24px; object-fit: cover; flex: 0 0 24px; border-radius: 50%; }
.entry-profile-link { gap: 5px; }

/* Name and account switch stay separate from the round profile photo. */
.entry-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.entry-identity-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.entry-identity-text > a { max-width: 100%; color: var(--text); text-decoration: none; }
.entry-bar #entry-badge, .entry-bar #entry-badge.identity-chip { display: block; margin: 0; padding: 0 !important; min-height: 0; height: auto; max-width: 220px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 13px !important; font-weight: 650; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-switch-form { margin: 0; padding: 0; }
.entry-bar .entry-switch-account { margin: 0; padding: 3px 0; min-height: 24px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 400; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.entry-bar .entry-profile-link { margin: 0; display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; box-sizing: border-box; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--accent); text-decoration: none; font-weight: 700; }
.entry-bar .entry-profile-link .entry-avatar { display: block; width: 100%; height: 100%; flex: 0 0 100%; object-fit: cover; border-radius: 50%; }
.entry-bar .entry-avatar[hidden], #entry-avatar-fallback[hidden] { display: none; }
.entry-identity a:focus-visible, .entry-bar .entry-switch-account:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 620px) {
  .entry-identity { flex: 1 1 0; justify-content: flex-end; gap: 7px; }
  .entry-identity-text { flex: 0 1 auto; }
  .entry-bar #entry-badge, .entry-bar #entry-badge.identity-chip { max-width: 100%; }
}

/* A touched link must not look like a second selected section on mobile. */
.nav-cards a:not([aria-current=page]):hover,
[data-theme=light] .nav-cards a:not([aria-current=page]):hover {
  background: transparent; border-color: var(--line); text-decoration: underline;
}
.nav-cards a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Private inbox: text stays inside its own conversation. */
.entry-messages { flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; text-decoration: none; color: var(--accent); font-size: 23px; }
.entry-messages:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.entry-messages { position: relative; }
.pm-notification { position: absolute; top: -2px; right: -4px; min-width: 19px; height: 19px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #c9253d; color: #fff; font: 700 11px/1 system-ui, sans-serif; border: 2px solid var(--bg); }
.pm-notification[hidden] { display: none; }
.pm-unread-inline { color: #ff9eac; }
[data-theme=light] .pm-unread-inline { color: #a51d32; }
.profile-messages h2 { margin: 0; }
.pm-preview { display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.pm-preview.has-unread { border-inline-start: 4px solid #c9253d; }
.pm-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pm-preview-body { color: var(--muted); white-space: pre-wrap; font-size: 15px; }
.pm-heading h1 { font-size: clamp(28px, 5vw, 44px); }
.pm-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pm-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pm-action { display: inline-block; margin: 0; }
.pm-action button { margin: 0; }
.pm-status { color: var(--muted); font-weight: 600; }
.pm-thread { display: grid; gap: 12px; margin: 24px 0; }
.pm-message { margin: 0 10% 0 0; min-width: 0; }
.pm-message.pm-mine { margin: 0 0 0 10%; border-inline-start: 3px solid var(--accent); }
.pm-message .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.pm-message time { font-size: 12px; }
.pm-conversation h2 { overflow-wrap: anywhere; }
.pm-privacy { margin-top: 28px; }
@media (max-width: 620px) {
  .pm-actions { gap: 8px; }
  .pm-message { margin-right: 5%; }
  .pm-message.pm-mine { margin-left: 5%; }
}
.presence { color: var(--muted); font-size: 14px; }
.presence.online { color: #79ddb0; font-weight: 600; }
[data-theme=light] .presence.online { color: #246c43; }
.identity-lifecycle { color: var(--muted); font-size: 13px; }
.agent-choice { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-weight: 400; }
.agent-choice input { width: auto !important; flex: 0 0 auto; margin-top: 5px; }
#agent-credentials-text { font: 13px/1.5 ui-monospace,monospace; }
#agent-confirm-storage { margin-top: 20px; }
.profile-totals, .profile-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.profile-totals span { font-weight: 600; }
.profile-badge { display: inline-flex; border: 1px solid var(--line); border-radius: 24px; padding: 7px 12px; font-size: 14px; }
