/* Xortex Community v16 — typography and palette adapted from XOX. */
:root {
  color-scheme: light;
  --blue: #2457E7;
  --bg: #FFFFFF;
  --surface: #F0F4FC;
  --ink: #101A30;
  --muted: #52617A;
  --line: #CCD6E8;
  --radius: 20px;
  font: 400 16px/1.65 "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 116px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--blue); color: #fff; }
h1, h2, h3, p { margin: 0; }
b, strong { font-weight: 600; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
.container { width: min(1104px, calc(100% - 80px)); margin-inline: auto; }
.section-space { padding-block: 48px; }
.skip-link { position: fixed; z-index: 40; top: 12px; left: 12px; padding: 12px 20px; color: #fff; background: var(--blue); transform: translateY(-160%); border-radius: 10px; }
.skip-link:focus { transform: none; }
.header { min-height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 24px; position: sticky; top: 0; z-index: 10; background: var(--bg); transition: opacity .2s ease, visibility .2s; }
.header::before { content: ""; position: absolute; inset: 0 -20px; background: var(--bg); z-index: -1; pointer-events: none; }
.header.is-away { visibility: hidden; opacity: 0; pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.75rem; line-height: normal; font-family: "Segoe UI", system-ui, sans-serif; font-weight: 600; letter-spacing: -.045em; white-space: nowrap; color: var(--ink); }
.brand-mark { display: block; width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }
.brand-name { display: block; }
.brand-accent { color: var(--blue); }
.header-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.header-menu > summary { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; list-style: none; cursor: pointer; color: var(--ink); }
.header-menu > summary:hover { background: var(--surface); }
.menu-burger { display: grid; gap: 5px; width: 24px; }
.menu-burger span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: transform .15s ease, opacity .15s ease; }
.header-menu[open] .menu-burger span:first-child { transform: translateY(7px) rotate(45deg); }
.header-menu[open] .menu-burger span:nth-child(2) { opacity: 0; }
.header-menu[open] .menu-burger span:last-child { transform: translateY(-7px) rotate(-45deg); }
.header-menu > summary::-webkit-details-marker { display: none; }
.nav { position: absolute; top: calc(100% + 10px); right: 0; display: flex; flex-direction: column; gap: 2px; width: min(260px, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 12px 30px #101a3014; }
.nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; font-size: .875rem; line-height: 1.4; }
.nav a:hover, .nav a:focus-visible { background: var(--surface); color: var(--blue); }
.eyebrow { color: var(--blue); font-size: .875rem; font-weight: 600; letter-spacing: .055em; line-height: 1.5; text-transform: uppercase; margin-bottom: 16px; }
h1 { font-size: clamp(2.125rem, 3.8vw, 3rem); line-height: 1.13; letter-spacing: -.045em; }
h1 span { color: var(--blue); }
h2 { font-size: clamp(1.8125rem, 3vw, 2.25rem); line-height: 1.18; letter-spacing: -.04em; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -.025em; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 48px; padding-block: 46px 58px; }
.hero-tree { display: block; width: 100%; max-width: 430px; height: auto; justify-self: center; }
.hero-copy { max-width: 740px; }
.hero-description { margin-top: 24px; max-width: 600px; font-size: 1rem; line-height: 1.75; color: var(--muted); }
.hero-description .wide-only { display: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-actions { margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 17px; border: 1px solid transparent; border-radius: 10px; font-size: .875rem; font-weight: 600; line-height: 1.4; text-align: center; transition: background-color .16s ease, border-color .16s ease; }
.button-blue { color: #fff; background: var(--blue); }
.button-blue:hover { background: #1D49C7; }
.button-soft { color: var(--blue); background: var(--surface); border-color: #DBE4F8; }
.button-soft:hover { background: #E3EBFA; }
.button-outline { border-color: var(--line); background: #fff; color: var(--blue); }
.button-outline:hover { background: var(--surface); }
.button-white { color: var(--blue); background: #fff; }
.button-white:hover { background: #E9EFFF; }
.button-outline-white { color: #fff; background: transparent; border-color: #fff; }
.button-outline-white:hover { color: var(--blue); background: #fff; }
.join-actions a:focus-visible { outline-color: #fff; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: .875rem; }
.section-intro { display: block; }
.section-description { margin-top: 20px; font-size: 1rem; line-height: 1.7; color: var(--muted); max-width: 740px; }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.benefits article { padding: 28px; border-radius: var(--radius); background: var(--surface); }
.icon { width: 32px; height: 32px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.benefits .icon { color: var(--blue); margin-bottom: 22px; }
.benefits p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-top: 14px; }
.community-bottom { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.community-bottom p { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.community-bottom strong { color: var(--ink); }
.text-link { display: inline-block; font-size: .9375rem; line-height: 1.6; font-weight: 600; color: var(--blue); padding-block: 10px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.project-card { display: flex; flex-direction: column; align-items: flex-start; padding: 28px 30px; background: var(--surface); border-radius: var(--radius); }
.project-top { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.project-type { display: flex; align-items: center; gap: 12px; font-size: .875rem; font-weight: 600; color: var(--blue); }
.project-token-mark { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.project-status { color: var(--muted); font-size: .8125rem; }
.project-copy { margin-block: 26px 18px; }
.project-copy p { margin-top: 14px; line-height: 1.7; font-size: 1rem; color: var(--muted); }
.project-card > .text-link { margin-top: auto; }
.project-invitation { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 26px; }
.project-invitation p { color: var(--muted); font-size: .875rem; line-height: 1.7; }
.project-invitation strong { color: var(--ink); }
.project-invitation .button { flex-shrink: 0; }
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 44px; }
.about-story > p:not(.eyebrow) { font-size: 1rem; line-height: 1.75; color: var(--muted); margin-top: 20px; }
.about-story > p.lead { color: var(--ink); font-size: 1.4375rem; line-height: 1.45; letter-spacing: -.02em; }
.personal-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; }
.principles { background: var(--surface); border-radius: var(--radius); padding: 30px; align-self: start; }
.principles h3 { font-size: 1.5625rem; line-height: 1.2; }
.principles > p:not(.eyebrow) { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-top: 20px; }
.join-section { margin-block: 12px 44px; background: var(--blue); border-radius: 24px; color: #fff; }
.join-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 30px; padding: 40px 46px; align-items: center; }
.join-tree { display: block; grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; }
.join-layout .eyebrow { color: #E0E9FF; }
.join-layout h2 + p { margin-top: 20px; font-size: 1rem; line-height: 1.7; }
.join-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 24px; margin-top: 24px; grid-column: 1; }
.join-telegram { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .875rem; line-height: 1.4; font-weight: 600; white-space: nowrap; }
.join-telegram svg { width: 20px; height: 20px; flex-shrink: 0; }
.join-telegram:hover { text-decoration: underline; text-underline-offset: 4px; }
.join-label-short { display: none; }
.footer { background: var(--surface); padding-block: 44px 30px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
.footer-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.footer-group h3 { font-size: .9375rem; color: var(--blue); letter-spacing: 0; margin-bottom: 14px; }
.footer-group ul { list-style: none; padding: 0; margin: 0; }
.footer-group a { display: inline-block; padding-block: 8px; font-size: .875rem; }
.footer-group a:hover { color: var(--blue); }
.footer-identity .brand { font-size: 1.5rem; }
.footer-identity p { margin-top: 18px; font-size: .875rem; color: var(--muted); }
.footer-docs { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 24px; margin-top: 32px; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.footer-docs a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 26px; padding-right: 56px; font-size: .8125rem; color: var(--muted); }
.back-top { position: fixed; z-index: 15; right: 24px; bottom: 24px; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 4px 16px #101a3026; cursor: pointer; }
.back-top:hover { background: #1D49C7; }
.back-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.back-top svg { width: 24px; height: 24px; }
@keyframes enter { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) { .hero-copy { animation: enter .23s ease-out both; } }
@media (max-width: 1000px) {
  .container { width: calc(100% - 56px); }
  .benefits { gap: 16px; }
  .benefits article { padding: 24px; }
  .about { gap: 28px; }
  .wide-only { display: none; }
  .join-layout { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 24px; padding: 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-identity { grid-row: 1; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 104px; }
  .container { width: calc(100% - 44px); }
  .header { gap: 14px; }
  .header-menu > summary { gap: 10px; }
  .hero { padding-block: 26px 36px; }
  h1 { font-size: 2.25rem; }
  .hero-description { margin-top: 20px; }
  .hero-actions { margin-top: 22px; }
  .section-space { padding-block: 36px; }
  .section-description { margin-top: 18px; }
  .benefits { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 26px; }
  .benefits article { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 16px; }
  .benefits .icon { grid-row: span 2; width: 28px; height: 28px; margin: 0; }
  .benefits h3 { font-size: 1.25rem; }
  .benefits p { grid-column: 2; margin-top: 10px; }
  .community-bottom, .project-invitation { flex-direction: column; align-items: flex-start; gap: 16px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 26px; }
  .project-card { padding: 24px; }
  .project-copy { margin-top: 24px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about-story > p.lead { font-size: 1.3125rem; }
  .principles { padding: 26px; }
  .join-section { margin-bottom: 32px; }
  .join-layout { grid-template-columns: minmax(0, 1fr); padding: 30px 24px; }
  .join-copy { display: contents; }
  .join-copy > * { grid-column: 1; }
  .join-copy > .eyebrow { grid-row: 1; }
  .join-copy > h2 { grid-row: 2; }
  .join-tree { grid-column: 1; grid-row: 3; width: 180px; justify-self: center; margin-top: 24px; }
  .join-copy > p:not(.eyebrow) { grid-row: 4; }
  .join-actions { grid-row: 5; }
  .join-actions { gap: 10px; }
  .footer { padding-block: 32px; }
  .footer-directory { gap: 28px 20px; }
  .back-top { right: 16px; bottom: 16px; }
}
@media (max-width: 600px) {
  .footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-group:first-child { grid-column: 1; grid-row: 1; }
  .footer-group:nth-child(2) { grid-column: 1; grid-row: 2; }
  .footer-group:nth-child(3) { grid-column: 2; grid-row: 1; }
}
@media (max-width: 380px) {
  .container { width: calc(100% - 32px); }
  .header { gap: 10px; }
  .header::before { inset-inline: -16px; }
  .header-menu > summary { gap: 7px; }
  h1 { font-size: 2rem; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { flex: 1 1 auto; }
  .project-card, .principles { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Information pages and first-visit notice. */
.document-page { padding-block: 64px 88px; }
.document-heading { max-width: 900px; margin-bottom: 52px; }
.breadcrumb { display: inline-block; font-size: .875rem; color: var(--muted); margin-bottom: 36px; text-decoration: underline; text-underline-offset: 5px; }
.document-heading .eyebrow { margin-bottom: 16px; }
.document-heading h1 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.12; letter-spacing: -.04em; text-wrap: initial; overflow-wrap: anywhere; }
.document-lead { max-width: 760px; font-size: 1.125rem; line-height: 1.8; color: var(--muted); margin-top: 24px; }
.document-date { font-size: .8125rem; line-height: 1.7; color: var(--muted); margin-top: 20px; }
.document-layout { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 64px; align-items: start; }
.document-toc { position: sticky; top: 116px; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 16px; background: var(--surface); font-size: .875rem; line-height: 1.6; }
.document-toc p { font-weight: 600; margin-bottom: 4px; }
.document-toc a { color: var(--muted); }
.document-toc a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.document-content { max-width: 800px; min-width: 0; overflow-wrap: anywhere; }
.document-content section + section { margin-top: 36px; padding-top: 32px; }
.document-content h2 { font-size: clamp(1.375rem, 2.1vw, 1.75rem); line-height: 1.35; letter-spacing: -.025em; text-wrap: initial; margin-bottom: 16px; }
.document-content p, .document-content li { font-size: 1rem; line-height: 1.85; color: var(--muted); }
.document-content p + p { margin-top: 16px; }
.document-content ul { margin: 16px 0; padding-left: 22px; }
.document-content li + li { margin-top: 10px; }
.document-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.document-content strong { color: var(--ink); }
.document-content .contact-list { list-style: none; padding: 0; }
.contact-list li { padding-block: 12px; }
.contact-list a { display: inline-block; font-weight: 600; }
.contact-list span { display: block; margin-top: 4px; }
.error-page { min-height: 55vh; padding-block: 88px; }
.error-page h1 { font-size: clamp(2.5rem, 5vw, 4rem); max-width: 800px; }
.error-page > p:not(.eyebrow) { margin-top: 24px; font-size: 1.125rem; color: var(--muted); line-height: 1.8; }
.error-page .actions { margin-top: 32px; }
@media (max-width: 1024px) { .document-layout { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 36px; } }
@media (max-width: 760px) {
  .document-page { padding-block: 40px 64px; }
  .document-heading { margin-bottom: 32px; }
  .breadcrumb { margin-bottom: 28px; }
  .document-lead { font-size: 1rem; margin-top: 20px; }
  .document-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .document-toc { position: static; padding: 24px; }
  .document-content section + section { margin-top: 28px; padding-top: 28px; }
  .document-content h2 { font-size: 1.375rem; }
  .error-page { padding-block: 56px; }
}

/* First-visit information notice. No modal wall or background scroll lock. */
button { font-family: inherit; font-synthesis: none; cursor: pointer; }
button:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
button[hidden], .site-notice[hidden] { display: none; }
.notice-trigger { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 400; line-height: inherit; text-align: left; }
.notice-trigger:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.site-notice { position: fixed; z-index: 20; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: min(520px, calc(100% - 48px)); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); max-height: calc(100dvh - 48px); overflow-y: auto; }
.site-notice h2 { font-size: 1.25rem; line-height: 1.35; letter-spacing: -.025em; text-wrap: initial; margin-bottom: 14px; }
.site-notice p { font-size: .9375rem; line-height: 1.7; color: var(--muted); }
.site-notice p a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.site-notice .notice-note { margin-top: 12px; font-size: .8125rem; }
.notice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.notice-actions .button { width: 100%; min-height: 48px; padding: 12px 16px; }
.document-content code { font-size: .9375rem; color: var(--ink); }
@media (max-width: 760px) {
  .site-notice { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 22px; border-radius: 16px; }
}
@media (max-width: 380px) {
  .site-notice { padding: 20px; }
  .site-notice h2 { font-size: 1.125rem; }
  .notice-actions { gap: 8px; }
  .notice-actions .button { font-size: .8125rem; padding-inline: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .site-notice:not([hidden]) { animation: enter .23s cubic-bezier(.165, .84, .44, 1) both; }
}
body:has(.site-notice:not([hidden])) .back-top { visibility: hidden; }

@media (min-width: 721px) and (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) clamp(200px, 28vw, 250px); gap: 24px; }
  .hero-tree { max-width: 250px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > * { grid-column: 1; }
  .hero-copy > .eyebrow { grid-row: 1; }
  .hero-copy > h1 { grid-row: 2; }
  .hero-tree { grid-column: 1; grid-row: 3; width: min(100%, 300px); margin-top: 24px; }
  .hero-description { grid-row: 4; }
  .hero-actions { grid-row: 5; }
  .hero-note { grid-row: 6; }
}

/* Match the main Xortex site brand dimensions at its breakpoints. */
@media (max-width: 1024px) { .header { min-height: 88px; } }
@media (max-width: 760px) {
  .header { min-height: 80px; }
  .brand { font-size: 1.5rem; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
}

@media (max-width: 1000px) {
  .join-label-full { display: none; }
  .join-label-short { display: inline; }
}
