/* ee-site.css — Easter Egg (easteregg.llc). Loaded after house.css; every class here is prefixed ee-.

   The accent is a yolk: #A16207 on paper (4.92:1 on #fff, 4.72:1 on the tint), #FDE047 on the dark ground
   (14.4:1 on #0C1116). Accent as small TEXT on paper uses the darker #854D0E (6.85:1). Measured by mkeaster.py,
   which stops the build if any of them drops under 4.5:1. */

:root {
    --accent:      #A16207;
    --accent-ink:  #854D0E;
    --on-accent:   #ffffff;
    --ee-shell:    #FEFCE8;                       /* the inside of an egg badge */
    --ee-band:     rgba(161, 98, 7, .16);         /* the Western window on the strip */
    --ee-band-o:   rgba(30, 38, 43, .10);         /* the Orthodox window on the strip */
    --ee-sun:      rgba(30, 38, 43, .22);         /* a Sunday line */
    --ee-month:    rgba(30, 38, 43, .045);
}
html[data-dark] {
    --accent:      #FDE047;
    --accent-ink:  #FDE047;
    --on-accent:   #11161C;
    --ee-shell:    #1B2027;
    --ee-band:     rgba(253, 224, 71, .20);
    --ee-band-o:   rgba(255, 255, 255, .13);
    --ee-sun:      rgba(255, 255, 255, .26);
    --ee-month:    rgba(255, 255, 255, .05);
}

/* ------------------------------------------------------------------ hero */
.ee-hero { padding-block: clamp(28px, 5vw, 64px) clamp(20px, 3vw, 36px); }
.ee-hero h1 { max-width: 20ch; }
.ee-hero h1 b { color: var(--accent-ink); }
.ee-next { margin: 18px 0 0; min-height: 3.4em; max-width: 62ch; font-size: 1.02rem; color: var(--ink-77); }
.ee-next b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ the question */
.ee-tool { border-top: 0; padding-top: 0; }
.ee-ask { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; }
.ee-ask .field { flex: 0 0 auto; width: 9.5rem; }
.ee-year { font: 600 1.5rem/1.2 var(--mono); letter-spacing: .04em; min-height: 52px; text-align: center; }
.ee-ask .btn { min-height: 52px; }
.ee-ask .btn--ghost { padding: 0 16px; font-family: var(--mono); font-weight: 500; font-size: .9rem; }
.ee-say { margin: 12px 0 0; min-height: 3.2em; }

/* ------------------------------------------------------------------ the two plates */
.ee-plates { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.ee-plate {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0;
}
.ee-plate h2, .ee-plate h3 { font: 500 .74rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-55); margin: 0 0 8px; }
.ee-plate__date { font-size: clamp(1.25rem, 2.3vw, 1.7rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0; min-height: 2.4em; }
.ee-plate__when { margin: 6px 0 0; font: 500 .84rem/1.4 var(--mono); color: var(--accent-ink); min-height: 1.4em; }
.ee-plate__sub { margin: 6px 0 0; font-size: .86rem; line-height: 1.5; color: var(--ink-55); min-height: 3em; }

/* an egg, drawn in CSS: taller than wide, broad at the base */
.ee-egg {
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    width: 84px; height: 108px; flex: none; display: grid; align-content: center; justify-items: center; gap: 2px;
    border: 2px solid var(--accent); background: var(--ee-shell);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative; overflow: hidden;
}
.ee-egg::before, .ee-egg::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); opacity: .55; }
.ee-egg::before { top: 27%; }
.ee-egg::after { bottom: 21%; }
.ee-egg--o { border-style: double; border-width: 5px; }
.ee-egg--o::before, .ee-egg--o::after { height: 1px; opacity: .8; }
.ee-egg__m { font: 500 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-77); }
.ee-egg__d { font: 600 2rem/1 var(--sans); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }

.ee-gap { margin: 18px 0 0; max-width: 72ch; color: var(--ink-77); min-height: 3.2em; }
.ee-gap b { color: var(--ink); }

