/* Site-wide additions: visible Menu word, footer directory, site search */

/* Phone menu button shows the word "Menu" (and "Close" while open) */
@media (max-width: 640px){
  .nav-toggle{ width:auto !important; padding:0 12px !important; gap:8px; }
  .nav-toggle::after{ content:"Menu"; font-family:var(--sans-ui); font-size:15px; letter-spacing:0.04em; }
  .nav-toggle[aria-expanded="true"]::after{ content:"Close"; }
}

/* Footer directory */
.foot-dir{ display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:26px 28px; max-width:920px; margin:0 auto 30px; padding:0 16px 26px; text-align:left; border-bottom:1px solid var(--line); font-family:var(--sans-ui); }
.foot-dir > div{ min-width:0; }
.foot-dir h3{ margin:0 0 8px; font-size:13px; font-weight:600; letter-spacing:0.14em; text-transform:uppercase; color:var(--gold); }
.foot-dir a{ display:flex; align-items:center; min-height:44px; padding:4px 0; font-size:15px; line-height:1.3; color:var(--ink-dim); text-decoration:underline; text-underline-offset:3px; }
.foot-dir a:hover{ color:var(--gold); }

/* Site search */
.site-search{ position:relative; font-family:var(--sans-ui); }
nav.mw-nav > .site-search{ position:absolute; top:12px; right:0; width:240px; z-index:45; }
.site-search input{ width:100%; box-sizing:border-box; height:40px; padding:0 14px 0 38px; border-radius:999px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-family:var(--sans-ui); font-size:16px; -webkit-appearance:none; appearance:none; }
.site-search input::placeholder{ color:var(--ink-faint); }
.site-search input:focus{ outline:2px solid var(--gold); outline-offset:2px; border-color:var(--gold-soft); }
.site-search .ss-icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--ink-faint); pointer-events:none; }
.site-search-results{ position:absolute; top:calc(100% + 8px); right:0; width:min(380px, 92vw); max-height:62vh; overflow:auto; box-sizing:border-box; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 14px 40px rgba(0,0,0,0.5); z-index:70; }
.site-search-results[hidden]{ display:none; }
.site-search-results a{ display:block; padding:10px 12px; border-radius:10px; color:var(--ink); text-decoration:none; font-size:16px; line-height:1.3; }
.site-search-results a:hover, .site-search-results a:focus{ background:rgba(201,163,95,0.1); outline:none; }
.site-search-results a small{ display:block; margin-top:3px; font-size:13px; line-height:1.4; color:var(--ink-faint); }
.site-search-results a small b{ font-weight:600; color:var(--gold); letter-spacing:0.06em; text-transform:uppercase; font-size:11px; margin-right:6px; }
.site-search-note{ padding:10px 12px; font-size:14px; color:var(--ink-dim); }
@media (max-width: 640px){
  nav.mw-nav > .wordmark{ flex:0 0 100%; }
  nav.mw-nav > .nav-toggle{ order:1; margin-top:10px; }
  nav.mw-nav > .wordmark ~ .site-search{ position:relative; top:auto; right:auto; order:2; flex:1 1 0; width:auto; min-width:0; margin:10px 0 0 10px; }
  nav.mw-nav > .mw-top ~ .site-search{ position:relative; top:auto; right:auto; order:2; width:100%; margin-top:8px; }
  .site-search-results{ left:auto; right:0; width:min(380px, calc(100vw - 32px)); }
}

/* Home link: only in the phone menu (on a computer the name at the top left is the home link) */
.mw-links .nav-home{ display:none; }
@media (max-width: 640px){ .mw-links .nav-home{ display:inline-flex; } }

