/* Formora Community — selected Superdesign v5, with native chat and account UI. */
:root { color-scheme: dark; --bg: #090a0c; --surface: #111419; --raised: #15181d; --ink: #f4f4f1; --muted: #a9b0bc; --line: #303640; --blue: #8ab4ff; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 'DM Sans', sans-serif; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
h1, h2, h3 { font-family: Manrope, sans-serif; letter-spacing: -.045em; line-height: 1.2; margin: 0; }
p { margin: 0; color: var(--muted); }
::selection { background: var(--blue); color: var(--bg); }
.container { width: min(1184px, calc(100% - 96px)); margin-inline: auto; }
.ui-icon { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-definitions { position: absolute; overflow: hidden; pointer-events: none; }
.community-header { border-bottom: 1px solid #ffffff12; position: relative; z-index: 10; }
.header-row { height: 82px; display: flex; align-items: center; gap: 56px; }
.brand img { display: block; }
.header-row nav { display: flex; gap: 30px; font-size: 13px; }
.header-row nav a { color: var(--muted); }
.header-row nav a[aria-current] { color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.header-account { margin-left: auto; font-size: 13px; }
.header-account > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 17px; border: 1px solid #ffffff20; border-radius: 10px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 54px 0 40px; }
.welcome h1 { font-size: 38px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.055em; }
.welcome p { font-size: 17px; }
.welcome-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-bottom: 4px; }
.quiet-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 1px solid #ffffff16; padding-bottom: 3px; }
.quiet-link .ui-icon { width: 16px; height: 16px; }
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: stretch; }
.channels { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.eyebrow { font: 600 10px/1.4 'DM Sans', sans-serif; color: #929cab; text-transform: uppercase; letter-spacing: .12em; padding: 2px 4px 14px; }
.channel-options nav { display: grid; gap: 9px; }
.channel-options button { display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 76px; text-align: left; width: 100%; border: 1px solid #ffffff0d; border-left: 2px solid #ffffff0d; border-radius: 12px; background: transparent; color: #a9b0bc; transition: background .16s, border-color .16s; }
.channel-options button:hover { background: #ffffff03; border-color: #ffffff25; }
.channel-options button[aria-pressed=true] { color: var(--ink); border-color: #ffffff15; border-left-color: var(--blue); background: #ffffff04; }
.channel-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; width: 100%; }
.channel-title > .ui-icon { width: 17px; height: 17px; }
.channel-options button[aria-pressed=true] .channel-title > .ui-icon { color: var(--blue); }
.channel-title .channel-lock { margin-left: auto; width: 14px; height: 14px; color: #8d97a6; }
.channel-description { font-size: 11px; color: #919ba9; }
.channel-support { display: flex; flex-direction: column; gap: 21px; margin-top: auto; }
.access-note { font-size: 11px; color: #929cab; line-height: 1.8; padding: 0 3px; }
.review-card { padding: 21px 16px 18px; border: 1px solid #ffffff0f; border-radius: 16px; text-align: center; background: var(--raised); }
.review-stars { display: flex; justify-content: center; gap: 3px; margin-bottom: 10px; color: #e9a187; }
.review-stars .ui-icon { width: 18px; height: 18px; }
.review-card h2 { color: var(--ink); margin-bottom: 7px; font: 600 12px/1.5 'DM Sans', sans-serif; letter-spacing: 0; }
.review-card button { display: block; width: 100%; border: 0; background: transparent; color: #929cab; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; line-height: 1.6; padding: 0; }
.community-rules { padding: 0 3px; font-size: 11px; color: #929cab; }
.community-rules summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.community-rules summary::-webkit-details-marker { display: none; }
.community-rules summary .ui-icon { width: 13px; height: 13px; margin-left: auto; transition: transform .16s; }
.community-rules[open] summary .ui-icon { transform: rotate(180deg); }
.community-rules ul { margin: 12px 0 0; padding-left: 16px; display: grid; gap: 8px; line-height: 1.8; }
.chat { min-width: 0; height: 650px; display: flex; flex-direction: column; position: relative; border: 1px solid #ffffff12; border-radius: 24px; background: var(--surface); overflow: hidden; box-shadow: 0 24px 70px -30px #0007; }
.chat-heading { min-height: 66px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ffffff0a; background: #121519; }
.room-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.room-heading > .ui-icon { color: var(--blue); }
.chat-heading h2 { font-size: 15px; font-weight: 600; letter-spacing: -.035em; }
.chat-heading p { font-size: 10px; color: #939dab; margin-top: 3px; }
.connection { font-size: 9px; color: #a9b0bc; text-align: right; white-space: nowrap; }
.connection[data-connected=true]:before { content: ''; display: inline-block; background: #80c3ae; width: 5px; height: 5px; border-radius: 50%; margin-right: 7px; }
.chat-content { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 0 28px; overflow-wrap: anywhere; }
.empty-state { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px 12px; }
.empty-illustration { position: relative; display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 23px; flex: none; }
.empty-illustration:before { content: ''; position: absolute; inset: -30px; background: radial-gradient(ellipse, #8ab4ff0d, transparent 68%); pointer-events: none; }
.empty-illustration > .ui-icon { width: 66px; height: 66px; color: #ffffff14; stroke-width: 1.7; position: relative; }
.empty-illustration > .illustration-accent { position: absolute; width: 22px; height: 22px; top: 0; right: -3px; color: #8ab4ff88; stroke-width: 1.3; }
.empty-state h3 { font-size: 24px; font-weight: 600; margin-bottom: 17px; }
.empty-state > p { font-size: 15px; max-width: 405px; line-height: 1.8; }
.prompt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.prompt-actions button { padding: 10px 16px; min-height: 40px; border: 1px solid #ffffff12; border-radius: 12px; background: #ffffff04; color: var(--muted); font-size: 12px; transition: border-color .16s, color .16s, background .16s; }
.prompt-actions button:hover { color: var(--ink); border-color: #ffffff28; background: #ffffff08; }
.locked-illustration > .ui-icon { color: #8299bc; width: 48px; height: 48px; stroke-width: 1.3; }
.locked-illustration { margin-bottom: 18px; }
.empty-state > .quiet-link { margin-top: 24px; font-size: 12px; }
.message-list { list-style: none; margin: 0; padding: 12px 0; }
.message-list:empty { display: none; }
.message { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 17px 0; border-bottom: 1px solid #ffffff07; }
.message-avatar { width: 32px; height: 32px; border: 1px solid #ffffff0d; background: #1d232c; display: grid; place-items: center; border-radius: 9px; font-size: 11px; color: #c7d4e9; }
.message-meta { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; line-height: 1.4; margin-bottom: 7px; }
.message-author { font-size: 13px; font-weight: 600; }
.message-time { font-size: 10px; color: #929cab; }
.team-badge { font-size: 8px; border: 1px solid #8ab4ff44; border-radius: 4px; color: var(--blue); padding: 1px 4px; letter-spacing: .04em; }
.message-body { white-space: pre-wrap; font-size: 14px; line-height: 1.8; color: #d3d8e1; overflow-wrap: anywhere; }
.older-button { display: block; margin: 15px auto 0; border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px; background: transparent; color: var(--muted); font-size: 11px; }
.composer { margin: 0; padding: 22px 24px; border-top: 1px solid #ffffff0a; background: #121519; }
.composer-field { border: 1px solid #ffffff12; border-radius: 18px; background: var(--raised); overflow: hidden; transition: border-color .16s, background .16s; }
.composer-field:focus-within { border-color: #8ab4ff66; background: #191d24; }
.composer textarea { display: block; width: 100%; border: 0; background: transparent; resize: vertical; min-height: 78px; max-height: 180px; color: var(--ink); padding: 16px 19px 6px; font-size: 14px; line-height: 1.6; outline: none; }
.composer textarea::placeholder { color: #8c96a5; }
.composer-tools { padding: 7px 17px 14px; display: flex; align-items: center; gap: 18px; font-size: 10px; color: #929cab; }
#characterCount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.keyboard-hint { font-size: 10px; }
.send-button { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 30px; background: #f3f3f1; color: #191c22; padding: 10px 21px; font-size: 12px; font-weight: 600; margin-left: auto; min-height: 40px; transition: background .16s; }
.send-button .ui-icon { width: 16px; height: 16px; }
.send-button:hover:not(:disabled) { background: #fff; }
.send-button:disabled { opacity: .4; }
.chat-notice { font-size: 12px; padding: 10px 24px; color: #edb5a4; border-top: 1px solid #ffffff0a; }
.new-message-notice { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.community-footer { display: flex; align-items: center; gap: 45px; border-top: 1px solid #ffffff12; padding-top: 32px; padding-bottom: 32px; margin-top: 48px; font-size: 11px; color: #929cab; }
.community-footer nav { display: flex; gap: 25px; }
.community-footer > span { margin-left: auto; }
.community-footer img { display: block; opacity: .8; width: 120px; height: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; border: 1px solid #ffffff30; border-radius: 30px; background: #f4f1eb; color: #090a0c; padding: 13px 24px; font-weight: 600; font-size: 13px; line-height: 1.6; }
.button:hover { color: #090a0c; background: #fff; }
.subtle-button { font-size: 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.subtle-button:hover { border-color: #7c8ba2; color: var(--ink); }
/* The public invitation contains channel descriptions, never protected messages. */
.auth-gate { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: center; min-height: 67vh; padding: 90px 0; }
.gate-kicker { font-size: 13px; color: #a8c7ff; margin-bottom: 23px; }
.auth-gate h1 { font-size: clamp(40px, 5vw, 66px); font-weight: 600; line-height: 1.1; letter-spacing: -.055em; }
.auth-gate h1 span { color: #dce0e5; }
.gate-intro { max-width: 450px; margin-top: 25px; font-size: 16px; line-height: 1.9; }
.gate-action { margin-top: 30px; min-height: 70px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
#gateStatus { font-size: 12px; }
.gate-note { font-size: 11px; margin-top: 17px; }
.gate-preview { position: relative; border: 1px solid #ffffff16; background: linear-gradient(130deg, #151a22, #111419 75%); padding: 28px; border-radius: 22px; box-shadow: 0 15px 100px -50px #8ab4ff44; }
.gate-preview-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 26px; color: #e0e4eb; font-size: 15px; font-weight: 500; }
.gate-preview-heading > .ui-icon { color: var(--blue); }
.gate-channel { display: flex; gap: 16px; border-top: 1px solid #ffffff0d; padding: 25px 0; }
.gate-channel > .ui-icon { color: #8faddb; margin-top: 2px; }
.gate-channel h2 { font-size: 15px; margin-bottom: 10px; letter-spacing: -.025em; }
.gate-channel p { font-size: 12px; line-height: 1.9; }
.gate-preview-note { font-size: 10px; color: #929cab; border-top: 1px solid #ffffff0d; padding-top: 20px; }
/* Existing administrator controls. */
dialog { max-width: 570px; width: calc(100% - 36px); padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 100px #0009; }
dialog::backdrop { background: #0009; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 24px; }
.dialog-heading button { background: none; border: 0; color: var(--muted); display: grid; place-items: center; width: 36px; height: 36px; }
dialog p { font-size: 13px; margin-bottom: 16px; }
dialog label { display: block; font-size: 12px; margin: 22px 0 8px; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row input { min-width: 0; flex: 1; background: var(--raised); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 13px; }
.lookup-row button { padding: 10px 15px; white-space: nowrap; }
.access-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#accessStatus { margin-top: 15px; color: var(--blue); }
#memberIdentity { color: var(--ink); }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip:focus { clip: auto; left: 20px; top: 15px; width: auto; height: auto; background: var(--ink); color: var(--bg); padding: 12px; z-index: 100; }
@media (max-width: 1050px) {
  .container { width: calc(100% - 56px); }
  .workspace { grid-template-columns: 215px minmax(0, 1fr); gap: 25px; }
  .welcome { padding: 42px 0 32px; }
  .welcome p { font-size: 15px; }
  .keyboard-hint { display: none; }
  .auth-gate { gap: 40px; }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 36px); }
  .header-row { height: 72px; gap: 20px; }
  .brand img { width: 128px; height: auto; }
  .header-row nav { display: none; }
  .header-account { margin-left: auto; }
  .header-account .site-account-caption { display: none; }
  .header-account .site-account-trigger { gap: 8px; padding: 6px 8px; }
  .header-account .site-account-name { max-width: 70px; font-size: 12px; }
  .header-account .site-account-chevron { margin-left: 0; width: 14px; }
  .welcome { align-items: start; gap: 16px; padding: 32px 0 25px; }
  .welcome h1 { font-size: 30px; margin-bottom: 9px; }
  .welcome p { font-size: 14px; max-width: 330px; }
  .welcome-actions .quiet-link { display: none; }
  .welcome-actions { max-width: 125px; }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'channels' 'chat' 'support'; gap: 20px; }
  .channels { display: contents; }
  .channel-options { grid-area: channels; }
  .channel-options nav { grid-template-columns: 1fr 1fr; gap: 9px; }
  .eyebrow { padding: 0 2px 10px; font-size: 9px; }
  .channel-options button { padding: 12px; min-height: 77px; }
  .channel-title { font-size: 12px; gap: 7px; }
  .channel-title > .ui-icon { width: 15px; height: 15px; }
  .channel-title .channel-lock { width: 12px; }
  .channel-description { font-size: 10px; }
  .channel-support { grid-area: support; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .access-note { grid-column: 1 / -1; font-size: 11px; }
  .review-card { padding: 20px 12px; border-radius: 14px; }
  .review-card h2 { font-size: 11px; }
  .review-card button { font-size: 8px; }
  .community-rules { padding-top: 12px; }
  .chat { grid-area: chat; border-radius: 18px; height: 550px; }
  .chat-heading { min-height: 69px; padding: 15px 17px; gap: 12px; }
  .chat-heading h2 { font-size: 14px; }
  .chat-heading p { font-size: 9px; max-width: 200px; }
  .room-heading { gap: 10px; }
  .room-heading > .ui-icon { width: 17px; }
  .connection { font-size: 8px; }
  .chat-content { padding: 0 17px; }
  .empty-state { padding: 22px 4px; }
  .empty-illustration { width: 64px; height: 64px; margin-bottom: 20px; }
  .empty-illustration > .ui-icon { width: 54px; height: 54px; }
  .empty-illustration > .illustration-accent { width: 20px; height: 20px; }
  .empty-state h3 { font-size: 22px; margin-bottom: 14px; }
  .empty-state > p { font-size: 13px; max-width: 330px; line-height: 1.8; }
  .prompt-actions { gap: 8px; margin-top: 20px; }
  .prompt-actions button { font-size: 11px; padding: 8px 10px; min-height: 36px; border-radius: 10px; }
  .composer { padding: 15px; }
  .composer-field { border-radius: 13px; }
  .composer textarea { padding: 13px 14px 3px; font-size: 13px; min-height: 74px; }
  .composer-tools { padding: 7px 11px 11px; gap: 10px; }
  .send-button { min-height: 36px; font-size: 11px; padding: 8px 16px; }
  .message { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px 0; }
  .message-avatar { width: 28px; height: 28px; }
  .message-body { font-size: 13px; }
  .message-author { font-size: 12px; }
  .community-footer { flex-wrap: wrap; gap: 24px; padding: 25px 0; margin-top: 36px; }
  .community-footer > span { margin-left: 0; width: 100%; }
  .community-footer nav { margin-left: auto; gap: 16px; }
  .community-footer img { width: 100px; }
  .auth-gate { grid-template-columns: 1fr; gap: 38px; padding: 55px 0; min-height: 0; }
  .gate-intro { font-size: 15px; }
  .auth-gate h1 { font-size: 48px; }
  .gate-kicker { margin-bottom: 18px; }
  .gate-preview { padding: 23px; }
  .lookup-row { flex-direction: column; }
  dialog { padding: 24px; }
}
@media (max-width: 380px) {
  .header-account .site-account-name { max-width: 50px; }
  .channel-options button { padding: 11px 9px; }
  .channel-title { font-size: 11px; gap: 5px; }
  .channel-title > .ui-icon { width: 13px; }
  .channel-title .channel-lock { width: 10px; }
  .channel-description { font-size: 9px; }
  .empty-illustration { width: 50px; height: 50px; margin-bottom: 14px; }
  .empty-illustration > .ui-icon { width: 44px; height: 44px; }
  .empty-illustration > .illustration-accent { width: 17px; height: 17px; }
  .empty-state h3 { font-size: 20px; }
  .empty-state > p { font-size: 12px; }
  .empty-state > .quiet-link { font-size: 11px; }
  .channel-support { grid-template-columns: 1fr; gap: 14px; }
  .community-rules { padding-top: 0; }
  .community-footer { font-size: 10px; }
  .community-footer img { width: 90px; }
  .community-footer nav { gap: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
