/* "How common is your birthday?" (/birthday and the 366 date pages). Prototype variant A, iteration 2 (PO 27 Oct 2026),
   on top of site.css: NinePath M3 roles, Figtree type scale, corners, state layers. The element and tone colours on the
   sign and fact cards are the day-type palette (PO-approved exception, website only). No images at all: arrows are borders (CSP). */
.bday {
  --md-sys-color-primary: #1d5bb8; --md-sys-color-on-primary: #fff;
  --md-sys-color-secondary-container: #d7e3ff; --md-sys-color-on-secondary-container: #081f3f;
  --md-sys-color-tertiary: #7f5618; --md-sys-color-tertiary-container: #ffddb6; --md-sys-color-on-tertiary-container: #2a1800;
  --md-sys-color-error: #ba1a1a; --md-sys-color-surface: #f9f9ff; --md-sys-color-on-surface: #081f3f; --md-sys-color-on-surface-variant: #424751;
  --md-sys-color-surface-container-lowest: #fff; --md-sys-color-surface-container-low: #f3f3fa; --md-sys-color-surface-container: #ededf4;
  --md-sys-color-surface-container-high: #e7e8ee; --md-sys-color-outline: #737782; --md-sys-color-outline-variant: #c3c6d3;
  --shape-xs: 4px; --shape-s: 8px; --shape-m: 12px; --shape-l: 16px; --shape-xl: 28px;
  --elev-1: 0 1px 3px 1px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.3);
  --elev-3: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.3);
  --standard: cubic-bezier(.2,0,0,1); --decelerate: cubic-bezier(.05,.7,.1,1);
  --mist: #f5f9fe;
  overflow-wrap: break-word;
}
main.bday-hub, main.bday-date { display: block; }
.bday h1, .bday h2, .bday h3, .bday p, .bday dl, .bday dd { margin: 0; }
.bday svg, .bday canvas { display: block; max-width: 100%; }
.bday .vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bday .wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--margin); }