/* Home page: proof line under the tagline, the Start here row, and the Also on the site line */
.hero-proof{ max-width:560px; margin:14px auto 0; font-size:18px; font-style:italic; color:var(--ink-dim); }
.start-row{ margin-top:30px; }
.start-cards{ grid-template-columns:repeat(4, 1fr); gap:14px; margin-top:0; }
.start-cards .nav-group-title{ grid-column:1 / -1; }
.start-cards .nav-card:last-child:nth-child(odd){ grid-column:auto; }
.start-row{ max-width:1000px; margin-left:auto; margin-right:auto; }
.start-cards .nav-card{ min-height:0; padding:18px 12px; align-items:center; text-align:center; gap:8px; }
.start-cards .nav-card .glyph{ font-size:28px; }
.start-cards .nav-card h3{ font-size:19px; margin:0; }
.start-cards .nav-card .tag{ margin-top:0; font-size:12px; white-space:normal; }
@media (max-width: 760px){ .start-cards{ grid-template-columns:repeat(2, 1fr); } }
.more-links{ max-width:680px; margin:22px auto 0; text-align:center; font-family:var(--sans-ui); font-size:15px; line-height:1.9; color:var(--ink-dim); }
.more-links a{ color:var(--gold); text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }

/* On this page: jump links on long guides */
.toc{ margin:22px 0 26px; padding:16px 20px; border:1px solid var(--line, rgba(217,180,90,.28)); border-radius:12px; background:rgba(255,255,255,.03); }
.toc .toc-label{ margin:0 0 8px; font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); }
.toc ul{ margin:0; padding:0; list-style:none; columns:2; column-gap:28px; }
.toc li{ break-inside:avoid; margin:0 0 6px; font-size:15px; line-height:1.4; }
.toc a{ color:inherit; text-decoration:underline; text-underline-offset:3px; }
@media (max-width:640px){ .toc ul{ columns:1; } }
html{ scroll-padding-top:16px; }

/* Compact second sign-up box on the home page */
.newsletter-compact{ margin-top:0; padding:22px 20px; }
.newsletter-compact h2{ font-size:24px; margin:0 0 8px; }
.newsletter-compact .newsletter-copy{ margin:0 auto 14px; }
.newsletter-note{ margin:12px auto 0; font-size:14px; color:var(--ink-dim); font-family:var(--sans-ui); }

/* Moon Phase Today: previous and next day */
.mpt-days{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px 12px; margin:14px 0 0; font-family:var(--sans-ui); }
.mpt-day-label{ flex:1 1 220px; text-align:center; order:0; color:var(--ink); font-size:17px; min-width:0; }
.mpt-day-btn{ min-height:44px; padding:0 16px; border-radius:999px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-family:var(--sans-ui); font-size:15px; letter-spacing:.04em; cursor:pointer; }
.mpt-day-btn:hover:not(:disabled){ border-color:var(--gold-soft); }
.mpt-day-btn:disabled{ opacity:.4; cursor:default; }
.mpt-day-back{ flex:0 0 100%; max-width:200px; color:var(--gold); }
.mpt-day-back[hidden]{ display:none; }
@media (max-width:640px){
  .mpt-day-label{ order:-1; flex:0 0 100%; }
  .mpt-day-btn{ flex:1 1 0; }
  .mpt-day-back{ flex:0 0 100%; max-width:none; }
}

.post-meta-left{ text-align:center; margin:8px 0 22px; }

