/* /syllabus/nutrition.html: the guṇa plate, the doṣa clock and the wheel of the six seasons, plus two small
   static figures (the measured meal; five elements into three doṣas). The night stage, buttons and captions
   come from course.css. */
:root {
  --vata: #B3A6DE;
  --pitta: #F0A070;
  --kapha: #79C2B4;
  --vata-dk: #6E5FA6;
  --pitta-dk: #B5523A;
  --kapha-dk: #2F7F72;
}

.stage h3 { margin-top: 0; }
.stage .stage-cap { min-height: 3em; }
html:not(.js) .stage-controls { display: none; }
.hit { fill: transparent; stroke: none; }

/* ---------- 1 · the guṇa plate ---------- */
.gp-arena { max-width: 900px; margin: 8px auto 0; }
.gp-plate { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 8px; min-height: 150px; max-width: 760px; margin: 0 auto 18px; padding: 24px 28px 34px; border-radius: 120px; border: 1px solid rgba(243, 223, 168, .45); background: radial-gradient(ellipse at 50% 40%, rgba(255, 244, 214, .12), rgba(255, 244, 214, .03) 70%); box-shadow: inset 0 0 0 6px rgba(243, 223, 168, .05), 0 20px 40px -24px rgba(0, 0, 0, .6); }
html:not(.js) .gp-plate { display: none; }
.gp-plate-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font: italic 500 1rem/1.2 var(--serif-it); color: rgba(243, 223, 168, .6) !important; pointer-events: none; transition: opacity .5s; }
.gp-plate.has-items .gp-plate-hint { opacity: 0; }
.gp-bowls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gp-bowl { min-height: 210px; padding: 14px 12px 24px; text-align: center; border: 1px solid; border-radius: 18px 18px 90px 90px / 18px 18px 46px 46px; }
.gp-bowl h4 { margin: 0 0 .15em; font: 400 1.35rem/1.2 var(--serif); }
.gp-ref { margin: 0 0 10px; font-size: .78rem; line-height: 1.4; color: rgba(255, 255, 255, .66) !important; }
.gp-slot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gp-s { border-color: rgba(243, 223, 168, .55); background: linear-gradient(180deg, rgba(243, 223, 168, .16), rgba(243, 223, 168, .04)); }
.gp-r { border-color: rgba(232, 146, 110, .55); background: linear-gradient(180deg, rgba(196, 101, 74, .24), rgba(196, 101, 74, .05)); }
.gp-t { border-color: rgba(160, 150, 190, .45); background: linear-gradient(180deg, rgba(120, 110, 150, .24), rgba(40, 36, 70, .2)); }
.gp-s h4 { color: var(--glow); }
.gp-r h4 { color: #F2A98C; }
.gp-t h4 { color: #C3B8E0; }
.stage button.gp-item { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 8px 6px 7px; border-radius: 14px; font: 500 .74rem/1.2 var(--sans); background: rgba(18, 24, 49, .6); border-color: rgba(255, 255, 255, .22); color: #fff; }
.stage .gp-ico { display: block; width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--glow); }
.gp-item[data-guna="r"] .gp-ico { color: #F2A98C; }
.gp-item[data-guna="t"] .gp-ico, .gp-item.is-stale .gp-ico { color: #C3B8E0; }
.stage button.gp-item:hover { border-color: var(--glow); background: rgba(243, 223, 168, .12); }
.stage button.gp-item.is-on { border-color: var(--glow); box-shadow: 0 0 0 2px rgba(243, 223, 168, .55), 0 0 18px rgba(243, 223, 168, .35); }
.gp-moonbadge { opacity: 0; transition: opacity .5s; }
.gp-item.is-stale .gp-moonbadge { opacity: 1; }
.gp-item.gp-wait { opacity: 0; }
.gp-item.gp-fall { animation: gp-fall .8s cubic-bezier(.3, .7, .35, 1.15) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes gp-fall {
  from { opacity: 0; transform: translateY(-110px) rotate(-10deg); }
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.gp-note { max-width: 560px; margin: 12px auto 0; text-align: center; font-size: .85rem; color: rgba(255, 255, 255, .6) !important; }

/* ---------- 2 · the doṣa clock ---------- */
.dc-grid, .sw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 320px); gap: 20px 36px; align-items: center; max-width: 900px; margin: 0 auto; }
.stage svg.dc-svg, .stage svg.sw-svg { max-width: 430px; margin: 4px auto 0; }
.dc-night { fill: #0E1330; stroke: rgba(243, 223, 168, .25); stroke-width: 1; }
.dc-horizon { fill: none; stroke: rgba(243, 223, 168, .35); stroke-width: 1; stroke-dasharray: 2 5; }
.dc-orbit { fill: none; stroke: rgba(243, 223, 168, .18); stroke-width: 1; stroke-dasharray: 1 6; }
.dc-arc { fill: none; stroke-width: 20; opacity: .68; transition: opacity .5s, stroke-width .5s; }
.dc-arc.on { opacity: 1; stroke-width: 24; }
.dc-k { stroke: var(--kapha); }
.dc-p { stroke: var(--pitta); }
.dc-v { stroke: var(--vata); }
.dc-arclab { font: italic 500 16px var(--serif-it); fill: #121831; letter-spacing: .04em; pointer-events: none; }
.dc-ticks line { stroke: rgba(243, 223, 168, .5); stroke-width: 1.2; }
.dc-hours text { font: 500 15px var(--sans); fill: rgba(255, 255, 255, .78); text-anchor: middle; }
.dc-hours .dc-small { fill: rgba(255, 255, 255, .45); }
.dc-ring-hit { fill: none; stroke: transparent; stroke-width: 56; pointer-events: stroke; cursor: grab; touch-action: pan-y; }
.dc-ring-hit:active { cursor: grabbing; }
.dc-mark { cursor: pointer; outline: none; }
.dc-dot { fill: var(--glow); opacity: .5; transform-box: fill-box; transform-origin: center; transition: opacity .3s, transform .3s; }
.dc-mark:hover .dc-dot, .dc-mark.on .dc-dot { opacity: 1; transform: scale(1.5); }
.dc-mark:focus-visible .hit { stroke: #fff; stroke-width: 2; }
.dc-hand, .dc-orb, .dc-clock, .dc-clock-sub { pointer-events: none; }
.dc-hand line { stroke: var(--glow); stroke-width: 1.6; stroke-linecap: round; }
.dc-bead { fill: #121831; stroke: #fff; stroke-width: 2.4; }
.dc-sun circle { fill: #F6C65B; }
.dc-sun path { fill: none; stroke: #F6C65B; stroke-width: 2; stroke-linecap: round; }
.dc-moon { fill: #EFE9DC; }
.dc-hub { fill: var(--glow); }
.dc-clock { font: 400 26px var(--serif); fill: #fff; text-anchor: middle; }
.dc-clock-sub { font: italic 500 16px var(--serif-it); fill: var(--glow); text-anchor: middle; }
.dc-dosha { display: flex; align-items: center; gap: 8px; margin: 0 0 .5em; font: 600 .76rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .78) !important; }
.dc-chip { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; }
.dc-chip-k { background: var(--kapha); }
.dc-chip-p { background: var(--pitta); }
.dc-chip-v { background: var(--vata); }
.stage .dc-act { margin: 0 0 .4em; font: 400 1.5rem/1.2 var(--serif); }
.dc-why { min-height: 8.5em; font-size: .95rem; }
.dc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 0 0 .6em; font: italic 500 1.05rem/1.3 var(--serif-it); }
.dc-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.dc-note { margin: 0; font-size: .8rem; color: rgba(255, 255, 255, .55) !important; }
.dc-range { display: flex; flex-wrap: wrap; flex-basis: 100%; align-items: center; justify-content: center; gap: 10px; font: 600 .8rem/1.2 var(--sans); color: rgba(255, 255, 255, .8); }
.dc-range input { width: min(360px, 70vw); accent-color: var(--glow); }

/* ---------- 3 · the six seasons ---------- */
.sw-sector { cursor: pointer; outline: none; }
.sw-sec { fill: var(--c); fill-opacity: .16; stroke: rgba(255, 255, 255, .18); stroke-width: 1; transition: fill-opacity .6s, stroke .6s; }
.sw-sector:hover .sw-sec { fill-opacity: .28; }
.sw-sector.on .sw-sec { fill-opacity: .42; stroke: var(--glow); stroke-width: 1.6; }
.sw-sector:focus-visible .sw-sec { stroke: #fff; stroke-width: 2.4; }
.sw-name { font: italic 500 18px var(--serif-it); fill: #fff; text-anchor: middle; }
.sw-en { font: 500 15px var(--sans); fill: rgba(255, 255, 255, .7); text-anchor: middle; }
.sw-sector.on .sw-name { fill: var(--glow); }
.sw-ayana { fill: none; stroke-width: 14; }
.sw-utt { stroke: rgba(243, 198, 91, .3); }
.sw-dak { stroke: rgba(150, 170, 220, .26); }
.sw-ayana-lab { font: italic 500 16px var(--serif-it); fill: rgba(255, 244, 214, .9); pointer-events: none; }
.sw-goa { opacity: 0; transition: opacity .6s; }
.sw-svg.goa-on .sw-goa { opacity: 1; }
.sw-goa-band { fill: none; stroke-width: 18; }
.sw-goa-hot { stroke: rgba(232, 146, 90, .75); }
.sw-goa-rain { stroke: rgba(110, 150, 210, .8); }
.sw-goa-post { stroke: rgba(123, 170, 140, .75); }
.sw-goa-cool { stroke: rgba(243, 223, 168, .65); }
.sw-month { font: 600 15px var(--sans); fill: #121831; text-anchor: middle; }
.sw-pointer { fill: var(--glow); }
.sw-core { fill: #0E1330; stroke: rgba(243, 223, 168, .4); stroke-width: 1; }
.sw-sun circle { fill: #F6C65B; }
.sw-sun path { fill: none; stroke: #F6C65B; stroke-width: 2; stroke-linecap: round; }
.sw-moon { fill: #EFE9DC; }
.sw-sun, .sw-moon, .sw-core-glow { transition: opacity .8s; }
.sw-core-lab { font: italic 500 18px var(--serif-it); fill: var(--glow); text-anchor: middle; }
.sw-title { margin: 0 0 .2em; }
.sw-title [data-sw-name] { font: 400 1.8rem/1.1 var(--serif); color: #fff; }
.sw-sub { margin-left: .3em; font: italic 500 1.25rem/1.1 var(--serif-it); color: var(--glow); }
.sw-meta { margin: 0 0 .7em; font-size: .85rem; color: rgba(255, 255, 255, .65) !important; }
.sw-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 .8em; font-size: .85rem; }
.sw-facts b { font-weight: 600; color: var(--glow); }
.sw-bars { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0 0 1em; }
.sw-bars li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) 6.8em; align-items: center; gap: 10px; margin: 0; font-size: .85rem; }
.sw-bars i { display: block; height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.sw-bars b { display: block; height: 100%; border-radius: inherit; transform-origin: left center; transition: transform .9s cubic-bezier(.3, .7, .3, 1); }
.sw-bar-v b { background: var(--vata); }
.sw-bar-p b { background: var(--pitta); }
.sw-bar-k b { background: var(--kapha); }
.sw-bar-state { font: italic 500 1rem/1.1 var(--serif-it); color: rgba(255, 255, 255, .6); }
.sw-bar-state.is-up { color: #fff; }
.sw-bar-state.is-peak { color: #F6C65B; }
.sw-tip { margin: 0 0 .45em; font-size: .9rem; }
.sw-tip b, .sw-goa-line b { margin-right: .4em; font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.sw-goa-line { margin: .7em 0 0; font-size: .9rem; }
.sw-goa-key { display: flex; flex-wrap: wrap; gap: 4px 12px; list-style: none; padding: 0; margin: .5em 0 0; font-size: .8rem; }
.sw-goa-key li { margin: 0; }
.sw-goa-line[hidden], .sw-goa-key[hidden] { display: none; }
.sw-gk { display: inline-block; width: 18px; height: 6px; margin-right: 5px; border-radius: 3px; vertical-align: middle; }
.sw-gk-hot { background: rgba(232, 146, 90, .9); }
.sw-gk-rain { background: rgba(110, 150, 210, .95); }
.sw-gk-post { background: rgba(123, 170, 140, .9); }
.sw-gk-cool { background: rgba(243, 223, 168, .85); }
.table-scroll .gloss.sw-table { min-width: 640px; }

/* ---------- static figures ---------- */
.mm { display: flex; align-items: center; gap: 20px; max-width: 460px; margin: 1em 0 1.4em; padding: 16px 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.mm-svg { flex: none; width: 110px; height: 110px; }
.mm-food { fill: #E3C27A; }
.mm-water { fill: #8FB0D8; }
.mm-air { fill: var(--cream); stroke: #B9AEA4; stroke-width: 1.2; stroke-dasharray: 3 3; }
.mm-rim { fill: none; stroke: var(--char); stroke-opacity: .25; stroke-width: 1.2; }
.mm-title { margin: 0 0 .4em; font: 400 1.2rem/1.2 var(--serif); color: var(--char); }
.subject .mm-key { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.mm-key li { display: flex; align-items: center; gap: 8px; margin: 0 0 .2em; }
.mm-sw { flex: none; width: 14px; height: 14px; border-radius: 4px; }
.mm-sw-food { background: #E3C27A; }
.mm-sw-water { background: #8FB0D8; }
.mm-sw-air { border: 1.5px dashed #B9AEA4; }
.el { margin: 1.2em 0 1.6em; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.el-svg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.el-lines path { fill: none; stroke-width: 2; stroke-linecap: round; }
.el-lines .el-v { stroke: var(--vata-dk); }
.el-lines .el-p { stroke: var(--pitta-dk); }
.el-lines .el-k { stroke: var(--kapha-dk); }
.el-els circle { fill: var(--sand); stroke: var(--gold); stroke-width: 1.2; }
.el-els text { font: italic 500 16px var(--serif-it); fill: var(--char); text-anchor: middle; }
.el-doshas circle { stroke-width: 2; }
.el-doshas .el-v { fill: #EEEAF7; stroke: var(--vata-dk); }
.el-doshas .el-p { fill: #FBE7DD; stroke: var(--pitta-dk); }
.el-doshas .el-k { fill: #E1F0EC; stroke: var(--kapha-dk); }
.el-doshas text { font: 400 18px var(--serif); fill: var(--char); text-anchor: middle; }
.el-svg .el-en { font: 500 14px var(--sans); fill: var(--muted); text-anchor: middle; }
.dosha-cards .card { border-top-width: 4px; }
.dosha-v { border-top-color: var(--vata-dk); }
.dosha-p { border-top-color: var(--pitta-dk); }
.dosha-k { border-top-color: var(--kapha-dk); }
.dosha-cards .card p, .herb-cards .card p { margin-bottom: .55em; }

@media (max-width: 760px) {
  .gp-bowls { grid-template-columns: 1fr; }
  .gp-bowl { min-height: 0; border-radius: 18px 18px 60px 60px / 18px 18px 30px 30px; }
  .gp-plate { padding: 18px 10px 34px; border-radius: 40px; }
  .stage button.gp-item { width: 84px; }
  .dc-grid, .sw-grid { grid-template-columns: 1fr; gap: 12px; }
  .dc-panel, .sw-panel { text-align: center; }
  .dc-dosha, .dc-legend, .sw-facts, .sw-goa-key { justify-content: center; }
  .sw-bars { max-width: 340px; margin-inline: auto; text-align: left; }
  .sw-bars li { grid-template-columns: 3.8em minmax(0, 1fr) 6.4em; }
}
@media (prefers-reduced-motion: reduce) {
  .gp-item.gp-fall { animation: none; }
  .gp-item.gp-wait { opacity: 1; }
}