/* Type scale */
.bday .display-s { font-size: 36px; line-height: 44px; font-weight: 600; letter-spacing: 0; }
.bday .headline-s { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; }
.bday .title-l { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: 0; }
.bday .title-m { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .15px; }
.bday .title-s { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }
.bday .body-l { font-size: 16px; line-height: 24px; letter-spacing: .5px; }
.bday .body-m { font-size: 14px; line-height: 20px; letter-spacing: .25px; }
.bday .body-s { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.bday .label-l { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; }

/* Buttons: filled, tonal, text; state layer = content colour at 8% / 10% */
.bday .m3-btn { --c: var(--md-sys-color-on-primary); --bg: var(--md-sys-color-primary);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 24px; max-width: 100%;
  border: 0; border-radius: 999px; background: var(--bg); color: var(--c); font: 500 14px/20px Figtree, sans-serif; letter-spacing: .1px; text-align: center;
  text-decoration: none; cursor: pointer; isolation: isolate; transition: box-shadow 100ms var(--standard); }
.bday .m3-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: 0; transition: opacity 100ms var(--standard); pointer-events: none; }
.bday .m3-btn:hover::after { opacity: .08; } .bday .m3-btn:focus-visible::after, .bday .m3-btn:active::after { opacity: .1; }
.bday .m3-btn:hover { box-shadow: var(--elev-1); }
/* Custom icons (style B): a surface sets --ic-s (strong) and --ic-b (card colour); the classes come from the SVG fragments. */
.bday .ic .s { fill: var(--ic-s, currentColor); }
.bday .ic .s-l { fill: none; stroke: var(--ic-s, currentColor); }
.bday .ic .b { fill: var(--ic-b, #fff); }
.bday .ic .b-l { fill: none; stroke: var(--ic-b, #fff); }
.bday .m3-btn svg { width: 18px; height: 18px; flex: none; }
.bday .m3-btn.large { min-height: 56px; padding: 16px 28px; font-size: 16px; line-height: 24px; }
.bday .m3-btn.tonal { --c: var(--md-sys-color-on-secondary-container); --bg: var(--md-sys-color-secondary-container); }
.bday .m3-btn.text { --c: var(--md-sys-color-primary); --bg: transparent; padding-inline: 12px; }
.bday .m3-btn.text:hover, .bday .m3-btn.tonal:hover { box-shadow: none; }
.bday .m3-btn[hidden] { display: none; }

/* Outlined field as an exposed dropdown (native select). The arrow is drawn with borders, not an image. */
.bday .m3-field { position: relative; display: block; }
.bday .m3-field[hidden] { display: none; }
.bday .m3-field select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 56px; padding: 16px 40px 16px 16px; font: 400 16px/24px Figtree, sans-serif; letter-spacing: .5px;
  color: var(--md-sys-color-on-surface); background: transparent; border: 1px solid var(--md-sys-color-outline); border-radius: var(--shape-xs); cursor: pointer; }
.bday .m3-field select:hover { border-color: var(--md-sys-color-on-surface); }
.bday .m3-field select:focus { outline: none; border: 2px solid var(--md-sys-color-primary); padding: 15px 39px 15px 15px; }
.bday .m3-field select:focus-visible { outline: 3px solid var(--md-sys-color-on-surface); outline-offset: 2px; }
.bday .m3-field label { position: absolute; left: 12px; top: -8px; padding: 0 4px; font: 400 12px/16px Figtree, sans-serif; letter-spacing: .4px; color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-lowest); pointer-events: none; }
.bday .m3-field:focus-within label { color: var(--md-sys-color-primary); }
.bday .m3-field::after { content: ""; position: absolute; right: 18px; top: 50%; margin-top: -3px; border: 5px solid transparent; border-top-color: var(--md-sys-color-on-surface-variant); border-bottom: 0; pointer-events: none; }
.bday .m3-field select option { color: #081f3f; background: #fff; }
.bday .m3-error { color: var(--md-sys-color-error); font-size: 12px; line-height: 16px; letter-spacing: .4px; }

/* Chips */
.bday .m3-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 16px; border-radius: var(--shape-s);
  box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); font: 500 14px/20px Figtree, sans-serif; letter-spacing: .1px; color: var(--md-sys-color-on-surface); text-decoration: none; }
.bday .m3-chip svg { width: 18px; height: 18px; --ic-s: var(--md-sys-color-primary); margin-left: -8px; flex: none; }
.bday .m3-chip.warm { box-shadow: none; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.bday .m3-chip.warm svg { --ic-s: currentColor; }
.bday a.m3-chip:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }

/* Segmented button */
.bday .m3-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--md-sys-color-outline); }
.bday .m3-seg button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--md-sys-color-on-surface); font: 500 14px/20px Figtree, sans-serif; letter-spacing: .1px; cursor: pointer; }
.bday .m3-seg button + button { box-shadow: inset 1px 0 0 var(--md-sys-color-outline); }
.bday .m3-seg button:first-child { border-radius: 999px 0 0 999px; } .bday .m3-seg button:last-child { border-radius: 0 999px 999px 0; }
.bday .m3-seg button[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.bday .m3-seg button .ck { width: 18px; height: 18px; display: none; }
.bday .m3-seg button[aria-pressed="true"] .ck { display: block; }

/* Linear progress as a rank meter */
.bday .m3-progress { position: relative; height: 4px; border-radius: 2px; background: var(--md-sys-color-secondary-container); overflow: hidden; }
.bday .m3-progress i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--md-sys-color-primary); width: 0; transition: width 900ms var(--decelerate); }

/* Share sheet: bottom sheet on compact width, dialog from 600 px */
.bday dialog.m3-dialog { border: 0; padding: 0; width: min(560px, 100%); max-width: 100%; max-height: 100dvh; margin: auto auto 0; border-radius: var(--shape-xl) var(--shape-xl) 0 0;
  background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); box-shadow: var(--elev-3); overflow: auto; }
