:root{color-scheme:light;--ink:#101d36;--blue:#06162f;--gold:#bb8537;--ivory:#f4ebd8}
*{box-sizing:border-box}
body{margin:0;background:var(--ivory) linear-gradient(#f5ecdb88,#f5ecdb88),url(marble.webp) repeat;color:var(--ink);font-family:Georgia,'Noto Serif CJK JP',serif}
a{color:inherit}
h1,h2,h3,p{margin:.5em 0}
h2{font-size:clamp(1.4rem,3.2vw,2.2rem)}
img{display:block;max-width:100%}
.mast{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;background:var(--blue);color:#f7d087;border-bottom:2px solid var(--gold);padding:.65rem clamp(1rem,4vw,3rem)}
.mast>a{font-size:1.35rem;text-decoration:none}.mast nav{display:flex;gap:.75rem;flex-wrap:wrap}
.hero,.history,.faq{position:relative;isolation:isolate}
.hero{display:grid;place-items:center;text-align:center;min-height:clamp(230px,26vw,430px);background:var(--blue);color:#ffdc99;border-bottom:3px ridge var(--gold)}
.hero img,.history img,.faq img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.hero::before,.faq::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,transparent,#06162fbd 40%,#06162fbd 60%,transparent)}
.hero div{width:min(92%,690px);padding:1rem;margin:auto}
.hero h1{font-size:clamp(1.6rem,3.6vw,3rem);text-shadow:0 2px 4px #020713}
.hero a{color:#fff2cd;text-decoration:none;letter-spacing:.07em}
.tools,#livres,.calculator{max-width:1350px;margin:auto;padding:1.2rem clamp(.85rem,3vw,2.2rem)}
.tools h2,#livres h2{text-align:center}
.cards,.books{display:grid;gap:.8rem;grid-template-columns:repeat(6,minmax(0,1fr))}
.tool{display:flex;flex-direction:column;align-items:center;text-align:center;background:radial-gradient(ellipse at top,#193758 0%,#091c36 55%,#06162f 100%);color:#fff4de;border:4px double #daa950;border-radius:.75rem;padding:.6rem .48rem}
.tool img{width:100%;max-width:170px;height:auto;object-fit:contain}
.tool h3{color:#ffdfa1;line-height:1.15}
.tool p{margin:auto 0 .7rem;font-size:.9rem;line-height:1.32}
.gold{display:inline-block;border:1px solid #9a6425;border-radius:.35rem;background:linear-gradient(#fff2c1,#d9a34e 55%,#ac7330);padding:.55rem .66rem;color:#23180b;text-decoration:none;text-align:center;font:inherit;font-weight:bold;cursor:pointer;max-width:100%}
.history{min-height:170px;display:grid;place-items:center;border-block:1px solid #b2864d}
.history div{width:min(64%,60ch);background:#f8efdbdc;padding:1rem;text-align:center}
.books{grid-template-columns:repeat(3,minmax(0,1fr))}
.book{display:grid;grid-template-columns:minmax(70px,35%) minmax(0,1fr);align-items:center;gap:.85rem;border:1px solid #bea77d;border-radius:.5rem;padding:.75rem}
.book strong{display:block;font-size:1.35rem;color:#603814;margin:.45rem 0}
.cover{perspective:600px;padding-left:.25rem}
.cover img{width:100%;height:auto;transform:rotateY(-10deg);border-left:.28rem ridge #b88e46;box-shadow:4px 5px 8px #24180f66}
.faq{padding:1rem;background:var(--blue);color:#fff4de;min-height:260px;border-top:3px ridge var(--gold)}
.faq div{width:min(65%,640px);margin:auto}
.faq details{background:#06162fee;border:1px solid var(--gold);border-radius:.4rem;padding:.65rem}
form label{display:block;padding:.25rem 0}
input:not([type=checkbox]){display:block;width:100%;min-height:2.55rem;border:1px solid #927951;border-radius:.32rem;background:#fffdf6;color:#14233d;padding:.35rem;font:inherit}
#birth{display:flex;align-items:end;flex-wrap:wrap;gap:.65rem}
#birth label{flex:1 1 160px}
#birth button:not(.gold){min-height:2.4rem;border:1px solid #927951;border-radius:.35rem;background:#fffdf6;padding:.4rem .6rem;color:var(--ink);font:inherit}
#result{overflow-wrap:anywhere}
@media(max-width:1000px){.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.books{grid-template-columns:1fr}.book{grid-template-columns:minmax(80px,130px) minmax(0,1fr)}}
@media(max-width:540px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.hero img{object-fit:cover}.hero::before{background:#06162f70}.history div,.faq div{width:90%}}


body { background: var(--ivory) url(marble.webp) repeat; line-height: 1.5; }
.mast > a { display: flex; gap: .4rem; align-items: center; }
.mast nav a { text-decoration: none; }
.mast nav a:hover, .mast nav a:focus-visible { text-decoration: underline; }
.languages { position: relative; z-index: 2; }
.languages summary { cursor: pointer; padding: .3rem .6rem; border: 1px solid var(--gold); border-radius: .3rem; }
.languages nav { position: absolute; right: 0; min-width: 10rem; padding: .6rem; background: var(--blue); border: 1px solid var(--gold); }
.languages a { padding: .2rem; }
.subtitle { color: #fff6df; font-size: clamp(1rem, 2vw, 1.3rem); font-style: italic; text-shadow: 0 2px 4px #020713; }
.subtitle::before { content: '❧'; display: block; color: #ffdc99; }
.tools h2::after, #livres h2::after { content: ''; display: block; width: 4rem; margin: .4rem auto .85rem; border-block: 1px solid var(--gold); height: 4px; }
.tool { padding: .75rem; }
.tool p { font-size: 1rem; }
.gold { min-height: 44px; }
.history { display: block; position: relative; padding: 1.5rem clamp(1rem, 17vw, 15rem); }
.history::before, .history::after { content: ''; position: absolute; top: 0; width: min(16vw, 175px); aspect-ratio: 1; background: url(history.webp) left top / auto 100% no-repeat; pointer-events: none; }
.history::before { left: 0; }
.history::after { right: 0; background-position: right top; }
.history .history-inner { width: 100%; padding: 0; background: none; text-align: start; display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.history h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.history article + article { border-inline-start: 1px solid var(--gold); padding-inline-start: 1.3rem; }
.history ul { padding-inline-start: 1.1rem; }
.history li::marker { color: #89581f; }
.book { align-items: start; background: #fff8e980; grid-template-columns: minmax(90px, 42%) minmax(0, 1fr); }
.cover { position: relative; padding: .3rem .5rem .3rem .7rem; }
.cover img { transform: rotateY(-18deg); border-left: .5rem ridge #a87b40; box-shadow: 8px 5px 0 -2px #8b683e, 12px 8px 11px #24180f69; border-radius: .16rem; }
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; border-block-start: 1px solid var(--gold); }
.trust div { padding: .9rem .65rem; }
.trust div + div { border-inline-start: 1px solid #b7894c70; }
.trust span { font-size: 1.9rem; line-height: 1; color: #87591d; }
.trust h3 { line-height: 1.2; }
.faq details + details { margin-block-start: .5rem; }
.faq h2 { text-align: center; }
.faq summary { cursor: pointer; }
@media (max-width: 850px) {
  .mast > nav { width: 100%; order: 1; font-size: .95rem; }
  .book { grid-template-columns: minmax(98px, 150px) minmax(0, 1fr); }
  .history { padding-inline: clamp(1rem, 7vw, 3rem); }
  .history::before, .history::after { display: none; }
}
@media (max-width: 580px) {
  .history .history-inner, .trust { grid-template-columns: 1fr 1fr; }
  .history .history-inner { grid-template-columns: 1fr; gap: .5rem; }
  .history article + article { border-inline-start: 0; border-block-start: 1px solid var(--gold); padding-inline-start: 0; }
  .trust div:nth-child(3) { border-inline-start: 0; }
  .trust div:nth-child(n+3) { border-block-start: 1px solid #b7894c70; }
  .faq div { width: 100%; }
}
#result .result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .65rem; padding: 0; list-style: none; }
#result .result-grid li { padding: .7rem; border: 1px solid #b7894c; background: #fffbef; border-radius: .35rem; }
#result [aria-current] { border-width: 2px; background: #f6e0b4; }
#result progress, #result meter { display: block; width: min(100%, 22rem); accent-color: #96601e; }
#result dd { margin: 0 0 .7rem; }
#result dt { font-weight: bold; }

/* Alexandria hub ornaments, extracted from the approved artwork. */
body {
  background: var(--ivory) url(ivory-veins.webp) repeat;
  background-size: 320px auto;
}
.mast { gap: .35rem 1rem; }
.mast > a { white-space: nowrap; }
.mast > nav { justify-content: center; }
.mast nav a, .languages summary { min-height: 44px; display: flex; align-items: center; padding: .35rem .5rem; }
.languages summary::after { content: '⌄'; margin-inline-start: .45rem; }
.languages nav { display: grid; grid-template-columns: repeat(2, 1fr); z-index: 2; gap: .15rem; }
.languages a[aria-current] { outline: 1px solid var(--gold); }

.tools {
  --column: clamp(14px, 4.25vw, 56px);
  position: relative;
  max-width: 1450px;
  padding: .65rem calc(var(--column) + .4rem) 1.1rem;
  background: url(column-left.webp) left center / var(--column) 100% no-repeat,
    url(column-right.webp) right center / var(--column) 100% no-repeat;
}
.tools h2, #livres h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  line-height: 1.14;
}
.tools h2::before, .tools h2::after, #livres h2::before, #livres h2::after {
  content: '';
  display: block;
  flex: 0 0 clamp(18px, 3vw, 37px);
  height: 35px;
  margin: 0;
  border: 0;
  background: url(laurel.webp) center / contain no-repeat;
  mix-blend-mode: multiply;
}
.tools h2::after, #livres h2::after { transform: scaleX(-1); }
.cards { gap: clamp(.34rem, .8vw, .75rem); }
.tool {
  border: 0;
  border-radius: 0;
  padding: .48rem .5rem .65rem;
  background: url(card-frame.svg) center / 100% 100% no-repeat,
    radial-gradient(ellipse at top,#1b3a5d,#06162f 76%);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px),
    calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.tool h3 { margin: .3rem 0; }
.tool p { font-size: clamp(.8rem, 1.2vw, 1rem); margin: auto 0 .55rem; }
.tool .gold { width: 90%; }
.tool .gold::after { content: ' →'; }
.gold { line-height: 1.22; }
.history { border-block: 2px groove #c89c55; }
.history li { list-style: '✓  '; }
.history a { display: inline-block; border: 1px solid #9a6425; background: #f3ddb2; padding: .25rem .5rem; border-radius: .3rem; }
#livres { padding-block: .65rem .8rem; }
.book { align-items: center; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); padding: .6rem; gap: .55rem; align-self: start; }
.book h3, .book p { line-height: 1.25; margin: .25rem 0; }
.book h3 { overflow-wrap: anywhere; }
.book .cover { padding: .25rem .45rem .4rem .12rem; }
.book .cover img { transform: rotateY(-13deg); border-left-width: .32rem; }
.book summary.gold { padding-inline: .4rem; width: 100%; align-content: center; overflow-wrap: anywhere; }
.trust { border-block-start: 2px groove #c89c55; }
.trust img { width: 58px; height: 46px; object-fit: contain; margin: auto; mix-blend-mode: multiply; }
.trust h3, .trust p { margin: .18rem 0; }
.faq { border-top: 3px ridge #d9ad65; }
.faq details { border-color: #d9ad65; box-shadow: inset 0 0 0 2px #091e39; padding: 0; }
.faq summary { display: flex; gap: .75rem; justify-content: space-between; align-items: center; min-height: 44px; padding: .35rem .8rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: 0 0 .57rem; height: .57rem; border: solid #f7d087; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq details p { margin: 0; padding: 0 .8rem .65rem; }
.mast :focus-visible, .gold:focus-visible, .faq summary:focus-visible { outline: 2px solid #e1ad4b; outline-offset: -2px; }
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .books { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
}
@media (max-width: 959px) {
  .book { grid-template-columns: minmax(0, 35%) minmax(0, 1fr); }
  .book .cover { width: min(100%, 170px); justify-self: center; }
}
@media (max-width: 850px) {
  .mast { padding: .35rem .7rem; }
  .mast > nav { border-top: 1px solid #b7894c70; gap: 0 .38rem; }
}
@media (max-width: 600px) {
  .trust { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trust div:nth-child(3) { border-inline-start: 0; }
  .trust div:nth-child(n+3) { border-block-start: 1px solid #b7894c70; }
  .faq div { width: 100%; }
}
.section-intro { text-align: center; margin: .15rem auto .9rem; line-height: 1.3; }
body[data-tool=""] .hero h1 {
  text-transform: uppercase;
  font-size: clamp(1.75rem, 4.4vw, 4.15rem);
  max-width: 15ch;
  line-height: 1.04;
  margin: .12em auto;
}
.subtitle::before {
  content: '';
  height: 17px;
  width: min(100%, 145px);
  margin: 0 auto .35rem;
  background: url(hero-laurel.webp) center / contain no-repeat;
}
@media (max-width: 520px) {
  .hero::before { background: #06162f80; }
  .hero div { padding-inline: .4rem; }
}
body { background-image: url(ivory-veins.webp?v=2); background-size: 640px auto; }
.tools h2::before, .tools h2::after, #livres h2::before, #livres h2::after {
  background-image: url(laurel.webp?v=2);
}
.faq div { width: min(62%, 800px); }
@media (min-width: 960px) {
  .books { align-items: stretch; }
  .book { align-self: stretch; }
  .book > div:last-child { display: flex; flex-direction: column; height: 100%; }
  .book strong { margin-block-start: auto; padding-block-start: .4rem; }
  .book h3 { margin-bottom: .25rem; }
  .book p { font-size: .95rem; }
}
@media (max-width: 600px) {
  .faq div { width: 100%; }
}

/* Shared personalized results, independent of the astronomical engine. */
#result:not(:empty){margin-block:1rem;padding:clamp(.65rem,2.5vw,1.3rem);background:#fffaf0e8;border:1px solid #b7894c;border-radius:.45rem;box-shadow:0 4px 16px #392a1415;overflow-wrap:anywhere}
#result .personal-reading{margin-bottom:1.1rem}
#result .personal-reading h3,#result .reading-premium h3{font-size:clamp(1.25rem,3.6vw,1.8rem);margin:.2rem 0 .8rem}
#result .reading-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:.7rem}
#result .reading-card,#result .result-grid li{border:1px solid #b7894c;border-radius:.35rem;background:#fffcf3;padding:.8rem;min-width:0}
#result .reading-card h4{font-size:1.08rem;color:#173252;margin:0 0 .5rem}
#result p{line-height:1.5;margin:.4rem 0}
#result .reading-question{padding:.5rem .6rem;background:#f2e5ca;border-inline-start:3px solid #b7894c;font-style:italic}
#result .reading-premium{margin-top:1.25rem;padding:clamp(.75rem,2vw,1.2rem);color:#fff4df;background:#0c223e;border:1px solid #d8b06b;border-radius:.4rem}
#result .reading-premium h3,#result .reading-premium h4{color:#f5d494}
#result .reading-book{display:grid;grid-template-columns:minmax(64px, min(26%,140px)) minmax(0,1fr);gap:.8rem;align-items:center}
#result .reading-book img{display:block;width:100%;height:auto;box-shadow:3px 5px 9px #0007}
#result .reading-book h4{font-size:1.14rem;margin:0}
#result .reading-book .gold{max-width:100%;white-space:normal;min-height:44px;align-content:center}
@media(max-width:600px){#result .reading-grid,#result .result-grid{grid-template-columns:1fr}body[data-tool]:not([data-tool=""]) .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

.hellenistic-wheel{margin:0 auto 1.25rem;max-width:44rem}
.hellenistic-wheel h3{text-align:center}
.hellenistic-wheel svg{display:block;width:100%;height:auto;max-width:36rem;margin:.25rem auto}
.wheel-rim{fill:#12355d;stroke:#b58a4a;stroke-width:5}
.wheel-dial{fill:#f5e8d1;stroke:#d9b579;stroke-width:2}
.wheel-field{fill:#102a4c;stroke:#b58a4a;stroke-width:2}
.wheel-tick-ring{fill:none;stroke:#9a754b;stroke-width:1}
.wheel-sector{fill:#f4e6cd;stroke:#9a754b;stroke-width:2}
.wheel-house:nth-child(4n) .wheel-sector{fill:#e9d6b5}
.wheel-house.wheel-annual .wheel-sector{fill:#e3b565;stroke:#7a451a;stroke-width:4}
.wheel-house.wheel-selected .wheel-sector,.wheel-house:focus-visible .wheel-sector{stroke:#173c66;stroke-width:5}
.wheel-sign,.wheel-glyph{font:25px 'DejaVu Sans','Noto Sans Symbols 2',sans-serif}
.wheel-number{font:bold 16px Georgia,serif}
.wheel-sign,.wheel-number{fill:#142d4e}
.wheel-divider,.wheel-tick,.wheel-leader{stroke:#87613a;pointer-events:none}
.wheel-divider{stroke-width:2}
.wheel-leader{stroke:#d9b579;stroke-width:1.15}
.wheel-anchor{fill:#60401d}
.wheel-asc-anchor{fill:#f8e2a0;stroke:#704712;stroke-width:2}
.wheel-guides{pointer-events:none}
.wheel-medallion{fill:#153b66;stroke:#dfbc81;stroke-width:2}
.wheel-marker.wheel-selected .wheel-medallion,.wheel-marker:focus-visible .wheel-medallion{fill:#f7e0ad;stroke:#fff1c7;stroke-width:3}
.wheel-glyph,.wheel-asc{fill:#fff0cc;pointer-events:none}
.wheel-marker.wheel-selected text,.wheel-marker:focus-visible text{fill:#183557}
.wheel-asc,.wheel-brand{font:bold 12px Georgia,serif}
.wheel-brand{fill:#f9e6b8;letter-spacing:1px}
.wheel-rose-ring{fill:#0b2140;stroke:#a27a47}
.wheel-rose-light{fill:#f1d594}
.wheel-rose-gold{fill:#bb8537}
.wheel-marker,.wheel-house{cursor:pointer}
.hellenistic-wheel label{display:grid;gap:.35rem;margin:.65rem 0}
.hellenistic-wheel select{max-width:100%;min-height:44px;width:100%;font:inherit;color:#142d4e;background:#fffaf0;border:1px solid #a27a47;border-radius:.25rem;padding:.35rem}
.wheel-details{padding:.75rem;background:#fffaf0;border-inline-start:3px solid #bb8537}
.wheel-caption{text-align:center}
.wheel-sky{fill:#153b66}
.wheel-ground{fill:#d9bf98}
.wheel-sun{fill:#ffce72;stroke:#7a451a;stroke-width:2}
.wheel-horizon-line{stroke:#e9bb70;stroke-width:3}
.wheel-horizon-label{fill:#fff8e8;font:bold 22px Georgia,serif}
.reading-book form{display:grid;gap:.5rem;margin-top:.75rem}
.reading-book form input[type=email]{display:block;width:100%;max-width:100%}
.wheel-marble{opacity:.47}
.wheel-annual .wheel-marble{opacity:.17}

/* Localized breadcrumb above the calculator title. */
.hero .alexandria-breadcrumb{display:flex;flex-wrap:wrap;justify-content:center;gap:.25rem .45rem;font-size:clamp(.75rem,1.6vw,.95rem);line-height:1.4;color:#fff3d4;margin:.35rem auto;max-width:100%}.hero .alexandria-breadcrumb a{color:inherit;text-decoration:underline;text-underline-offset:2px}.hero .alexandria-breadcrumb span[aria-current]{font-weight:600}
