:root { color-scheme: light; --ink: #15172b; --cream: #fbf5eb; --navy: #0e152e; --red: #801e26; --gold: #f4cb82; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fffaf4; color: var(--ink); font: 1rem/1.55 Georgia, "Noto Serif", serif; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.15vw, 3.7rem); }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.5rem); }
p { margin: .65em 0; }
a { color: var(--red); }
a:focus-visible, button:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid #bf7b3c; outline-offset: 3px; }
.yi-width { width: min(calc(100% - 6.6vw), 1440px); margin-inline: auto; }
.yi-header, .oraclastra-universal-header { position: relative; z-index: 1; min-height: 57px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding: .45rem max(1rem, 3vw); background: var(--navy); color: white; }
.yi-header a, .oraclastra-universal-header a { color: inherit; text-decoration: none; }
.yi-brand, .oraclastra-universal-brand { display: inline-flex; align-items: center; gap: .5rem; font-size: clamp(1.2rem, 2.1vw, 1.8rem); min-height: 42px; }
.oraclastra-universal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.oraclastra-universal-nav > a, .yi-languages summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.yi-languages { position: relative; }
.yi-languages > div { position: absolute; right: 0; top: 100%; z-index: 2; min-width: 9rem; padding: .3rem .65rem; background: var(--navy); border: 1px solid #d2aa6b; border-radius: .5rem; }
.yi-languages a { display: flex; min-height: 44px; align-items: center; }
.yi-languages a[aria-current] { color: var(--gold); }
.oraclastra-universal-menu { display: none; }
.yi-hero { position: relative; isolation: isolate; background: radial-gradient(ellipse at left bottom, #47516e, #101831 68%); }
.yi-hero::before, .yi-hero::after { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 0; }
.yi-hero::before { top: 0; width: min(28vw, 382px); height: 65%; background: url('/yi-jing/mock-temple.webp') left top / min(22.2vw, 326px) auto no-repeat; mask-image: linear-gradient(to right, black 65%, transparent), linear-gradient(to bottom, black 74%, transparent); mask-composite: intersect; }
.yi-hero::after { bottom: 0; width: min(50vw, 760px); height: min(18vw, 266px); background: url('/yi-jing/mock-coins.webp') left bottom / contain no-repeat; mask-image: linear-gradient(to right, black 78%, transparent), linear-gradient(to top, black 81%, transparent); mask-composite: intersect; }
.yi-hero-grid { width: min(calc(100% - 4.2vw), 1490px); min-height: 517px; display: grid; grid-template-columns: minmax(0, 1.53fr) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 2.3vw, 2rem); padding: 30px 0 26px; }
.yi-intro { padding-inline-start: min(17vw, 246px); color: white; text-align: center; text-shadow: 0 2px 8px #070e22; }
.yi-intro h1 { font-size: clamp(1.85rem, 3vw, 2.65rem); margin-bottom: .55em; }
.yi-intro p { max-width: 23em; margin-inline: auto; font-size: clamp(1.04rem, 1.6vw, 1.36rem); line-height: 1.28; }
.yi-gold { display: block; color: var(--gold); letter-spacing: .1em; font-size: clamp(.85rem, 1.5vw, 1.18rem); margin-bottom: 1.15em; text-transform: uppercase; }
.yi-emblem { display: grid; gap: 8px; width: min(100%, 180px); margin: 28px 5% 0 auto; filter: drop-shadow(0 0 11px #e4a65268); }
.yi-emblem span { height: 13px; background: #f1c37a; }
.yi-emblem .yi-split { background: linear-gradient(90deg, #f1c37a 43%, transparent 43% 57%, #f1c37a 57%); }
.yi-form { min-width: 0; padding: 15px clamp(14px, 2.1vw, 30px) 16px; border: 1px solid #ddc8a9; border-radius: .85rem; background: linear-gradient(125deg, #faf0e0, #f5e7d4); box-shadow: 0 4px 22px #0005; text-align: center; }
.yi-form h2 { font-size: clamp(1.45rem, 2.28vw, 2.05rem); margin-bottom: .3em; }
.yi-form-lead { max-width: 30ch; margin: .2em auto .7em; font-size: clamp(1rem, 1.45vw, 1.18rem); line-height: 1.26; }
.yi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.yi-form textarea { display: block; width: 100%; min-height: 108px; padding: .65rem .8rem; resize: vertical; border: 1px solid #c4b7ab; border-radius: .55rem; background: #fff; color: var(--ink); font: 1rem/1.4 system-ui, sans-serif; }
.yi-counter { text-align: right; font: .78rem/1.6 system-ui, sans-serif; margin: .18rem 0 .42rem; }
#yi-modes { border: 0; margin: 0 0 1.5rem; padding: 0; min-inline-size: 0; text-align: start; font: .94rem/1.2 system-ui, sans-serif; }
#yi-modes legend { font-weight: 700; margin-bottom: .4rem; padding: 0 .55rem; }
.yi-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.yi-modes label { display: flex; gap: .55rem; align-items: center; min-height: 54px; padding: .4rem .55rem; border-radius: .6rem; border: 1px solid #d5c4b3; background: #fff9ee; cursor: pointer; overflow-wrap: anywhere; }
.yi-modes input { width: 19px; height: 19px; flex: 0 0 19px; margin: 0; accent-color: var(--red); }
.yi-actions button, .oraclastra-universal-menu { min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--red); border-radius: .45rem; font: 600 1rem/1.25 system-ui, sans-serif; cursor: pointer; }
.yi-actions #yi-submit { width: 100%; min-height: 49px; background: linear-gradient(#9c3035, #71151a); color: white; }
.yi-actions #yi-reset { margin-top: .4rem; border: 0; background: transparent; color: var(--red); text-decoration: underline; }
.oraclastra-universal-menu { color: #641720; background: #fff9ec; }
.yi-actions button:disabled { opacity: .6; cursor: default; }
.yi-promise { font-size: .87rem; margin: .7em 0 0; }
#yi-status { font: .86rem/1.4 system-ui, sans-serif; }
#yi-status:empty { display: none; }
.yi-features { background: #f7efe3; }
.yi-features ul { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); list-style: none; margin-block: 0; padding: 24px 0; }
.yi-features li { position: relative; display: flex; align-items: center; gap: clamp(.55rem, 1.45vw, 1.25rem); padding: .15rem clamp(.5rem, 2vw, 1.75rem); line-height: 1.32; font-weight: 600; }
.yi-features li + li { border-inline-start: 1px solid #d8cbbb; }
.yi-features img { width: clamp(37px, 4.35vw, 62px); height: auto; flex: none; mix-blend-mode: multiply; }
.yi-history, .yi-premium, .yi-faq { display: grid; gap: clamp(1rem, 2.7vw, 2.4rem); align-items: center; margin-block: 26px; }
.yi-history { grid-template-columns: minmax(0, 39.3fr) minmax(0, 57.7fr); }
.yi-history img, .yi-premium img { display: block; width: 100%; height: auto; border-radius: .65rem; }
.yi-history h2, .yi-premium h2, .yi-faq h2 { font-size: clamp(1.55rem, 2.5vw, 2.3rem); margin-bottom: .32em; }
.yi-history a { font-weight: 700; }
.yi-premium { position: relative; isolation: isolate; grid-template-columns: minmax(0, 32fr) minmax(0, 42fr) minmax(0, 24fr); gap: 1rem; min-height: 372px; padding: 10px 2%; border: 1px solid #cdaaa7; border-radius: 1rem; background: #f9efe7; }
.yi-premium::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 0 0 auto auto; width: min(32%, 420px); aspect-ratio: 11 / 4;
  border-start-end-radius: inherit;
  background: url('/yi-jing/mock-mountains.webp') center / cover no-repeat;
  mask-image: linear-gradient(to left, black 35%, transparent), linear-gradient(to bottom, black 47%, transparent);
  mask-composite: intersect;
}
.yi-premium img { max-width: 310px; margin: auto; mix-blend-mode: multiply; }
.yi-premium-content { position: relative; }
.yi-premium-label { display: inline-block; padding: .19rem .62rem; border-radius: 2rem; background: #f6d7a7; color: #4f2620; font: 700 .77rem/1.3 system-ui, sans-serif; }
.yi-premium h2 { margin-top: .18em; }
.yi-premium ul { list-style: none; padding: 0; }
.yi-premium li { padding-inline-start: 1.3em; position: relative; margin-block: .2em; }
.yi-premium li::before { content: '✓'; color: var(--red); font-weight: 700; position: absolute; inset-inline-start: 0; }
.yi-offer { text-align: center; align-self: end; padding-bottom: 18%; }
.yi-soon { display: block; background: #f5dfc4; color: #5b2629; padding: .65rem .75rem; border-radius: .5rem; }
.yi-faq { grid-template-columns: minmax(0, 33fr) minmax(0, 64fr); align-items: start; }
.yi-faq h2 { padding-block-start: .6em; }
.yi-faq details { border-bottom: 1px solid #d6c8bd; }
.yi-faq summary { min-height: 44px; padding: .65rem 1.7rem .65rem .25rem; cursor: pointer; list-style: none; position: relative; }
.yi-faq summary::after { content: '⌄'; position: absolute; inset-inline-end: .6rem; }
.yi-faq details[open] summary::after { transform: rotate(180deg); }
.yi-result { margin-block: 1rem; background: var(--cream); padding: clamp(.8rem, 3vw, 2rem); border: 1px solid #d8ba88; border-radius: .8rem; scroll-margin-block: 1rem; }
.yi-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: .8rem; }
.yi-figures article { border: 1px solid #d6c8bd; border-radius: .5rem; padding: .8rem; }
.yi-figure { list-style: none; padding: 0; }
.yi-figure li { display: grid; grid-template-columns: 8rem 1fr; }
.yi-line { white-space: pre; font: 1.3rem/1.25 monospace; color: var(--red); }
blockquote { margin-inline: 0; overflow-wrap: anywhere; padding-inline-start: .7rem; border-inline-start: 2px solid #be8f6e; }
.yi-footer { display: flex; justify-content: center; align-items: center; gap: 1rem; background: var(--navy); color: white; padding: 1.3rem; }
.yi-footer a { color: white; }
@media (max-width: 960px) {
  .oraclastra-universal-menu { display: block; }
  .oraclastra-universal-menu[aria-expanded="false"] + .oraclastra-universal-nav:not(:focus-within) { display: none; }
  .oraclastra-universal-nav { width: 100%; }
}
@media (max-width: 800px) {
  .yi-width { width: calc(100% - 2rem); }
  .yi-hero-grid, .yi-history, .yi-premium, .yi-faq { grid-template-columns: minmax(0, 1fr); }
  .yi-hero-grid { padding: 18px 0; gap: 1rem; }
  .yi-hero::before { width: min(65vw, 360px); height: 16rem; background-size: min(63vw, 345px) auto; }
  .yi-hero::after { top: 8rem; bottom: auto; width: min(90vw, 490px); height: 7.5rem; background-size: cover; }
  .yi-intro { padding: .45rem 0 .25rem; min-height: 230px; }
  .yi-emblem { margin: 14px 7% 0 auto; width: 78px; gap: 4px; }
  .yi-emblem span { height: 6px; }
  .yi-features ul { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem 0; padding-block: .9rem; }
  .yi-features li:nth-child(3) { border: 0; }
  .yi-features li { padding-inline: .35rem; font-size: .9rem; }
  .yi-premium { padding: 1rem; }
  .yi-premium::before { width: 70%; }
  .yi-premium-cover { max-width: min(78%, 310px) !important; }
  .yi-offer { padding: 0; }
  .yi-faq h2 { padding: 0; }
}
/* The reference artwork is available as crops, so soften their exposed edges. */
.yi-hero::before { width: min(22.2vw, 326px); height: min(22vw, 320px); background-size: 100% 100%; mask-image: linear-gradient(to right, black 57%, transparent), linear-gradient(to bottom, black 72%, transparent); }
.yi-hero::after { width: min(46vw, 675px); height: min(18vw, 266px); background-size: 100% 100%; mask-image: linear-gradient(to right, black 77%, transparent), linear-gradient(to top, black 72%, transparent); }
.yi-intro h1, .yi-form h2, .yi-premium h2 { text-wrap: wrap; }
.yi-form h2 { font-size: clamp(1.45rem, 2.18vw, 1.92rem); }
.yi-form-lead { max-width: 37ch; }
@media (min-width: 1100px) {
  .yi-intro { padding-inline-start: min(15vw, 223px); }
  .yi-intro h1 { font-size: clamp(2rem, 2.72vw, 2.58rem); }
  .yi-history { align-items: start; }
  .yi-history > div { padding-top: .15rem; font-size: 1.12rem; line-height: 1.36; }
  .yi-premium-content { grid-column: 2 / 4; grid-row: 1; padding-right: 3%; }
  .yi-premium-content ul { max-width: 60%; }
  .yi-premium-cover { grid-row: 1; }
  .yi-offer { grid-column: 3; grid-row: 1; z-index: 1; }
}
@media (max-width: 800px) {
  .yi-hero::before { width: min(63vw, 345px); height: 15rem; }
  .yi-hero::after {
    width: min(90vw, 490px);
    height: 7.5rem;
    background-image: linear-gradient(#10183148, #1018312b), url('/yi-jing/mock-coins.webp');
    mask-image: linear-gradient(to right, black 62%, transparent), linear-gradient(to bottom, transparent, black 20% 70%, transparent);
  }
}
@media (min-width: 1250px) {
  html[lang="fr-FR"] .yi-intro h1 { white-space: nowrap; font-size: clamp(2rem, 2.6vw, 2.58rem); }
  html[lang="fr-FR"] .yi-form h2 { white-space: nowrap; font-size: clamp(1.55rem, 1.86vw, 1.78rem); }
  html[lang="fr-FR"] .yi-form-lead { max-width: 41ch; }
  .oraclastra-universal-nav { gap: clamp(.65rem, 1.74vw, 1.65rem); }
}


.yi-topic { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin-block: .5rem; }
.yi-topic select { max-width: 100%; padding: .3rem; font: inherit; }
.yi-result-premium { margin-block-start: 1.5rem; padding: clamp(1rem, 4vw, 1.75rem); border: 1px solid #ad8b56; border-radius: .65rem; background: #fff9ed; color: #202239; }
.yi-result-premium a { display: inline-block; margin-block-start: .4rem; padding: .7rem 1rem; border-radius: .35rem; background: #202239; color: #fff; }
.yi-result-premium a:focus-visible { outline: 3px solid #966323; outline-offset: 3px; }
#yi-premium { scroll-margin-top: 7rem; }

.yi-editorial { margin-block: 3rem; }
.yi-editorial nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.yi-editorial h3 { margin-block-start: 1.5rem; }
.yi-table-wrap { overflow-x: auto; }
.yi-table-wrap table { width: 100%; border-collapse: collapse; }
.yi-table-wrap caption { text-align: start; font-weight: 700; margin-block: 1rem; }
.yi-table-wrap th, .yi-table-wrap td { padding: 0.6rem 0.45rem; border-bottom: 1px solid #d6c8bd; text-align: start; vertical-align: top; }
.yi-table-wrap summary { cursor: pointer; min-height: 2.75rem; }
#hexagrams th[id] { scroll-margin-top: 7rem; }
#hexagrams th:target { background: #f3e5cb; }
.yi-hexagram-link { margin-inline-start: 0.75rem; }

.yi-book-preview { margin-block-start: 1rem; }
.yi-book-preview summary { cursor: pointer; min-block-size: 2.75rem; }
.yi-book-preview figure { margin: 0.6rem 0 0; }
.yi-book-preview img { display: block; width: min(100%, 350px); height: auto; }