/* Birth Moon page */
.bm-form{ display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; justify-content:center; margin:18px 0 8px; font-family:var(--sans-ui); }
.bm-field{ display:flex; flex-direction:column; gap:6px; text-align:left; font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:var(--gold); }
.bm-field select, .bm-field input{ height:48px; box-sizing:border-box; border-radius:12px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-family:var(--sans-ui); font-size:16px; padding:0 14px; min-width:0; -webkit-appearance:none; appearance:none; }
.bm-field select{ min-width:170px; padding-right:34px; background-image:linear-gradient(45deg,transparent 50%,var(--gold) 50%),linear-gradient(135deg,var(--gold) 50%,transparent 50%); background-position:calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.bm-small input{ width:88px; text-align:center; }
.bm-field select:focus, .bm-field input:focus{ outline:2px solid var(--gold); outline-offset:2px; }
.bm-go{ height:48px; padding:0 24px; }
.bm-error{ text-align:center; color:var(--ink); font-family:var(--sans-ui); font-size:15px; margin:10px 0 0; }
.bm-note{ font-size:16px; color:var(--ink-dim); margin-top:18px; }
.bm-links{ margin:12px 0 14px; }
.bm-links a{ color:var(--gold); text-decoration:underline; text-underline-offset:3px; }
.bm-copied{ font-family:var(--sans-ui); font-size:14px; color:var(--ink-dim); margin:8px 0 0; }
#bmResult{ margin-top:22px; }
@media (max-width:640px){ .bm-field{ flex:1 1 100%; } .bm-small{ flex:1 1 calc(50% - 6px); } .bm-small input{ width:100%; } .bm-go{ flex:1 1 100%; } }

.bm-share{ display:inline-block; background:none; border:1px solid var(--line); color:var(--ink-dim); font-family:var(--sans-ui); font-size:13px; letter-spacing:.08em; text-transform:uppercase; padding:12px 22px; min-height:44px; border-radius:999px; cursor:pointer; }
.bm-share:hover{ color:var(--ink); border-color:var(--gold-soft); }
.mpt-birth-link{ text-align:center; font-family:var(--sans-ui); font-size:16px; color:var(--ink-dim); margin:16px 0 0; }
.mpt-birth-link a{ color:var(--gold); text-decoration:underline; text-underline-offset:3px; }

/* Home page refresh: one main button, picture tiles, fewer boxes */
.hero-cta-row{ text-align:center; margin:30px auto 0; }
.hero-cta{ display:inline-block; font-family:var(--sans-ui); font-size:15px; letter-spacing:.12em; text-transform:uppercase; text-decoration:none; background:linear-gradient(180deg, var(--gold), var(--gold-soft)); color:#1a1408; padding:17px 40px; border-radius:999px; min-height:44px; box-shadow:0 6px 22px rgba(0,0,0,.35); transition:transform .15s, filter .15s; }
.hero-cta:hover{ filter:brightness(1.1); transform:translateY(-2px); }
.hero-links{ margin:16px 0 0; font-family:var(--sans-ui); font-size:16px; color:var(--ink-dim); }
.hero-links a{ display:inline-block; padding:8px 4px; color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.hero-cta-row + .app-banner{ margin-top:26px; }

section#view-home .xp-title{ margin:0 0 26px; }
.xp-grid{ position:relative; left:50%; transform:translateX(-50%); width:min(940px, 100vw - 40px); display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:38px 28px; }
.xp-tile{ display:flex; flex-direction:column; gap:10px; text-align:left; color:var(--ink); text-decoration:none; }
.xp-tile h3{ margin:8px 0 0; font-size:22px; }
.xp-tile p{ margin:0; font-family:var(--sans-ui); font-size:16px; line-height:1.55; color:var(--ink-dim); }
.xp-tile .tag{ margin-top:4px; font-family:var(--sans-ui); font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); }
.xp-pic{ display:flex; align-items:center; justify-content:center; height:176px; border-radius:14px; border:1px solid #54468a; background:radial-gradient(ellipse at 50% 28%, #2c2757 0%, #181434 72%); overflow:hidden; position:relative; transition:border-color .15s, transform .15s; }
.xp-tile:hover .xp-pic, .xp-tile:focus-visible .xp-pic{ border-color:var(--gold-soft); transform:translateY(-3px); }
.xp-tile:focus-visible{ outline:2px solid var(--gold); outline-offset:4px; border-radius:14px; }
.xp-svg svg{ width:100%; height:100%; display:block; }
.xp-photo{ width:100%; height:100%; object-fit:contain; mix-blend-mode:screen; display:block; padding:8px 0; }
.xp-cards img{ position:absolute; height:148px; width:auto; border-radius:5px; box-shadow:0 6px 16px rgba(0,0,0,.5); top:50%; left:50%; }
.xp-c1{ transform:translate(-50%,-50%) translateX(-54px) rotate(-9deg); }
.xp-c2{ transform:translate(-50%,-50%) translateY(-4px); z-index:1; }
.xp-c3{ transform:translate(-50%,-50%) translateX(54px) rotate(9deg); }
@media (max-width: 900px){ .xp-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px){ .xp-grid{ grid-template-columns:minmax(0,1fr); gap:34px; } .xp-pic{ height:190px; } }

/* Open sections: only today's sky keeps a frame; the rest sit open between thin gold lines */
section#view-home .newsletter-block, section#view-home .retro-box{ background:linear-gradient(90deg, transparent, var(--gold-soft), transparent) top / 100% 1px no-repeat; border:0; border-radius:0; box-shadow:none; padding:40px 0 6px; }
section#view-home .newsletter-block{ margin-top:48px; }
section#view-home .newsletter-block.newsletter-compact{ margin-top:0; padding:40px 0 6px; }
section#view-home .retro-box{ margin-top:34px; }
section#view-home .more-links{ margin-top:52px; }

/* Home sky box: one line per planet, retrograde planets, the Moon */
.cotd-sky .sky-kicker{ margin:28px 0 10px; font-family:var(--sans-ui); font-size:13px; font-weight:500; letter-spacing:.24em; text-transform:uppercase; color:var(--gold); }
.cotd-sky .sky-kicker:first-of-type{ margin-top:20px; }
.cotd-sky .sky-intro{ margin:0 0 10px; text-align:left; }
.cotd-sky .sky-list{ list-style:none; margin:0; padding:0; text-align:left; }
.cotd-sky .sky-list li{ position:relative; margin:0 0 14px; padding-left:26px; font-size:20px; line-height:1.55; }
.cotd-sky .sky-list li::before{ content:"\2726"; position:absolute; left:2px; top:.05em; color:var(--gold); font-size:15px; }
.cotd-sky .sky-list li strong{ color:var(--ink); font-weight:600; }
.cotd-sky .sky-list li a{ color:var(--gold); }
.cotd-sky p.sky-intro{ font-size:20px; line-height:1.55; }
@media (min-width: 900px){ .cotd-sky .sky-list li, .cotd-sky p.sky-intro{ font-size:22px; line-height:1.6; } }
.cotd-sky .sky-more-btn{ margin-top:24px; }
.cotd-sky .sky-vedic-link{ margin:14px 0 18px; font-family:var(--sans-ui); font-size:16px; }
.cotd-sky .sky-vedic-link a{ color:var(--gold); text-decoration:underline; text-underline-offset:4px; }

/* Tonight's Sky: slower planets tucked behind a button */
.cotd-sky .sky-list li[hidden]{ display:none; }
.cotd-sky .sky-slow-btn{ display:block; margin:2px 0 22px 26px; padding:8px 16px; background:none; border:1px solid var(--gold-soft); border-radius:999px; color:var(--gold); font-family:var(--sans-ui, inherit); font-size:15px; letter-spacing:.04em; cursor:pointer; }
.cotd-sky .sky-slow-btn:hover, .cotd-sky .sky-slow-btn:focus-visible{ border-color:var(--gold); }

/* Tonight's Sky on phones: Moon and Sun first, the rest behind the button */
.cotd-sky .sky-slow-btn .lbl-m{ display:none; }
@media (max-width: 600px){
  .cotd-sky .sky-slow-btn .lbl-d{ display:none; }
  .cotd-sky .sky-slow-btn .lbl-m{ display:inline; }
  .cotd-sky:not(.sky-open) .sky-mid, .cotd-sky:not(.sky-open) .sky-retro-wrap{ display:none; }
}

/* From the library */
section#view-home .lib-row{ margin:52px auto 0; max-width:940px; padding-top:40px; background:linear-gradient(90deg, transparent, var(--gold-soft), transparent) top / 100% 1px no-repeat; text-align:center; }
section#view-home .lib-kicker{ margin:0 0 20px; font-family:var(--sans-ui); font-size:13px; font-weight:500; letter-spacing:.24em; text-transform:uppercase; color:var(--gold); }
.lib-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px 28px; text-align:left; }
.lib-item{ display:flex; flex-direction:column; gap:6px; color:var(--ink); text-decoration:none; padding:4px 0; }
.lib-item strong{ font-size:21px; font-weight:600; color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.lib-item span{ font-family:var(--sans-ui); font-size:16px; line-height:1.55; color:var(--ink-dim); }
.lib-item:hover strong, .lib-item:focus-visible strong{ color:var(--ink); }
@media (max-width: 700px){ .lib-grid{ grid-template-columns:minmax(0,1fr); text-align:center; } }
section#view-home .more-links{ margin-top:34px; }

/* Free ebook box with the cover */
.ebook-feature{ display:grid; grid-template-columns:150px minmax(0,1fr); gap:30px; align-items:center; text-align:left; }
.ebook-feature .ebook-cover{ width:150px; height:auto; border-radius:6px; box-shadow:0 10px 28px rgba(0,0,0,.5); display:block; }
.ebook-feature .ebook-body{ min-width:0; }
.ebook-feature .newsletter-copy, .ebook-feature .newsletter-form{ margin-left:0; margin-right:0; justify-content:flex-start; }
@media (max-width: 640px){
  .ebook-feature{ grid-template-columns:minmax(0,1fr); text-align:center; gap:22px; justify-items:center; }
  .ebook-feature .ebook-cover{ width:132px; }
  .ebook-feature .newsletter-copy, .ebook-feature .newsletter-form{ margin-left:auto; margin-right:auto; justify-content:center; }
}

/* Nine Explore tiles: three rows of three on tablets and computers */
@media (min-width: 700px){ .xp-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:34px 22px; } }
@media (min-width: 481px) and (max-width: 699px){ .xp-grid .xp-tile:last-child:nth-child(odd){ grid-column:1 / -1; justify-self:center; width:calc(50% - 14px); } }
/* Explore grid width on zoomed screens: the page is zoomed 1.15 (and 1.25 on wide screens), so the width is divided by the zoom */
@media (min-width: 900px){ .xp-grid{ width:min(940px, (100vw - 40px) / 1.15); gap:38px 28px; } }
@media (min-width: 1500px){ .xp-grid{ width:min(940px, (100vw - 40px) / 1.25); } }

/* Home page: row of four tool links under the opening lines */
.hero-links{ display:flex; flex-wrap:wrap; justify-content:center; gap:0 16px; margin:14px auto 0; max-width:560px; font-family:var(--sans-ui); }
.hero-links a{ display:inline-flex; align-items:center; min-height:44px; padding:0; font-size:16px; color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.hero-links a:hover{ color:var(--ink); }

/* Index pages: every link in the list is at least 44px tall for a thumb */
ul.tap-list a{ display:inline-block; padding:9px 6px; line-height:1.3; }
ul.tap-list li{ margin:0; }

/* Shop on the phone and small tablets: larger buy buttons and author lines */
@media (max-width: 700px){
  .product-grid.centered > .book-card .book-author{ font-size:14px; }
  .product-grid.centered > .book-card .buy-btn{ font-size:14px; letter-spacing:0.04em; padding:10px 16px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; white-space:normal; text-align:center; }
}

.hero .hero-proof a{ color:var(--gold); text-decoration:underline; text-underline-offset:3px; }

/* Menu chip: keep "Last Quarter · about half lit" on one line on small phones */
@media (max-width: 420px){ .moon-chip{ letter-spacing:0; } #navMoonLabel{ white-space:nowrap; } }
@media (max-width: 350px){ .mw-top-right{ flex-wrap:wrap; justify-content:flex-end; } }

/* Small labels: 12px at least; the three that read as links or dates are 13px */
.blog-card .date, .blog-card .read-more, .cm-tile-num{ font-size:13px; }
.guide-card .tag, .mpt-tonight, .mrx-tag, .retro-badge, .retro-vlbl, .mpt-row dt, .mpt-phase-go, .cm-glance dt, .product-card .placeholder-note, .site-search-results a small b{ font-size:12px; }

/* Tap size: controls are at least 44px tall */
.moon-chip{ min-height:44px; }
.wordmark{ min-height:44px; }
footer .footer-links a{ display:inline-flex; align-items:center; min-height:44px; }
body .sky-signs button{ display:inline-flex; align-items:center; justify-content:center; min-height:44px; }
body .sky-pick input{ min-height:44px; box-sizing:border-box; }
body .sky-share .sky-share-btn, body .sky-share a{ display:inline-flex; align-items:center; min-height:44px; box-sizing:border-box; }
/* Inline text buttons inside a sentence: the tap area grows without moving the text */
button.sky-ved-btn{ display:inline-block; padding:12px 2px; margin:-12px 0; }

/* Zodiac pairing index: one fold per sign, with its partners as tap-size chips */
.pair-folds{ display:flex; flex-direction:column; gap:10px; margin:14px 0 22px; }
.pair-folds details{ border:1px solid var(--gold-soft); border-radius:12px; background:var(--surface); }
.pair-folds summary{ list-style:none; cursor:pointer; min-height:48px; display:flex; align-items:center; justify-content:space-between; padding:0 16px; font-family:var(--serif-display); font-size:20px; color:var(--ink); }
.pair-folds summary::-webkit-details-marker{ display:none; }
.pair-folds summary::after{ content:"+"; color:var(--gold); font-family:var(--sans-ui); font-size:22px; line-height:1; }
.pair-folds details[open] summary::after{ content:"\2212"; }
.pair-folds .pair-chips{ display:flex; flex-wrap:wrap; gap:8px; padding:4px 14px 16px; }
.pair-folds .pair-chips a{ display:inline-flex; align-items:center; min-height:44px; padding:0 14px; border:1px solid var(--gold-soft); border-radius:999px; font-family:var(--sans-ui); font-size:15px; color:var(--ink); text-decoration:none; background:var(--surface-2); }
.pair-folds .pair-chips a:hover{ border-color:var(--gold); color:var(--gold); }
.site-search input{ height:44px; }
body .sky-tabs button{ display:inline-flex; align-items:center; justify-content:center; min-height:44px; }
td > a, th > a{ display:inline-block; padding:10px 0; }
/* Lists of links ("Keep reading", "Also on the site", chart jump links): each link is tap size */
.byline a, .more-links a, .chart-jump a{ display:inline-block; padding:11px 3px; }
/* Home: the privacy paragraph under the four links is small, plain text so the Moon box starts higher */
.hero p.hero-proof{ font-family:var(--sans-ui, var(--sans, system-ui, sans-serif)); font-size:15px; font-style:normal; line-height:1.55; max-width:520px; margin-top:12px; }
/* Small privacy note under the Generate and Read buttons */
.tool-note{ text-align:center; max-width:520px; margin:10px auto 0; font-family:var(--sans-ui, system-ui, sans-serif); font-size:14px; line-height:1.5; color:var(--ink-faint); }
/* Blog posts: share links and "Keep reading" links are thumb size */
body .post-share a{ font-size:13px; min-height:44px; display:inline-flex; align-items:center; padding-top:0; padding-bottom:0; }
body p.byline a{ min-height:44px; display:inline-flex; align-items:center; padding-top:0; padding-bottom:0; }
/* Phone header on the main pages: a small search button beside the name; the search box opens when tapped */
.ss-toggle{ display:none; }
@media (max-width: 640px){
  .mw-top .ss-toggle{ display:flex; flex:none; width:44px; height:44px; align-items:center; justify-content:center; background:transparent; border:1px solid var(--line); border-radius:8px; color:var(--ink-dim); cursor:pointer; padding:0; }
  .mw-top .ss-toggle:hover, .mw-top .ss-toggle[aria-expanded="true"]{ color:var(--gold); border-color:var(--gold-soft); }
  .mw-top .ss-toggle:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
  nav.mw-nav > .mw-top ~ .site-search.ss-collapsed{ display:none; }
  .mw-top .wordmark{ font-size:clamp(15px, 4.6vw, 19px); letter-spacing:0.1em; min-width:0; }
  .mw-top .wordmark .glyph{ font-size:clamp(16px, 5vw, 22px); }
}
/* Very small phones: the Moon chip shows the phase name alone so it fits beside Menu */
@media (max-width: 340px){ .moon-chip .chip-lit{ display:none; } }

/* keyboard access to tables that scroll sideways */
.chart-wrap:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

.cotd-week .wk-also{ font-family:var(--sans-ui); font-size:12px; letter-spacing:.2em; text-transform:uppercase; color:#d9b45a; margin:12px 0 2px; }

/* ---- Top bar on the main pages: name, Moon chip beside it, search at the far right ---- */
/* The search button (shown until the screen is wide enough for the search box) */
nav.mw-nav > .mw-top .ss-toggle{ display:flex; flex:none; width:44px; height:44px; align-items:center; justify-content:center; background:transparent; border:1px solid var(--line); border-radius:8px; color:var(--ink-dim); cursor:pointer; padding:0; }
nav.mw-nav > .mw-top .ss-toggle:hover, nav.mw-nav > .mw-top .ss-toggle[aria-expanded="true"]{ color:var(--gold); border-color:var(--gold-soft); }
nav.mw-nav > .mw-top .ss-toggle:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
nav.mw-nav > .mw-top ~ .site-search{ position:relative; top:auto; right:auto; width:100%; max-width:420px; margin:0 0 0 auto; order:1; }
nav.mw-nav > .mw-top ~ .site-search.ss-collapsed{ display:none; }
/* Wide screens: the Moon chip sits right beside the name and the search button sits at the far right */
@media (min-width: 721px){
  nav.mw-nav > .mw-top{ justify-content:flex-start; flex-wrap:nowrap; gap:16px; }
  nav.mw-nav > .mw-top .wordmark{ order:0; }
  nav.mw-nav > .mw-top .mw-top-right{ order:1; flex:none; margin:0; flex-basis:auto; justify-content:flex-start; }
  nav.mw-nav > .mw-top .ss-toggle{ order:2; margin-left:auto; }
  nav.mw-nav > .mw-links{ order:2; }
}
/* Wide enough for the name, the Moon chip and the search box in one row: the search box shows, with no button */
@media (min-width: 1010px){
  nav.mw-nav > .mw-top .ss-toggle{ display:none; }
  nav.mw-nav > .mw-top ~ .site-search, nav.mw-nav > .mw-top ~ .site-search.ss-collapsed{ display:block; position:absolute; right:0; left:auto; width:240px; max-width:240px; margin:0; order:0; }
}
/* Phones and small tablets: the name and the search button share the first row, the Moon chip sits under the name and Menu sits at the far right of the second row */
@media (max-width: 720px){
  nav.mw-nav > .mw-top{ flex-wrap:wrap; justify-content:flex-start; gap:10px 12px; }
  nav.mw-nav > .mw-top .wordmark{ flex:1 1 0; min-width:0; order:0; }
  nav.mw-nav > .mw-top .ss-toggle{ order:1; margin-left:0; }
  nav.mw-nav > .mw-top .mw-top-right{ order:2; flex:0 0 100%; justify-content:space-between; margin:0; gap:12px; }
}

/* Home page tool links as buttons (approved wording pass, Nov 2026) */
.hero-links{ gap:10px 12px; }
.hero-links a{ padding:0 20px; border:1px solid var(--gold); border-radius:999px; text-decoration:none; justify-content:center; }
.hero-links a:hover{ background:rgba(201,163,95,0.12); }
@media (max-width:480px){ .hero-links{ display:grid; grid-template-columns:1fr 1fr; max-width:340px; } .hero-links a{ padding:0 8px; } }
.post-now{ margin:14px 0 0; padding:12px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); font-family:var(--sans-ui); font-size:15px; line-height:1.5; color:var(--ink-dim); }
.post-now a, .post-ebook-jump a, .hero-new a{ color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.post-ebook-jump{ margin:26px 0; padding:12px 16px; border-left:2px solid var(--gold); background:var(--surface); font-family:var(--sans-ui); font-size:15px; line-height:1.5; color:var(--ink-dim); }
.hero-new{ margin:12px auto 0; max-width:520px; font-family:var(--sans-ui); font-size:15px; line-height:1.5; color:var(--ink-dim); }

/* 404 page list links: 44px tall tap targets */
body .article ul li a[href^="/"]{ display:inline-flex; align-items:center; min-height:44px; }

/* Footer: the eight Moon phase links sit in a closed toggle */
.foot-phases summary{ display:flex; align-items:center; min-height:44px; padding:4px 0; font-size:15px; line-height:1.3; color:var(--gold); cursor:pointer; }
.foot-phases summary:hover{ color:var(--ink); }
.foot-phases[open] summary{ margin-bottom:2px; }

/* Vedic astrology page and home page button (Nov 2026) */
.hero-links a.hero-vedic{ background:rgba(201,163,95,0.14); }
@media (max-width:480px){ .hero-links a.hero-vedic{ grid-column:1 / -1; } }
.vedic-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px 12px; margin:20px 0 0; font-family:var(--sans-ui); }
.vedic-btn{ display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 20px; border:1px solid var(--gold); border-radius:999px; color:var(--gold); text-decoration:none; font-size:16px; background:rgba(201,163,95,0.10); }
.vedic-btn:hover{ background:rgba(201,163,95,0.2); color:var(--ink); }
@media (max-width:480px){ .vedic-btn{ flex:1 1 100%; } }