@media (min-width: 600px) { .bday dialog.m3-dialog { margin: auto; border-radius: var(--shape-xl); max-height: 92dvh; } }
.bday dialog.m3-dialog::backdrop { background: rgba(0,0,0,.32); }
.bday .m3-dialog .in { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.bday .m3-dialog .preview { display: grid; place-items: center; min-height: 200px; background: var(--md-sys-color-surface-container); border-radius: var(--shape-l); padding: 12px; }
.bday .m3-dialog .card-canvas { width: auto; height: auto; max-width: 100%; max-height: min(46dvh, 440px); border-radius: var(--shape-s); box-shadow: var(--elev-1); transition: opacity 150ms; }
.bday .m3-dialog .preview.loading .card-canvas { opacity: .4; }
.bday .m3-dialog .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.bday .m3-dialog .share-status { min-height: 20px; font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); }

/* Hero: words, quick answer and picker left; year ring right */
.bday .b-hero { background: linear-gradient(180deg, var(--mist), var(--md-sys-color-surface)); padding-block: 24px 40px; }
.bday .b-hero .wrap { display: grid; gap: 20px; align-items: center; }
.bday .b-hero h1 em { font-style: normal; color: var(--md-sys-color-primary); }
.bday .teaser { color: var(--md-sys-color-on-surface-variant); margin-top: 12px; max-width: 34rem; }
.bday .quick { display: grid; gap: 8px; margin-top: 20px; max-width: 34rem; }
.bday .quick div { display: grid; gap: 0; }
.bday .quick dt { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; color: var(--md-sys-color-tertiary); text-transform: uppercase; }
.bday .quick dd { font-size: 16px; line-height: 24px; }
.bday .picker { margin-top: 20px; padding: 24px; border-radius: var(--shape-xl); background: var(--md-sys-color-surface-container-lowest); box-shadow: var(--elev-1); display: grid; gap: 20px; max-width: 34rem; }
.bday .picker fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.bday .picker legend { padding: 0; margin-bottom: 16px; }
.bday .dm { display: grid; grid-template-columns: 1fr 1.7fr; gap: 12px; }
.bday .picker .m3-btn { width: 100%; }
/* Compact: title, introduction and picker first; the decorative ring follows. */
.bday .ring-box { position: relative; width: min(100%, 200px); margin: 0 auto; }
.bday .ring-box svg { width: 100%; height: auto; overflow: visible; }
.bday .ring-cap { text-align: center; color: var(--md-sys-color-on-surface-variant); margin-top: 4px; }
@media (min-width: 900px) {
  .bday .b-hero { padding-block: 56px 80px; }
  .bday .b-hero .wrap { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .bday .b-hero h1 { font-size: 57px; line-height: 64px; letter-spacing: -.25px; }
  .bday .b-hero .ring-box { order: 0; width: min(100%, 480px); }
}

/* Ring (decorative) */
.bday .ring .month { fill: none; stroke: var(--md-sys-color-outline-variant); stroke-width: 6; stroke-linecap: round; }
.bday .ring .month.on { stroke: var(--md-sys-color-primary); }
.bday .ring .ray { stroke: var(--md-sys-color-primary); stroke-opacity: .4; stroke-width: 1.2; stroke-linecap: round; transition: all 900ms var(--decelerate); }
.bday .ring .ray.hit { stroke: #c9973a; stroke-opacity: 1; stroke-width: 3; }
.bday .ring .dot { fill: #c9973a; stroke: var(--md-sys-color-surface-container-lowest); stroke-width: 4; }
.bday .ring .ctr { font: 600 56px Figtree, sans-serif; fill: var(--md-sys-color-primary); text-anchor: middle; }
.bday .ring .ctr.s { font: 500 20px Figtree, sans-serif; fill: var(--md-sys-color-on-surface-variant); }
.bday .ring .ctr.big { font-size: 76px; letter-spacing: -2px; }
.bday .ring .core { fill: var(--md-sys-color-surface-container-lowest); }
.bday .ring .halo { fill: none; stroke: #c9973a; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 200px 200px; }

/* Result: the celebration card */
.bday .result { padding-block: 16px 48px; }
.bday .result:focus { outline: none; }
.bday .celebrate { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 24px; padding: 24px 20px 28px; border-radius: var(--shape-xl);
  background: radial-gradient(110% 80% at 80% 10%, #fff3e0 0%, rgba(255,243,224,0) 55%), linear-gradient(155deg, #d8e2ff 0%, #e8eeff 48%, #fbecd8 100%);
  box-shadow: 0 1px 3px rgba(8,31,63,.12), 0 16px 48px -8px rgba(29,91,184,.28); outline: 1px solid rgba(255,255,255,.8); outline-offset: -1px; }
.bday .celebrate::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(248,192,120,.45), rgba(248,192,120,0) 65%); }
.bday .celebrate .words { display: grid; gap: 12px; min-width: 0; }
.bday .celebrate .kicker { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.bday .celebrate .kicker svg { width: 18px; height: 18px; }
.bday .celebrate .date { display: block; color: var(--md-sys-color-primary); font-size: 45px; line-height: 52px; font-weight: 600; letter-spacing: -.5px; }
.bday .celebrate .rest { display: block; margin-top: 4px; font-size: 28px; line-height: 36px; font-weight: 600; color: var(--md-sys-color-on-surface); }
.bday .celebrate .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bday .celebrate .chips .m3-chip { background: var(--md-sys-color-surface-container-lowest); box-shadow: none; }
.bday .celebrate .chips .m3-chip.warm { background: var(--md-sys-color-tertiary-container); }
.bday .celebrate .compare { color: var(--md-sys-color-on-surface-variant); max-width: 34rem; }
.bday .celebrate .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bday .celebrate .acts .m3-btn:not(.text) { box-shadow: 0 6px 18px -6px rgba(29,91,184,.6); }
.bday .celebrate .ring-box { width: min(100%, 230px); }
.bday .celebrate .ring-cap { max-width: 240px; margin-inline: auto; }
.bday .celebrate .ring .core { fill: #fff; }
.bday .reveal { animation: bday-rise 700ms var(--decelerate) both; }
.bday .reveal:nth-child(2) { animation-delay: 120ms; } .bday .reveal:nth-child(3) { animation-delay: 240ms; }
@keyframes bday-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .bday .celebrate.go { animation: bday-lift 700ms var(--decelerate) both; }
  .bday .celebrate.go .ring .halo { animation: bday-draw 1400ms var(--decelerate) 250ms both; }
  .bday .celebrate.go .ring .ctr.big { animation: bday-grow 900ms cubic-bezier(.34,1.4,.64,1) 350ms both; transform-origin: 200px 190px; transform-box: view-box; }
}
@keyframes bday-lift { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bday-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes bday-grow { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .bday .celebrate { grid-template-columns: 1.25fr .75fr; align-items: center; padding: 56px; gap: 48px; }
  .bday .celebrate .ring-box { order: 0; width: 100%; max-width: 380px; justify-self: center; }
  .bday .celebrate .date { font-size: 64px; line-height: 72px; letter-spacing: -1px; }
  .bday .celebrate .rest { font-size: 36px; line-height: 44px; }
}
.bday .sections { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 900px) { .bday .sections { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } }
.bday .sections h2 { margin-bottom: 12px; }
.bday .rank-note { margin: 0 0 8px; }
.bday .celebrate .basis { color: var(--md-sys-color-on-surface-variant); max-width: 34rem; }
.bday .country-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 8px; border-top: 1px solid var(--md-sys-color-outline-variant); }
.bday .country-ctl .k { color: var(--md-sys-color-on-surface-variant); }
.bday .country-ctl b { font-weight: 600; }
.bday .country-ctl .m3-field { flex: 1 1 100%; max-width: 20rem; }
.bday .country-ctl select { min-height: 48px; padding-block: 11px; background: var(--md-sys-color-surface-container-lowest); }
.bday .country-ctl select:focus { padding-block: 10px; }
.bday .fmt-help { color: var(--md-sys-color-on-surface-variant); margin-top: -8px; }
.bday .m3-btn:disabled { opacity: .5; cursor: progress; }
.bday .ranks { list-style: none; margin: 0; padding: 4px 16px; border-radius: var(--shape-m); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.bday .ranks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.bday .ranks li:last-child { border-bottom: 0; }
.bday .ranks .yr { grid-column: 1; color: var(--md-sys-color-on-surface-variant); }
.bday .ranks .rk { grid-row: 1 / span 2; grid-column: 2; text-align: right; align-self: center; }
.bday .ranks li.plain .rk { grid-row: 1; }
.bday .ranks .rk b { font-size: 22px; line-height: 28px; font-weight: 600; display: block; }
.bday .ranks .rk small { color: var(--md-sys-color-on-surface-variant); font-size: 12px; }
.bday .ranks .m3-progress { grid-column: 1 / -1; margin-top: 8px; }
.bday .ranks .you { color: var(--md-sys-color-primary); font-weight: 500; }
.bday .ranks li.sel .m3-progress i { background: #c9973a; }
.bday .note { color: var(--md-sys-color-on-surface-variant); margin-top: 12px; }

/* Bento of expressive cards (day-type colours) */
.bday .bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bday .fun { position: relative; overflow: hidden; border-radius: var(--shape-l); padding: 20px; display: grid; align-content: start; gap: 8px; min-width: 0; }
.bday .fun .eyebrow { color: inherit; opacity: .9; }
.bday .fun .body-m { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .bday .pop:not(.in) { opacity: 0; transform: translateY(18px) scale(.97); }
  .bday .pop.in { transition: opacity 500ms var(--decelerate), transform 700ms cubic-bezier(.34,1.3,.64,1); transition-delay: calc(var(--i, 0) * 70ms); }
}
.bday .sign-card { --bg: #d8e2ff; --fg: #1d5bb8; grid-column: 1 / -1; grid-template-columns: 120px minmax(0, 1fr); gap: 16px 20px; align-items: center; background: var(--bg); color: #081f3f; }
.bday .sign-card.fire { --bg: #ffddb6; --fg: #7f5618; }
.bday .sign-card.earth { --bg: #b6f0d3; --fg: #136b47; }
.bday .sign-card.air { --bg: #e6deff; --fg: #6247aa; }
.bday .sign-card.water { --bg: #d8e2ff; --fg: #1d5bb8; }
.bday .sign-card .medal { position: relative; width: 120px; height: 120px; }
.bday .sign-card .medal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bday .sign-card .medal .s { fill: var(--fg); }
.bday .sign-card .glyph { display: grid; place-items: center; font: 400 60px/1 "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", sans-serif; color: var(--bg); }
.bday .sign-card .medal .glyph { position: absolute; inset: 0; }
.bday .sign-card .sign-name { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -.5px; color: var(--fg); }
.bday .sign-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.bday .el-pill { display: inline-flex; padding: 4px 10px; border-radius: 8px; background: var(--fg); color: #fff; font: 500 12px/16px Figtree, sans-serif; letter-spacing: .5px; }
.bday .el-pill.ghost { background: rgba(255,255,255,.7); color: #081f3f; }
.bday .sign-card .txt { display: grid; gap: 4px; min-width: 0; }
@media (max-width: 459px) { .bday .sign-card { grid-template-columns: 1fr; } }
.bday .num-card { container-type: inline-size; grid-row: span 2; background: var(--md-sys-color-surface-container-lowest); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant);
  background-image: radial-gradient(rgba(29,91,184,.12) 1.2px, transparent 1.3px); background-size: 14px 14px; color: #081f3f; }
.bday .num-card .eyebrow { color: var(--md-sys-color-primary); }
.bday .numeral { font-size: min(168px, 80cqi); line-height: .95; font-weight: 600; letter-spacing: -4px; color: var(--md-sys-color-primary); text-shadow: 6px 6px 0 #ffddb6; margin: 4px 0 2px; }
@media (prefers-reduced-motion: no-preference) { .bday .num-card.in .numeral { animation: bday-wobble 900ms cubic-bezier(.34,1.56,.64,1) 200ms both; } }
@keyframes bday-wobble { from { transform: rotate(-10deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.bday .num-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bday .num-steps span { min-width: 32px; padding: 2px 10px; border-radius: 8px; background: var(--md-sys-color-secondary-container); font-weight: 600; text-align: center; }
.bday .num-steps span:last-child { background: #ffddb6; }
.bday .num-steps i { font-style: normal; color: var(--md-sys-color-on-surface-variant); }
.bday .fact-card { color: #081f3f; }
.bday .fact-card .fic { width: 64px; height: 64px; display: block; }
.bday .fact-card .fic svg { width: 64px; height: 64px; display: block; --ic-s: var(--strong); --ic-b: var(--card); }
.bday .fact-card .one { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.2px; }
.bday .tone-blue { background: #d8e2ff; --card: #d8e2ff; --strong: #1d5bb8; }
.bday .tone-green { background: #b6f0d3; --card: #b6f0d3; --strong: #136b47; }
.bday .tone-warm { background: #ffddb6; --card: #ffddb6; --strong: #7f5618; }
.bday .tone-rose { background: #ffd8e8; --card: #ffd8e8; --strong: #a1356a; }
.bday .bento .fact-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 459px) { .bday .bento { grid-template-columns: 1fr; } .bday .num-card { grid-row: auto; } }

/* Hub sections */
.bday .hub { padding-block: 40px; }
.bday .hub > h2 { margin: 0 0 12px; }
.bday details.more { border-top: 1px solid var(--md-sys-color-outline-variant); margin-top: 24px; max-width: 58rem; }
.bday details.more:last-child { border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.bday details.more + details.more { margin-top: 0; }
.bday details.more > summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; cursor: pointer; list-style: none; }
.bday details.more > summary::-webkit-details-marker { display: none; }
.bday details.more > summary::after { content: ""; flex: none; border: 6px solid transparent; border-top-color: var(--md-sys-color-on-surface-variant); border-bottom: 0; }
.bday details.more[open] > summary::after { transform: rotate(180deg); }
.bday details.more > h3 { margin: 24px 0 12px; }
.bday details.more[open] { padding-bottom: 20px; }
.bday .answer { max-width: 46rem; margin-bottom: 12px; }
.bday .hub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bday .hub-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; padding: 16px; border-radius: var(--shape-m); background: var(--md-sys-color-surface-container-low); }
.bday .hub-list .cn { grid-column: 1 / -1; font-weight: 500; }
.bday .hub-list .k { display: block; font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-sys-color-on-surface-variant); }
.bday .hub-list .yr { grid-column: 1 / -1; font-size: 12px; line-height: 16px; color: var(--md-sys-color-on-surface-variant); }
@media (min-width: 840px) {
  .bday .hub-list { gap: 0; }
  .bday .hub-list li { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; align-items: baseline; border-radius: 0; background: transparent; border-bottom: 1px solid var(--md-sys-color-outline-variant); padding: 14px 8px; }
  .bday .hub-list li.head { font-size: 12px; line-height: 16px; letter-spacing: .4px; color: var(--md-sys-color-on-surface-variant); padding-block: 8px; }
  .bday .hub-list .cn, .bday .hub-list .yr { grid-column: auto; } .bday .hub-list .yr { font-size: 14px; } .bday .hub-list .k { display: none; }
}
@media (max-width: 839px) { .bday .hub-list li.head { display: none; } }
.bday .tries { display: flex; flex-wrap: wrap; gap: 8px; }
.bday .study-links { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.bday .all-dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px 24px; }
.bday .all-dates p { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; }
.bday .all-dates a { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.bday .all-dates a:hover { background: var(--md-sys-color-secondary-container); }
.bday .b-band { background: var(--md-sys-color-surface-container-low); padding-block: 24px; }
.bday .b-band .wrap { display: grid; gap: 8px; justify-items: start; }
.bday details.faq { border-bottom: 1px solid var(--md-sys-color-outline-variant); max-width: 46rem; }
.bday details.faq summary { min-height: 56px; display: flex; align-items: center; cursor: pointer; font-weight: 500; padding-block: 8px; }
.bday details.faq p { color: var(--md-sys-color-on-surface-variant); padding-bottom: 16px; }
.bday details.sources { margin-top: 24px; }
.bday details.sources summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 500; }
.bday details.sources ul { padding-left: 20px; }
.bday details.sources li, .bday details.sources p { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); margin: 4px 0; }

/* Date page */
.bday.datepage { max-width: 48rem; margin: 0 auto; padding: 16px var(--margin) 56px; }
.bday.datepage .crumbs { font-size: 14px; line-height: 20px; color: var(--md-sys-color-on-surface-variant); padding-block: 12px; }
.bday.datepage h1 { font-size: 36px; line-height: 44px; font-weight: 600; margin: 8px 0 16px; }
.bday.datepage > h2, .bday.datepage .fact-cards h2 { font-size: 24px; line-height: 32px; font-weight: 600; }
.bday.datepage > h2 { margin: 40px 0 12px; }
.bday.datepage > p { margin: 0 0 12px; }
.bday.datepage .short-answer { font-size: 18px; line-height: 28px; padding: 20px; border-radius: var(--shape-l); background: var(--md-sys-color-surface-container-low); }
.bday.datepage .note { font-size: 14px; line-height: 20px; }
.bday .table-wrap { overflow-x: auto; }
.bday .rtable { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.bday .rtable th, .bday .rtable td { text-align: left; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); vertical-align: top; }
.bday .rtable thead th { font-size: 12px; color: var(--md-sys-color-on-surface-variant); font-weight: 500; }
@media (max-width: 599px) {
  .bday .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bday .rtable, .bday .rtable tbody, .bday .rtable tr, .bday .rtable th, .bday .rtable td { display: block; }
  .bday .rtable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px 16px; margin-bottom: 8px; border-radius: var(--shape-m); background: var(--md-sys-color-surface-container-low); }
  .bday .rtable th, .bday .rtable td { border: 0; padding: 0; }
  .bday .rtable th { font-size: 16px; font-weight: 500; }
  .bday .rtable td:nth-child(2) { grid-column: 1; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
  .bday .rtable td:nth-child(3) { grid-column: 2; grid-row: 1 / 3; text-align: right; align-self: center; white-space: nowrap; }
  .bday .rtable td:nth-child(4) { grid-column: 1 / -1; font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-top: 4px; }
}
.bday .fact-cards { display: grid; gap: 12px; margin-top: 40px; }
@media (min-width: 600px) { .bday .fact-cards { grid-template-columns: 3fr 2fr; } }
.bday.datepage .sign-card { grid-column: auto; grid-template-columns: 72px minmax(0, 1fr); }
.bday.datepage .sign-card .medal { width: 72px; height: 72px; }
.bday.datepage .sign-card .medal .glyph { font-size: 36px; }
.bday.datepage .sign-card h2, .bday.datepage .num-card h2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.bday.datepage .num-card { grid-row: auto; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.bday.datepage .num-card .numeral { font-size: 88px; letter-spacing: -2px; text-shadow: 4px 4px 0 #ffddb6; }
/* "11/2" and "22/4" scale with the card so they are never clipped (two columns from 460 px, one below). */
.bday .numeral.master { font-size: min(104px, 36cqi); letter-spacing: -2px; text-shadow: 4px 4px 0 #ffddb6; }
.bday.datepage .num-card .numeral.master { font-size: min(56px, 30cqi); letter-spacing: -1px; }
@media (max-width: 459px) { .bday.datepage .num-card { grid-template-columns: 1fr; } }
.bday.datepage .near { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bday.datepage .near a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: var(--shape-s); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); text-decoration: none; font-weight: 500; font-size: 14px; color: var(--md-sys-color-on-surface); }
.bday.datepage .study-links { margin-bottom: 8px; }

/* &card=: the card alone (review screenshots) */
body.card-only { margin: 0; background: #555; }
body.card-only canvas { display: block; max-width: none; }

@media (prefers-reduced-motion: reduce) {
  .bday *, .bday *::before, .bday *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
