/* The reference-led home screen is isolated from the legal-page stylesheet. */
.reference-home {
  /* Keep the established warm palette from styles.css; the reference supplies layout only. */
  --site-header-height: 74px;
  background: var(--paper);
  color: var(--ink);
}
.site-header-background { background: var(--cream); }
.reference-home .site-header {
  min-height: var(--site-header-height); max-width: 1440px; margin: auto; padding: 10px min(11.5%, 165.6px) 10px min(2.8%, 40.32px);
  justify-content: flex-start; gap: clamp(36px, 6.5vw, 96px);
  background: var(--cream); border: 0;
}
.reference-home nav { gap: 38px; }
.reference-home nav a { font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.reference-home .header-action { margin-left: auto; min-width: 178px; min-height: 46px; gap: 18px; font-size: 15px; font-weight: 500; }
.reference-home .header-action, .reference-home .primary-action {
  border: 1px solid #886555; border-radius: 11px; color: #44342e;
  background: linear-gradient(115deg, #e7bdb4, #f0d6c7);
  box-shadow: inset 0 1px 0 #ffffff20; text-transform: none; letter-spacing: 0;
}
.reference-home .header-action:hover, .reference-home .primary-action:hover { background: #dfb1a6; box-shadow: 0 5px 18px #80544c20; }
.reference-home .header-action { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.reference-home .header-action:hover { background: #6d443c; border-color: #6d443c; }
.telegram-icon { display: block; width: 22px; height: 22px; flex: none; }
.header-motto { position: absolute; top: 16px; right: 2.5%; font: 9px/1.25 var(--serif); letter-spacing: 1.4px; text-transform: uppercase; color: #78635d; }
.header-motto::before { content: "✦"; position: absolute; left: -33px; top: 5px; color: var(--gold); font-size: 26px; }
.header-motto::after { content: ""; position: absolute; left: -29px; top: -160px; width: 230px; height: 240px; border: 1px solid #b9a87c44; border-radius: 50%; pointer-events: none; }
.first-screen { display: flex; min-height: calc(100vh - var(--site-header-height)); min-height: calc(100dvh - var(--site-header-height)); background: radial-gradient(ellipse at 10% 70%, #fffaf0 0, transparent 48%), radial-gradient(ellipse at 75% 32%, #eecbc88c 0, transparent 60%), linear-gradient(115deg, #f9eee5, #f7e7e4 60%, #f7e9e3); }
.first-screen-inner { position: relative; isolation: isolate; display: flex; flex-direction: column; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 min(2.2%, 31.68px) 15px; }
.home-stage { overflow: clip; }
.hero-main { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 4.5vw, 68px); padding: 4px 5.7% 0 .7%; }
.intro-copy { container-type: inline-size; position: relative; z-index: 2; padding-top: 8px; }
.intro-eyebrow { margin: 0 0 14px; font-size: 11px; font-weight: 600; line-height: 1.6; letter-spacing: 3.5px; text-transform: uppercase; }
.intro-copy h1 { margin: 0 0 15px; color: #3f3430; font: 400 min(72px, 11cqi)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.055em; }
.intro-copy h1 span { display: block; white-space: nowrap; }
.intro-description { max-width: 515px; margin: 0 0 15px; padding-left: 8px; font-size: clamp(16px, 1.68vw, 21px); line-height: 1.25; letter-spacing: -.4px; color: #594940; }
.intro-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.intro-actions .primary-action { min-height: 52px; gap: 18px; padding: 13px 23px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.intro-actions .primary-action > svg { width: 22px; height: 22px; }
.intro-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.6; text-decoration: none; white-space: nowrap; }
.intro-link-label { text-decoration: underline; text-underline-offset: 7px; text-decoration-color: #a47e6880; }
.intro-link-arrow { font-size: 23px; }
.intro-link:hover { color: var(--accent); }
.intro-free { margin: 10px 0 0 8px; color: #78635d; font-size: 11px; line-height: 1.5; }
.dialogue-visual { position: relative; isolation: isolate; min-width: 0; align-self: center; padding: 0 0 4px; }
.moon-backdrop { position: absolute; z-index: -2; pointer-events: none; width: 171%; aspect-ratio: 3 / 2; left: -35%; top: -17%; background: url("assets/reference-hero/moon-sage-composition-v1.png") center / contain no-repeat; opacity: .8; filter: sepia(.8) saturate(.55); }
.dialogue-preview { position: relative; overflow: hidden; border: 1px solid #ffffffd9; border-radius: 22px; background: #f9eee8e8; box-shadow: 0 15px 34px #79563c14; backdrop-filter: blur(16px); }
.preview-header { display: flex; align-items: center; gap: 13px; min-height: 62px; padding: 9px 23px; border-bottom: 1px solid #b8957136; background: #fffaf4e6; }
.bot-avatar { display: grid; place-items: center; flex: none; width: 43px; height: 43px; border-radius: 50%; background: radial-gradient(circle at 28% 25%, #ba8c7b, #80544c 72%); box-shadow: inset 1px 1px 2px #ffffff40; }
.bot-identity p { margin: 0; font-size: 14px; line-height: 1.35; }
.bot-identity strong { font-weight: 700; }
.bot-identity p > span { color: #78635d; }
.bot-presence { display: block; color: #80544c; font-size: 11px; line-height: 1.4; margin-top: 1px; }
.preview-telegram { margin-left: auto; flex: none; color: var(--accent); }
.preview-conversation { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 21px 20px; }
.preview-label { align-self: flex-end; margin: 0 10px -3px 0; color: #78635d; font-size: 10px; line-height: 1.6; }
.preview-bubble { position: relative; padding: 11px 15px 11px; font-size: 14px; line-height: 1.4; }
.preview-bubble p { margin: 0; }
.preview-bubble p::after { content: ""; display: inline-block; width: 56px; }
.preview-question { align-self: flex-end; width: 78%; background: linear-gradient(125deg,#efd4cd,#f2dfd5); border-radius: 15px 15px 5px 15px; }
.preview-reply { width: 87%; border-radius: 15px 15px 15px 4px; background: #fffaf5eb; box-shadow: 0 3px 14px #79563c08; }
.message-time { position: absolute; bottom: 7px; right: 13px; color: #927b6f; font-size: 10px; font-weight: 400; line-height: 1; }
.message-read { color: var(--accent); font-size: 12px; letter-spacing: -4px; margin-left: 3px; margin-right: 4px; }
.preview-reading { position: relative; display: grid; grid-template-columns: 41px minmax(0,1fr); width: 100%; gap: 12px; padding: 13px 15px 24px; border: 1px solid #dcc49a; border-radius: 12px; background: linear-gradient(130deg,#fff9f2d9,#fbf9f5b3); }
.reading-sun { color: #b69b72; width: 41px; height: 41px; }
.preview-reading h2 { margin: 0 0 8px; font: 500 24px/1.1 var(--serif); letter-spacing: -.6px; }
.preview-reading p { margin: 0; font-size: 12px; line-height: 1.5; color: #78635d; }
.hero-orbit { position: absolute; z-index: -1; pointer-events: none; border: 1px dashed #c1a47670; border-radius: 50%; }
.hero-orbit-one { top: 7px; left: 44%; width: 52%; height: 360px; transform: rotate(12deg); }
.hero-orbit-two { top: 18px; left: 45%; width: 53%; height: 368px; transform: rotate(-17deg); border-style: solid; border-color: #c1a47630; }
.orbit-star { position: absolute; display: block; color: var(--gold); font: 32px/1 Georgia, serif; }
.star-one { left: -12px; top: 48%; }
.star-three { left: 1%; bottom: 21%; }
.margin-note { position: absolute; right: .25%; top: 137px; display: flex; flex-direction: column; gap: 16px; font: 10px/1.3 var(--serif); color: #78635d; text-transform: uppercase; letter-spacing: 1.4px; }
.margin-note-star { align-self: center; color: var(--gold); font: 32px/1 Georgia, serif; }
.methods-section { position: relative; z-index: 2; padding-top: 18px; scroll-margin-top: 24px; }
.methods-heading { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 9px; }
.methods-heading::before, .methods-heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#b8957180); }
.methods-heading::after { transform: rotate(180deg); }
.methods-heading > span { color: var(--gold); font: 23px/1 Georgia, serif; }
.methods-heading h2 { flex: none; margin: 0; font: 500 25px/1.2 var(--serif); letter-spacing: -.35px; }
.methods-grid { list-style: none; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; }
.method-card { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 102px; padding: 3px 8px 6px; border: 1px solid; border-radius: 11px; }
.method-blush { background: linear-gradient(125deg,#f6e4df,#faeee7); border-color: #dec1b64d; }
.method-sand { background: linear-gradient(125deg,#fff9f2,#fbf1e6); border-color: #b895714a; }
.method-cream { background: linear-gradient(125deg,#f8ede2,#f4e1d9); border-color: #b895714a; }
.method-card img { display: block; width: 84px; height: 65px; object-fit: contain; filter: sepia(.65) saturate(.65); }
.method-card h3 { margin: 1px 0 0; color: #3f3430; font: 500 22px/1.15 var(--serif); letter-spacing: -.45px; text-align: center; }
.methods-availability { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 12px 0 0; color: #78635d; font-size: 12px; line-height: 1.6; text-align: center; }
.methods-availability::before, .methods-availability::after { content: ""; flex: 1; height: 1px; background: #b8957166; }
.methods-availability a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #a47e6858; }
.reference-home .how-section { border-top: 1px solid var(--line); }
.reference-home .approach-section { background: radial-gradient(ellipse at 50% 100%,#fff5e7,transparent 70%),#f1ddd6; }
.reference-home .analytics-consent { background: #fff9f2; border-color: #a47e68; }
.reference-home .consent-actions button { background: #f4e3d9; border-color: #a47e68; }

@media (min-width: 1500px) {
  .reference-home .site-header { padding-right: 145px; }
  .hero-main { padding-top: 24px; padding-bottom: 14px; }
  .methods-section { padding-top: 30px; }
  .method-card { min-height: 120px; }
}
@media (max-width: 1190px) and (min-width: 901px) {
  .reference-home .site-header { gap: 55px; }
  .intro-actions { gap: 19px; }
  .intro-actions .primary-action { padding-inline: 20px; font-size: 14px; gap: 15px; }
  .intro-link { font-size: 12px; gap: 8px; }
  .hero-main { gap: 35px; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); }
  .intro-eyebrow { font-size: 10px; letter-spacing: 3px; }
  .preview-conversation { padding-inline: 19px; }
  .preview-reading { gap: 9px; padding-inline: 13px; }
  .method-card h3 { font-size: 21px; }
}
@media (max-width: 1000px) and (min-width: 901px) {
  .reference-home .site-header { padding-right: 4%; gap: 38px; }
  .header-motto, .margin-note { display: none; }
  .hero-main { padding-right: 1%; gap: 26px; }
  .intro-actions { gap: 6px 20px; }
  .intro-eyebrow { letter-spacing: 2px; }
  .intro-description { font-size: 17px; }
  .preview-bubble { font-size: 13px; }
  .preview-reading h2 { font-size: 23px; }
  .preview-reading p { font-size: 11px; }
  .method-card h3 { font-size: 19px; }
}
@media (max-width: 900px) {
  .reference-home { --site-header-height: 78px; }
  .reference-home .site-header { padding: 12px 5%; gap: 28px; justify-content: space-between; }
  .reference-home nav { display: flex; gap: 24px; }
  .reference-home nav a { font-size: 12px; }
  .reference-home .header-action { min-width: 145px; gap: 12px; font-size: 13px; margin: 0; }
  .header-motto, .margin-note { display: none; }
  .first-screen-inner { padding: 0 5% 27px; }
  .hero-main { grid-template-columns: minmax(0,1fr); gap: 38px; padding: 25px 0 0; }
  .intro-copy { padding: 0; text-align: center; }
  .intro-eyebrow { font-size: 10px; letter-spacing: 3px; }
  .intro-copy h1 { letter-spacing: -.055em; line-height: .94; }
  .intro-description { max-width: 550px; margin: 0 auto 22px; padding: 0; font-size: 19px; line-height: 1.5; }
  .intro-actions { justify-content: center; gap: 24px; }
  .intro-free { margin-left: 0; }
  .dialogue-visual { width: 100%; max-width: 530px; margin: auto; }
  .moon-backdrop { top: -14%; left: -23%; width: 149%; }
  .preview-header { min-height: 72px; }
  .preview-conversation { padding: 10px 22px 23px; gap: 12px; }
  .preview-bubble { font-size: 15px; }
  .preview-bubble p::after { display: none; }
  .preview-bubble { padding-bottom: 24px; }
  .preview-reading p { font-size: 13px; }
  .hero-orbit-one { top: 370px; left: 11%; width: 79%; height: 350px; }
  .hero-orbit-two { top: 415px; left: 6%; width: 89%; height: 340px; }
  .methods-section { padding-top: 32px; }
  .methods-heading { gap: 15px; margin-bottom: 17px; }
  .methods-heading h2 { font-size: 26px; }
  .methods-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .method-card { min-height: 116px; }
  .method-card h3 { font-size: 22px; }
  .methods-availability { gap: 15px; font-size: 12px; margin-top: 21px; }
}
@media (max-width: 760px) {
  .reference-home nav { display: none; }
}
@media (max-width: 620px) {
  .reference-home { --site-header-height: 73px; }
  .reference-home .site-header { padding: 12px 5%; }
  .reference-home .header-action { min-width: 139px; min-height: 44px; padding: 11px 15px; font-size: 13px; gap: 11px; }
  .reference-home .header-action .telegram-icon { width: 17px; height: 17px; }
  .hero-main { padding-top: 25px; gap: 36px; }
  .intro-eyebrow { max-width: 320px; margin: 0 auto 21px; font-size: 9px; line-height: 1.8; letter-spacing: 2.5px; }
  .intro-copy h1 { line-height: .98; margin-bottom: 22px; letter-spacing: -.055em; }
  .intro-description { max-width: 380px; font-size: 16px; line-height: 1.55; letter-spacing: -.15px; }
  .intro-actions { flex-direction: column; gap: 5px; }
  .intro-actions .primary-action { width: 100%; max-width: 355px; min-height: 52px; font-size: 14px; }
  .intro-link { min-height: 44px; font-size: 13px; }
  .intro-free { font-size: 10px; margin-top: 3px; }
  .preview-header { padding: 12px 17px; min-height: 67px; gap: 11px; }
  .bot-avatar { width: 39px; height: 39px; }
  .bot-identity p { font-size: 13px; }
  .bot-presence { font-size: 10px; }
  .preview-telegram { width: 21px; height: 21px; }
  .dialogue-preview { border-radius: 19px; }
  .preview-conversation { padding: 9px 13px 16px; gap: 11px; }
  .preview-question { width: 86%; }
  .preview-reply { width: 94%; }
  .preview-bubble { padding: 11px 13px 24px; font-size: 13px; }
  .preview-reading { grid-template-columns: 32px minmax(0,1fr); gap: 9px; padding: 14px 11px 25px; }
  .reading-sun { width: 32px; height: 32px; }
  .preview-reading h2 { font-size: 22px; margin-bottom: 7px; }
  .preview-reading p { font-size: 11px; line-height: 1.5; }
  .moon-backdrop { left: -18%; width: 145%; top: -13%; }
  .hero-orbit-one { top: 430px; left: -4%; width: 105%; }
  .hero-orbit-two { top: 460px; left: -2%; width: 110%; height: 300px; }
  .methods-heading { gap: 10px; margin-bottom: 16px; }
  .methods-heading h2 { flex: initial; font-size: 23px; line-height: 1.1; text-align: center; max-width: 235px; }
  .methods-heading > span { font-size: 18px; }
  .methods-heading::before, .methods-heading::after { display: none; }
  .methods-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .method-card { min-height: 109px; padding-inline: 5px; }
  .method-card h3 { font-size: 22px; }
  .method-card img { width: 81px; height: 65px; }
  .methods-availability { margin: 20px auto 0; max-width: 290px; font-size: 11px; line-height: 1.7; }
  .methods-availability::before, .methods-availability::after { display: none; }
}
@media (max-width: 360px) {
  .reference-home .site-header { gap: 12px; }
  .reference-home .site-header .brand-crop { width: 128px; }
  .reference-home .header-action { min-width: 125px; padding-inline: 11px; }
  .intro-description { font-size: 15px; }
  .preview-break { display: none; }
  .preview-reading { grid-template-columns: minmax(0,1fr); }
  .reading-sun { display: none; }
  .method-card h3 { font-size: 20px; }
}