/* ------------------------------------------------------------------ the strip: 1 March to 31 May, drawn */
.ee-strip { margin: 26px 0 0; }
.ee-strip__plot { position: relative; padding: 44px 0 62px; }
.ee-strip__svg { display: block; width: 100%; height: 60px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.ee-s-month { fill: var(--ee-month); }
.ee-s-win { fill: var(--ee-band); }
.ee-s-wino { fill: var(--ee-band-o); }
.ee-s-sun { stroke: var(--ee-sun); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ee-s-edge { stroke: var(--ink-55); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ee-strip__mk { position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none; }
.ee-strip__mk i {                                            /* the stem */
    position: absolute; left: -1px; width: 2px; background: var(--ink); top: 28px; height: 26px;
}
.ee-strip__mk--o i { top: 94px; height: 30px; }
.ee-strip__mk b {                                            /* the egg on the stem */
    position: absolute; left: -8px; width: 16px; height: 20px; top: 52px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--accent); border: 2px solid var(--ink);
}
.ee-strip__mk--o b { top: 76px; background: var(--paper); border-style: double; border-width: 4px; }
.ee-strip__mk span {
    position: absolute; top: 4px; left: 0; transform: translateX(-50%); white-space: nowrap;
    font: 500 .74rem/1.3 var(--mono); letter-spacing: .02em; color: var(--ink); background: var(--paper);
    padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px;
}
.ee-strip__mk--o span { top: auto; bottom: 22px; }
.ee-strip__mk.is-l span { transform: translateX(-14px); }
.ee-strip__mk.is-r span { transform: translateX(calc(-100% + 14px)); }
.ee-strip__mk.is-off b, .ee-strip__mk.is-off i { display: none; }
.ee-strip__mo { position: absolute; bottom: 0; font: 500 .7rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-55); padding-left: 2px; }
.ee-strip figcaption, .ee-strip__cap { font-size: .86rem; line-height: 1.6; color: var(--ink-55); max-width: 76ch; margin-top: 10px; min-height: 4.8em; }
.ee-key { display: inline-block; width: 22px; height: 10px; vertical-align: baseline; margin-right: 5px; border: 1px solid var(--line); }
.ee-key--w { background: var(--ee-band); }
.ee-key--o { background: var(--ee-band-o); }

/* ------------------------------------------------------------------ tables */
.ee-two { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.ee-two h3 { margin-top: 0; }
table.t td.ee-d { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.t td.ee-off { white-space: nowrap; color: var(--ink-55); font-family: var(--mono); font-size: .82rem; }
table.t tr.ee-is td { font-weight: 600; }
table.t tr.ee-is th { box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); }
table.t a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
table.t a:hover { text-decoration-color: var(--accent); }
table.t td code, table.t th code { font-family: var(--mono); font-size: .86em; }
.ee-cap { caption-side: top; text-align: left; padding: 12px 14px; font: 500 .74rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-55); border-bottom: 1px solid var(--line-soft); }
.ee-bar { display: block; height: 10px; border-radius: 2px; background: var(--accent); }
.ee-bar--o { background: var(--ink-55); }
td.ee-barcell { width: 38%; min-width: 120px; vertical-align: middle !important; }
.ee-same td { background: var(--ee-band); }

/* ------------------------------------------------------------------ year pages and lists */
.ee-years { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); margin: 0; padding: 0; list-style: none; }
.ee-years a {
    display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
    text-decoration: none; font: 500 .92rem/1 var(--mono); color: var(--ink-77); background: var(--card);
}
.ee-years a:hover { border-color: var(--accent); color: var(--ink); }
.ee-years a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ee-decade { font: 500 .74rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-55); margin: 22px 0 8px; }
.ee-pager { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.ee-pager a { display: block; min-height: 64px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--card); }
.ee-pager a:hover { border-color: var(--accent); }
.ee-pager a span { display: block; font: 500 .72rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-55); }
.ee-pager a b { font-weight: 600; }
.ee-pager a.ee-pager__n { text-align: right; grid-column: 2; }
.ee-facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 0 0 8px; }
.ee-fact { border-top: 2px solid var(--accent); padding-top: 12px; }
.ee-fact > b { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; min-height: 1.15em; }
.ee-fact > span { display: block; font-size: .88rem; color: var(--ink-55); line-height: 1.5; margin-top: 4px; }
.ee-fact > span b { color: var(--ink-77); font-weight: 600; }
.ee-fact > span .ee-rel { display: block; min-height: 1.5em; }
.ee-facts + h2, .ee-two + h2, .ee-tool .tablewrap + h2, .ee-facts + h3 { margin-top: 1.8em; }
.prose h2 { margin-top: 1.7em; }
.prose h2:first-child { margin-top: 0; }
.ee-kv { margin: 0 0 8px; grid-template-columns: minmax(150px, 16rem) 1fr; }
.ee-kv dd { line-height: 1.9; }
.ee-kv dd b { color: var(--accent-ink); white-space: nowrap; }
.ee-rel { color: var(--accent-ink); font-family: var(--mono); font-size: .88em; }
.ee-src { margin-top: 18px; }
.ee-src a { color: inherit; }
.ee-list { padding-left: 1.2em; margin: 0 0 1em; }
.ee-list li { margin: 0 0 .5em; }
.ee-walk td:first-child { white-space: nowrap; }
.ee-walk td.n b { font-family: var(--mono); }

/* ------------------------------------------------------------------ one more thing */
.ee-found {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 80;
    width: min(440px, calc(100vw - 24px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
    background: var(--ink); color: var(--paper); border-radius: 14px; padding: 14px 14px 14px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.ee-found p { margin: 0; font-size: .92rem; line-height: 1.5; }
.ee-found p b { display: block; font-weight: 600; }
.ee-found svg { width: 34px; height: 44px; display: block; }
.ee-found button {
    -webkit-appearance: none; appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor;
    background: none; color: inherit; cursor: pointer; font-size: 1.1rem; line-height: 1;
}
@media (prefers-reduced-motion: no-preference) {
    .ee-found { animation: ee-up .32s ease-out both; }
    .ee-found svg { animation: ee-rock 1.1s ease-in-out .3s 2 both; transform-origin: 50% 90%; }
    @keyframes ee-up { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
    @keyframes ee-rock { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
}

/* ------------------------------------------------------------------ narrow */
@media (max-width: 760px) {
    .ee-plates, .ee-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .ee-plate { padding: 16px; gap: 14px; }
    .ee-egg { width: 68px; height: 88px; }
    .ee-egg__d { font-size: 1.6rem; }
    .ee-ask .field { width: 100%; flex: 1 1 100%; }
    .ee-ask .btn { flex: 1 1 auto; padding: 0 12px; }
    .ee-ask #ee-go { flex: 1 1 100%; }
    .ee-strip__mk span { font-size: .7rem; padding: 3px 5px; }
    .ee-pager { grid-template-columns: minmax(0, 1fr); }
    .ee-pager a.ee-pager__n { grid-column: 1; }
    table.t th, table.t td { padding: 10px 10px; }
    table.t td.ee-d { white-space: normal; }
    .ee-two table.t td.ee-d { height: calc(4.8em + 20px); }      /* three lines reserved: a longer date moves nothing */
    .ee-kv { grid-template-columns: 1fr; }
}
@media print {
    .ee-ask, .ee-found { display: none !important; }
}

/* ------------------------------------------------------------------ tap targets: 44 px, without moving the house shapes */
.mast__nav a { min-height: 44px; display: inline-flex; align-items: center; }
.ed button { position: relative; }
.ed button::after { content: ''; position: absolute; inset: -8px -6px; }
.foot ul { gap: 0; }
.foot li a { display: inline-block; padding-block: 11px; }
.crumbs a, .crumbs li[aria-current] { display: inline-block; padding-block: 12px; }
.crumbs { padding-top: 11px; }
table.t tbody th {
    font: 500 .92rem/1.6 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent; white-space: nowrap;
}
@media (max-width: 520px) { .ee-two table.t tbody th { white-space: normal; } }
table.t tbody th code { font-size: .95em; font-weight: 600; }
table.t th[scope="row"] > a:only-child { display: inline-block; padding-block: 11px; margin-block: -11px; }
.ee-src a.link, .ee-plate a { display: inline-block; padding-block: 11px; margin-block: -11px; }
