/* ─── word-of-day.css — word.html and word-archive.html ──────────────────
 *
 * ONE stylesheet for both Word of the Day pages, rather than the site's
 * usual per-page <style> block. The two pages are the same page twice over
 * — the same nav, the same tokens, the same cards, one showing a day and
 * the other a month of them — and a copy each is a copy to keep in step
 * for no gain. app-badges.css is the existing precedent here.
 *
 * FOUR SCRIPTS, FOUR FONTS, AND NO BOXES. Hebrew, Paleo-Hebrew (which
 * Unicode unifies with Phoenician) and Imperial Aramaic each live in their
 * own Unicode block, and a font without that block draws tofu — a row of
 * squares where the data says letters. Each script therefore names its own
 * face and nothing falls back to a system serif by accident. The pages
 * load the four from Google Fonts the way every other page on the site
 * loads a font; the @font-face below is the Phoenician face already in the
 * repo, kept as the fallback that works with no network.
 *
 * THE COLOURS ARE THE SAME IN BOTH MODES on the four script cards, and
 * that is deliberate: they are how a reader tells the scripts apart at a
 * glance, so they are not a theme. Everything around them — page, text,
 * parchment, edges — switches with the site's own [data-theme] attribute,
 * set before first paint by the inline script each page carries. There is
 * no second toggle.
 * ───────────────────────────────────────────────────────────────────────── */
@font-face{
  font-family:"NotoPhoenician";
  src:url("fonts/NotoSansPhoenician-Regular.ttf") format("truetype");
  font-display:swap;
}

:root{
  --wotd-page:#F5F5F7;
  --wotd-text:#2B2218;
  --wotd-sub:#6B5D4A;
  --wotd-chip:rgba(43,34,24,0.08);
  --wotd-edge:rgba(160,120,70,0.22);
  /* Shared with iOS and Android, and measured: 6.1:1 on the parchment's
   * lightest stop, 5.4:1 on its darkest. Dark mode's accent was already
   * clear and did not move. */
  --wotd-accent:#9E3A00;
  --wotd-gold:#9A7A2E;
  --wotd-mark:#F4D9B8;
  --wotd-track:#E6D7BC;
  --wotd-link:#0066CC;
  --wotd-parchment:
    radial-gradient(ellipse at 15% 0%, rgba(255,255,255,0.65), transparent 60%),
    /* 0.11, not 0.18: the warm corner was darkening the parchment under the
     * small print in the bottom right of a card enough to cost it its
     * ratio. */
    radial-gradient(ellipse at 100% 100%, rgba(176,140,90,0.11), transparent 55%),
    linear-gradient(170deg, #F8F1E2 0%, #EFE3CA 100%);
  --wotd-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 18px 40px rgba(0,0,0,0.06);

  /* The four faces, each naming the block it has to draw. */
  --wotd-serif:"Noto Serif","Iowan Old Style",Palatino,Georgia,serif;
  --wotd-hebrew:"Noto Serif Hebrew","Taamey Frank CLM","SBL Hebrew","Ezra SIL",serif;
  --wotd-paleo:"Noto Sans Phoenician","NotoPhoenician",serif;
  --wotd-aramaic-old:"Noto Sans Imperial Aramaic","Noto Sans Phoenician","NotoPhoenician",serif;
  --wotd-ui:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
}

[data-theme="dark"]{
  --wotd-page:#000000;
  --wotd-text:#EFE4CF;
  --wotd-sub:#B5A68C;
  --wotd-chip:rgba(239,228,207,0.12);
  --wotd-edge:rgba(230,200,150,0.14);
  --wotd-accent:#F5A15C;
  --wotd-gold:#D4AF37;
  --wotd-mark:#6B4A2A;
  --wotd-track:#3A3024;
  --wotd-link:#2997FF;
  --wotd-parchment:
    radial-gradient(ellipse at 15% 0%, rgba(255,226,180,0.07), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(0,0,0,0.35), transparent 55%),
    linear-gradient(170deg, #2E261C 0%, #211B14 100%);
  --wotd-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px #2C2C2E;
}

*{box-sizing:border-box;}
/* `display` on a class beats the UA sheet's [hidden]{display:none}, so a
 * link styled inline-flex ignores the attribute and shows anyway — which
 * is how "← Previous word" appeared on a page that had not wired it to a
 * day. Said once, here, for every element on these pages. */
[hidden]{display:none !important;}
html{scroll-behavior:smooth;}

/* THE SITE NAV IS WIDER THAN A 1280px WINDOW — sixteen items at 12px, which
 * is about 1700px of links before the hamburger takes over at 1040px. That
 * is the shared shell's own arithmetic and clean-unclean.html, which is
 * live, scrolls the whole page sideways at 1280 because of it. Contained
 * here rather than changed there: the nav keeps the look it has everywhere
 * else and takes the overflow itself, so the PAGE never scrolls sideways. */
.it-sitenav{overflow:hidden;}
.it-sitenav .it-nav-links{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;}
.it-sitenav .it-nav-links::-webkit-scrollbar{display:none;}
body{
  margin:0;background:var(--wotd-page);color:var(--wotd-text);
  font-family:var(--wotd-ui);line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:1120px;margin:0 auto;padding:0 22px;}
a{color:var(--wotd-link);}

/* The script runs. `unicode-bidi:isolate` keeps a right-to-left run from
 * dragging the transliteration beside it around with it. */
.wotd-s-english{font-family:var(--wotd-serif);}
.wotd-s-greek{font-family:var(--wotd-serif);}
.wotd-s-hebrew{font-family:var(--wotd-hebrew);direction:rtl;unicode-bidi:isolate;}
.wotd-s-paleo{font-family:var(--wotd-paleo);direction:rtl;unicode-bidi:isolate;}
.wotd-s-aramaic-old{font-family:var(--wotd-aramaic-old);direction:rtl;unicode-bidi:isolate;}

  /* ===== IsraelTeach site nav (scoped, won't touch page styles) ===== */
  .it-sitenav{
    position:sticky;top:0;z-index:40;
    display:flex;align-items:center;justify-content:space-between;gap:16px;
    padding:0 2.5vw;height:64px;
    background:linear-gradient(180deg,#10235f 0%,#0d1b4c 100%);
    border-bottom:1px solid rgba(200,168,75,.45);
    box-shadow:0 2px 14px rgba(8,16,48,.25);
    font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  }
  .it-sitenav .it-nav-logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:#fff;flex:none;}
  .it-sitenav .it-nav-logo img{height:38px;width:38px;border-radius:50%;object-fit:cover;animation:it-logo-glow 2.4s ease-in-out infinite;}
  @keyframes it-logo-glow{
    0%,100%{box-shadow:0 0 6px 2px rgba(200,168,75,0.45);}
    50%{box-shadow:0 0 20px 7px rgba(200,168,75,0.90),0 0 36px 12px rgba(200,168,75,0.30);}
  }
  .it-sitenav .it-nav-logo-text{display:flex;flex-direction:column;line-height:1;}
  .it-sitenav .it-nav-logo-text b{font-family:"Fraunces",Georgia,serif;font-size:17px;font-weight:600;letter-spacing:.02em;}
  .it-sitenav .it-nav-logo-text small{font-size:9px;font-weight:400;letter-spacing:.18em;text-transform:uppercase;color:rgba(255,255,255,.65);}
  .it-sitenav .it-nav-links{display:flex;align-items:center;gap:7px;list-style:none;margin:0;padding:0;flex-wrap:nowrap;}
  .it-sitenav .it-nav-links a{font-size:12px;font-weight:400;letter-spacing:.03em;text-transform:uppercase;color:rgba(255,255,255,.86);text-decoration:none;white-space:nowrap;padding:4px 2px;transition:color .2s;}
  .it-sitenav .it-nav-links a:hover{color:#e8c870;}
  .it-sitenav .it-nav-links a.it-active{color:#e8c870;border-bottom:2px solid #C8A84B;}
  .it-hamburger{display:none;background:none;border:0;cursor:pointer;width:30px;height:24px;flex:none;padding:0;}
  .it-hamburger span{display:block;height:2px;background:#fff;border-radius:2px;margin:5px 0;transition:.25s;}
  .it-nav-backdrop{display:none;}
  @media(max-width:1040px){
    .it-hamburger{display:block;}
    .it-sitenav .it-nav-links{
      position:fixed;top:64px;right:0;bottom:0;width:min(280px,80vw);
      flex-direction:column;align-items:flex-start;gap:0;
      background:#0d1b4c;padding:14px 20px;overflow-y:auto;
      transform:translateX(100%);transition:transform .28s ease;z-index:45;
    }
    .it-sitenav .it-nav-links.is-open{transform:translateX(0);}
    .it-sitenav .it-nav-links li{width:100%;border-bottom:1px solid rgba(200,168,75,.12);}
    .it-sitenav .it-nav-links a{display:block;padding:13px 2px;font-size:13px;}
    .it-nav-backdrop.is-open{display:block;position:fixed;inset:0;background:rgba(8,12,30,.5);z-index:44;}
  }
  .it-nav-right{display:flex;align-items:center;gap:8px;flex:none;}
  .it-theme-toggle{display:inline-flex;align-items:center;justify-content:center;background:none;border:0;cursor:pointer;color:#fff;width:38px;height:38px;flex:none;padding:0;}
  .it-theme-toggle svg{width:20px;height:20px;}
  .it-theme-toggle .it-sun{display:none;}
  .it-theme-toggle:hover{color:#e8c870;}
  [data-theme="dark"] .it-theme-toggle .it-moon{display:none;}
  [data-theme="dark"] .it-theme-toggle .it-sun{display:inline;}

/* ═══ 1. The hero ═══════════════════════════════════════════════════════ */
header.hero{padding:56px 0 18px;}
.wotd-eyebrow{
  margin:0 0 14px;font-size:13px;font-weight:600;letter-spacing:.14em;
  text-transform:uppercase;color:var(--wotd-accent);
}
.wotd-hero-tag{color:var(--wotd-sub);}
.wotd-hero-word{
  font-family:var(--wotd-serif);font-weight:600;font-size:96px;line-height:1.02;
  margin:0 0 14px;letter-spacing:-0.02em;color:var(--wotd-text);
}
.wotd-hero-means{font-size:20px;margin:0 0 18px;color:var(--wotd-sub);}
.wotd-sundown{margin:0 0 10px;}
.wotd-sundown-line{margin:0 0 10px;font-size:17px;color:var(--wotd-text);}
.wotd-sundown-line b{color:var(--wotd-accent);}
.wotd-sundown-note{margin:8px 0 0;font-size:13px;color:var(--wotd-sub);max-width:60ch;}
.wotd-pill{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:0 20px;border-radius:999px;cursor:pointer;
  background:var(--wotd-chip);border:1px solid var(--wotd-edge);
  color:var(--wotd-text);font:inherit;font-size:15px;
}
.wotd-pill:hover{border-color:var(--wotd-accent);color:var(--wotd-accent);}
.wotd-pill:disabled{opacity:.6;cursor:default;}
.wotd-daynav{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:22px 0 0;}
.wotd-link{
  color:var(--wotd-link);text-decoration:none;font-weight:500;
  display:inline-flex;align-items:center;min-height:44px;
}
.wotd-link:hover{text-decoration:underline;}
.wotd-status{
  background:var(--wotd-parchment);border:1px solid var(--wotd-edge);
  border-radius:24px;padding:26px;box-shadow:var(--wotd-shadow);margin:20px 0;
}
.wotd-status h2{font-family:var(--wotd-serif);font-size:26px;margin:0 0 8px;}
.wotd-status p{margin:0 0 8px;color:var(--wotd-sub);}
/* ── THE SOFT-LAUNCH PILL ───────────────────────────────────────────────
 *
 * An admin looking at a page the public cannot reach yet has to be able
 * to tell that that is what they are looking at — otherwise the only
 * difference between "launched" and "not launched" is a flag nobody can
 * see, and somebody eventually announces the wrong one.
 *
 * It is the accent on a chip, not a warning banner: the page underneath
 * is the real page, and this says who can see it, not that anything is
 * wrong. It goes away on its own when the flag turns public, because the
 * gate stops setting it. */
.wotd-preview{
  display:inline-block;margin:0 0 18px;padding:6px 14px;border-radius:999px;
  background:var(--wotd-chip);border:1px solid var(--wotd-edge);
  color:var(--wotd-accent);font-size:12px;font-weight:600;letter-spacing:.06em;
  text-transform:uppercase;
}
.wotd-demo{
  margin:16px 0;padding:12px 16px;border-radius:14px;font-size:13px;
  background:var(--wotd-chip);color:var(--wotd-sub);
}

/* ═══ Sections ══════════════════════════════════════════════════════════ */
.wotd-sec{margin:56px 0 0;}
.wotd-sec-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:16px;
  flex-wrap:wrap;margin:0 0 22px;
}
.wotd-h2{
  font-family:var(--wotd-serif);font-weight:700;font-size:40px;line-height:1.1;
  letter-spacing:-0.02em;margin:0;color:var(--wotd-text);
}
.wotd-sec-link{
  color:var(--wotd-link);text-decoration:none;font-size:15px;font-weight:500;
  display:inline-flex;align-items:center;min-height:44px;
}
.wotd-sec-link:hover{text-decoration:underline;}

/* ── THE CAROUSEL'S CHEVRONS, ON THE PHONE ONLY ─────────────────────────
 *
 * Above 734px all four script cards are on screen at once and there is
 * nothing to page through, so these do not exist. Below it the row is a
 * horizontal scroll-snap strip, and a finger is not the only way people
 * move it — a chevron is, and it is also the only way the row can be
 * driven from a keyboard without tabbing into a card.
 *
 * Gold, because they are the one control on the page that is navigation
 * rather than content. 16px of line art in a 44px target. */
.wotd-chevs{display:none;}
.wotd-chev{
  width:44px;height:44px;padding:0;border:0;background:none;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--wotd-gold);border-radius:50%;
}
.wotd-chev svg{display:block;}
.wotd-chev:focus-visible{outline:3px solid var(--wotd-accent);outline-offset:2px;}
.wotd-chev[hidden]{display:none;}
.wotd-foot{font-size:13px;color:var(--wotd-sub);margin:14px 0 0;}
.wotd-sources{font-size:13px;color:var(--wotd-sub);margin:48px 0 0;}

/* ═══ The flip card ═════════════════════════════════════════════════════
 *
 * Both faces are in ONE grid cell, so the card is as tall as the taller of
 * them and nothing is clipped. An absolutely positioned back ran off the
 * bottom of its own card on a phone, which is what this replaced.
 */
/* ═══ THE CARD ═════════════════════════════════════════════════════════
 *
 * Three rules this block exists to keep, each of them learned from a bug
 * the owner found in Safari on a dark-mode phone:
 *
 * 1. THE WRAPPER PAINTS NOTHING. No background, no border, no shadow. The
 *    gradient classes used to set `background` on the card itself, and a
 *    card is square — so when it turned over, the sand or the wine showed
 *    at the four corners of the rounded parchment back, and the page
 *    looked like light and dark mode mixed. The gradient is a VALUE now
 *    (--wotd-card-grad), and only a front face paints it.
 *
 * 2. THE FACE THAT IS TURNED AWAY IS `visibility: hidden`, switched at the
 *    half-way point of the flip. backface-visibility alone is not enough
 *    in WebKit: a face whose children make their own layers — an
 *    absolutely positioned button, a backdrop-filter — can paint through,
 *    and the back's "IN YOUR BIBLE" was visible on top of the front's
 *    "seasons". visibility is not a 3D property and cannot be ignored.
 *
 * 3. THE FRONT DECIDES THE HEIGHT. The two faces used to be grid-stacked,
 *    which sizes the cell to the TALLER of them — so the card with the
 *    long "book by book" back stood 720px tall with its front's content
 *    floating in the middle of it, and dragged the card beside it up to
 *    match. The front is in flow and the back is absolutely positioned
 *    over it; a back with more to say scrolls inside the card. */
.wotd-card{position:relative;perspective:1400px;background:transparent;border:0;box-shadow:none;}
.wotd-flip-inner{
  position:relative;transform-style:preserve-3d;background:transparent;
  transition:transform .7s cubic-bezier(.2,.7,.2,1);
}
.wotd-face{
  backface-visibility:hidden;-webkit-backface-visibility:hidden;
  border-radius:26px;overflow:hidden;background-clip:padding-box;
  display:flex;flex-direction:column;
  /* At .35s — half of the .7s rotation — so the swap happens edge-on,
     where neither face is facing the reader. */
  transition:visibility 0s linear .35s;
}
.wotd-front{
  position:relative;z-index:1;
  /* translateZ(1px) keeps the front in front of a back that WebKit might
     otherwise decide to composite above it. */
  transform:rotateY(0deg) translateZ(1px);
}
.wotd-back{position:absolute;inset:0;transform:rotateY(180deg) translateZ(1px);}
.wotd-flip .wotd-back{visibility:hidden;}
.wotd-flip.is-flipped .wotd-front{visibility:hidden;}
.wotd-flip.is-flipped .wotd-back{visibility:visible;}
.is-flipped .wotd-flip-inner{transform:rotateY(180deg);}
.wotd-flip .wotd-front{cursor:pointer;}

/* ── THE FLIP CUE: AN ICON, AND WORDS WHERE THERE IS ROOM ───────────────
 *
 * There is no disc behind it any more, on a front or on a back. A white
 * coin was a control with no name — a circle and a plus, which you have
 * to press before you know what it does — and being flat white it was the
 * one element on the page that belonged to no card, sitting on the wine
 * gradient and the sand one as the same bright button.
 *
 * What is left is line art in the card's own colour: the arrow one way to
 * turn the card over, the other way to turn it back, the same arc drawn
 * in reverse so the two read as opposites. 16px, currentColor, nothing
 * behind it.
 *
 * THE INK IS 16px AND THE TARGET IS 44px, which is what the empty box
 * around the icon is for. A 44px box pinned to a corner centres its icon
 * 22px in, and 22 - 8 is the 14px inset the icon appears to have: the
 * inset is a consequence of the target, not a second measurement that has
 * to be kept in step with it.
 *
 * Small cards get the icon alone, top-right. Big ones get it bottom-right
 * with "Tap to flip" beside it — see CUE_WITH_WORDS in word-of-day.js,
 * which is the one place that decides which kind a card is. */
.wotd-tap,.wotd-fb{
  position:absolute;top:0;right:0;width:44px;height:44px;padding:0;
  display:inline-flex;align-items:center;justify-content:center;
  border:0;background:none;box-shadow:none;cursor:pointer;
}
.wotd-tap svg,.wotd-fb svg{display:block;flex:0 0 auto;}

/* Big cards: the icon moves to the bottom and brings the words with it.
 * width:auto lets the pair size itself; the 44px floor stays. */
.wotd-tap-words{
  top:auto;bottom:4px;right:10px;width:auto;min-width:44px;
  gap:6px;padding:0 4px;
  font-family:inherit;font-size:12px;font-weight:600;letter-spacing:.01em;
  line-height:1;
}

/* THE COLOUR IS THE CARD'S OWN LABEL COLOUR, which is the set measured at
 * every stop of each gradient (see CONTRAST below), so the cue inherits
 * those ratios instead of needing its own. On parchment it is the accent;
 * on a back, which is always parchment, it is the body text colour. */
.wotd-tap{color:var(--wotd-accent);}
.wotd-grad-english .wotd-tap{color:#544835;}
.wotd-grad-hebrew .wotd-tap,.wotd-grad-aramaic .wotd-tap{color:#F3E2DD;}
.wotd-grad-old .wotd-tap{color:#122838;}
.wotd-grad-greek .wotd-tap{color:#3E2E5E;}
.wotd-fb{color:var(--wotd-text);}

/* AN ICON-ONLY CUE SITS OVER THE FIRST LINE, so the first line gives it
 * room — on the right only, and on the first line only, the same way the
 * back's eyebrow does. The alternative is 36px off the width of every
 * line on a card that is small to begin with.
 *
 * The letter tile is not in this list: its cue sits over a gradient band
 * with a single centred letter on it, and there is nothing in the corner
 * to clear. */
.wotd-use-card .wotd-front .wotd-use-ref,
.wotd-dig-card .wotd-front .wotd-dig-label,
.wotd-arch-card .wotd-front .wotd-eyebrow,
.wotd-arch-face > :first-child{padding-right:36px;}

.wotd-tap-words:hover{text-decoration:underline;text-underline-offset:3px;}
.wotd-fb:hover{opacity:.72;}
.wotd-tap:focus-visible,.wotd-fb:focus-visible{
  outline:3px solid var(--wotd-accent);outline-offset:-2px;border-radius:12px;
}

/* The back is always parchment, in both modes. */
.wotd-back{
  background:var(--wotd-parchment);color:var(--wotd-text);
  border:1px solid var(--wotd-edge);
}
/* THE ↺ IS PINNED TOP-RIGHT AND OUTSIDE THE SCROLL.
 *
 * It belongs to .wotd-back, not to .wotd-back-body, so it stays where it
 * is while the text moves under it — on a long back the button used to be
 * at the bottom of a region the reader had to scroll to reach, which put
 * the way out of a card behind the card's own content.
 *
 * The clearance moved with it. The bottom padding was 74px to clear a
 * button that is no longer there; what needs clearing now is the FIRST
 * line, and only on the right, so the eyebrow and the title carry it
 * rather than every line of the body losing 40px of width. The bottom
 * keeps enough air for the fade to land on. */
.wotd-back-body{
  padding:26px 26px 30px;overflow:auto;position:absolute;inset:0;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;-ms-overflow-style:none;
}
.wotd-back-body > .wotd-eyebrow,
.wotd-back-body > .wotd-back-title{padding-right:40px;}
.wotd-back-body::-webkit-scrollbar{display:none;}
/* And says so, softly, when there is more below. */
.wotd-back::after{
  content:"";position:absolute;left:1px;right:1px;bottom:1px;height:58px;
  pointer-events:none;border-radius:0 0 25px 25px;
  background:linear-gradient(180deg,rgba(248,241,226,0) 0%,rgba(248,241,226,.94) 76%);
}
[data-theme="dark"] .wotd-back::after{
  background:linear-gradient(180deg,rgba(33,27,20,0) 0%,rgba(33,27,20,.94) 76%);
}
.wotd-back-title{
  font-family:var(--wotd-serif);font-size:22px;font-weight:700;margin:0 0 14px;
  line-height:1.2;
}
.wotd-row{font-size:15px;margin:0 0 10px;color:var(--wotd-text);}
.wotd-row-label{
  font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--wotd-sub);
  display:inline-block;margin-right:6px;
}
/* A back is English, left-aligned, whatever its row's direction is. */
.wotd-back-body{text-align:left;}
/* On a letter card the label goes ABOVE its value: the values are single
   glyphs and short names, and a label beside one of those reads as part of
   it. */
.wotd-letter-card .wotd-row-label{display:block;margin:0 0 1px;}
/* And on an archive card, for the width rather than the reading: the card
   is a sixth of a phone screen wide, and "MEANS an appointment" beside its
   label wraps between the article and the noun. */
.wotd-arch-card .wotd-row-label{display:block;margin:0 0 1px;}
.wotd-letter-card .wotd-row{margin:0 0 10px;}
/* THE TILES STAY LEVEL WITHOUT STRETCHING TO EACH OTHER. A letter whose
   attested word is long wrapped its line and made that one card taller
   than the three beside it; the line keeps room for two either way, so
   the row is level because each tile is the same height, not because a
   grid pulled them. */
.wotd-letter-match{min-height:2.6em;}
.wotd-quote{
  margin:0 0 14px;padding:0 0 0 14px;border-left:3px solid var(--wotd-edge);
}
.wotd-quote p{margin:0 0 6px;font-family:var(--wotd-serif);font-size:17px;}
.wotd-quote cite{font-style:normal;font-size:12px;color:var(--wotd-sub);}
/* The two buttons are the same size and shape and do opposite things, so
 * the difference between them is stated rather than left to the glyph: the
 * "+" invites, the "turn back" is quieter than the card it sits on. */

/* The English card's back: the KJV's words for this one, biggest first. */
.wotd-ways{margin:10px 0 0;line-height:1.7;}

/* ── A CARD WITH THE WIDTH TO ITSELF GROWS TO ITS TALLER FACE ───────────
 *
 * The default above is "the FRONT decides the height, and a longer back
 * scrolls inside it". That is right for a ROW of cards, which has to stay
 * level whatever is on each of them, and wrong for a card that is alone
 * in its row: there is no neighbour to stay level with, so scrolling a
 * back that could simply have been taller hides lines for no one's
 * benefit, and the fade sits over the last line of a card that had room
 * to show it.
 *
 * Both faces go in ONE grid cell, which sizes to the taller of the two.
 * The back leaves absolute positioning, stops scrolling, and drops its
 * fade — there is nothing below a fold, because there is no fold.
 *
 * The flip still works: the cell is as tall as the taller face, both
 * faces fill it, and the rotation is on the wrapper as before. */
.wotd-grow > .wotd-flip-inner{display:grid;}
.wotd-grow > .wotd-flip-inner > .wotd-face{grid-area:1 / 1;}
.wotd-grow > .wotd-flip-inner > .wotd-back{position:relative;inset:auto;}
.wotd-grow .wotd-back-body{position:relative;inset:auto;overflow:visible;}
.wotd-grow .wotd-back::after{content:none;}

/* The three parchment card shapes. Each sets only its own floor, so a row
 * of them is level whatever is on them. */
.wotd-wide-card .wotd-face{min-height:260px;}
/* 240 and not 180: a usage card's back is its front plus one line — the
   reference, the book, the KJV's words — so a floor that the back clears
   means the card a reader turns over most often does not scroll at all. */
.wotd-use-card .wotd-face{min-height:240px;}
.wotd-dig-card .wotd-face{min-height:220px;}

.wotd-hero-eyebrow{margin:0 0 18px;}

/* A row holding one card gives it the whole width. See the note beside
 * countsSection() in word-of-day.js: a lone card in half a row reads as a
 * card that failed to load. */
.wotd-written-row.is-one,.wotd-wide-row.is-one,.wotd-dig-row.is-one{
  grid-template-columns:1fr;
}
/* …and being alone, each grows to its taller face. */
.wotd-written-row.is-one > .wotd-flip > .wotd-flip-inner,
.wotd-wide-row.is-one > .wotd-flip > .wotd-flip-inner,
.wotd-dig-row.is-one > .wotd-flip > .wotd-flip-inner{display:grid;}
.wotd-written-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-face,
.wotd-wide-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-face,
.wotd-dig-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-face{grid-area:1 / 1;}
.wotd-written-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-back,
.wotd-wide-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-back,
.wotd-dig-row.is-one > .wotd-flip > .wotd-flip-inner > .wotd-back{position:relative;inset:auto;}
.wotd-written-row.is-one .wotd-back-body,
.wotd-wide-row.is-one .wotd-back-body,
.wotd-dig-row.is-one .wotd-back-body{position:relative;inset:auto;overflow:visible;}
.wotd-written-row.is-one .wotd-back::after,
.wotd-wide-row.is-one .wotd-back::after,
.wotd-dig-row.is-one .wotd-back::after{content:none;}

.wotd-chips{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0;padding:0;}
.wotd-chip{
  display:inline-flex;align-items:baseline;gap:6px;padding:4px 10px;border-radius:999px;
  background:var(--wotd-chip);font-size:15px;
}
.wotd-chip-label{font-size:12px;color:var(--wotd-sub);}
.wotd-tag{
  font-size:11px;color:var(--wotd-sub);letter-spacing:.04em;white-space:nowrap;
}
.wotd-mark{background:var(--wotd-mark);padding:0 .12em;border-radius:3px;}
.wotd-mark-script{background:rgba(255,255,255,.22);border-radius:4px;padding:0 .1em;}

/* ── THE TWO CARD SKINS, AND THE SHADOW THEY SIT IN ────────────────────
 *
 * Every face carries the shadow, and the wrapper carries none: a shadow on
 * a square wrapper is a square shadow behind a rounded card, which is the
 * same bug as the gradient in a quieter form. Three layers, so the card
 * reads as hovering a little off the page rather than as having a line
 * drawn round it. */
.wotd-face{
  box-shadow:
    0 1px 2px rgba(23,18,10,.05),
    0 8px 18px rgba(23,18,10,.07),
    0 24px 48px rgba(23,18,10,.10);
}
[data-theme="dark"] .wotd-face{
  box-shadow:
    0 1px 2px rgba(0,0,0,.30),
    0 10px 22px rgba(0,0,0,.34),
    0 28px 56px rgba(0,0,0,.38);
}
.wotd-parchment > .wotd-flip-inner > .wotd-front,
.wotd-parchment.wotd-card-flat > .wotd-front{
  background:var(--wotd-parchment);border:1px solid var(--wotd-edge);
  color:var(--wotd-text);
}
/* THE GRADIENT IS A VALUE, NOT A PAINT. The class sits on the card,
 * because the label colours hang off it; what paints it is the front face
 * and the two inner panels that are a card front in all but name. */
.wotd-grad > .wotd-flip-inner > .wotd-front,
.wotd-grad.wotd-card-flat > .wotd-front,
.wotd-arch-face,
.wotd-letter-top{
  background:var(--wotd-card-grad);color:var(--wotd-card-ink);
}
.wotd-grad > .wotd-flip-inner > .wotd-front,
.wotd-grad.wotd-card-flat > .wotd-front{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 1px 2px rgba(23,18,10,.06),
    0 10px 22px rgba(23,18,10,.10),
    0 28px 56px rgba(23,18,10,.12);
}
.wotd-card-body{padding:26px 26px 78px;}

/* The phone colours. The same in light and dark, on purpose. */
.wotd-grad-english{
  --wotd-card-grad:linear-gradient(170deg,#EFE7DC 0%,#DCCFC0 55%,#CDBEAC 100%);
  --wotd-card-ink:#3B3026;
}
.wotd-grad-hebrew,.wotd-grad-aramaic{
  --wotd-card-grad:linear-gradient(165deg,#2A1416 0%,#4E2629 45%,#8A5652 100%);
  --wotd-card-ink:#F6E9E4;
}
.wotd-grad-old{
  --wotd-card-grad:linear-gradient(180deg,#6F93AC 0%,#A9C3D4 55%,#DCE7EE 100%);
  --wotd-card-ink:#122838;
}
.wotd-grad-greek{
  --wotd-card-grad:linear-gradient(180deg,#BBA7D9 0%,#D6C9EA 55%,#EEE8F6 100%);
  --wotd-card-ink:#2F2147;
}
/* THE LABEL COLOURS ARE MEASURED, AND THE THREE PLATFORMS SHARE THEM.
 *
 * Settled 3 Nov 2026, after iOS and Android measured the same cards. Each
 * one clears 4.5:1 against EVERY stop of the gradient it sits on, which is
 * the test a label on a gradient has to pass: the sand label used to be the
 * orange accent, which passed against the gradient's light top and failed
 * against its dark bottom. The sky card's label and its body ink are now
 * the same colour on purpose — there was no reading of the lighter blue
 * that passed at the top of the card.
 *
 * A value changed here has to change in the two apps as well, or the same
 * card reads differently on a phone than on the screen behind the pulpit.
 * tests/word/pages.test.js pins all of them. */
.wotd-grad-english .wotd-script-label,.wotd-grad-english .wotd-dig-label{color:#544835;}
.wotd-grad-hebrew .wotd-script-label,.wotd-grad-aramaic .wotd-script-label{color:#F3E2DD;}
.wotd-grad-old .wotd-script-label{color:#122838;}
.wotd-grad-greek .wotd-script-label{color:#3E2E5E;}

/* ═══ 2. The verse ══════════════════════════════════════════════════════ */
.wotd-verse-card{margin:26px 0 0;}
.wotd-verse-text{
  font-family:var(--wotd-serif);font-size:22px;line-height:1.5;margin:0 0 16px;
}
.wotd-verse-text .wotd-mark{
  background:none;text-decoration:underline;text-decoration-color:var(--wotd-accent);
  text-decoration-thickness:3px;text-underline-offset:4px;color:inherit;
}
.wotd-verse-meta{margin:0;font-size:13px;letter-spacing:.06em;color:var(--wotd-sub);}
.wotd-verse-today{color:var(--wotd-accent);text-transform:uppercase;letter-spacing:.12em;}
.wotd-verse-script{font-size:19px;}

/* ═══ 3. Where this word comes from ════════════════════════════════════ */
.wotd-script-row{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:20px;align-items:start;
}
.wotd-script-item{min-width:0;}
/* A FIXED 360px FRONT, so the four line up whatever is on them. */
.wotd-script-card .wotd-face{height:360px;}
/* EVERY back scrolls inside the height its front set, so there is nothing
 * left for the script cards to do differently. */
.wotd-script-face{
  display:flex;flex-direction:column;justify-content:space-between;
  padding:24px 24px 72px;height:360px;
}
.wotd-script-label{
  margin:0;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
}
.wotd-script-big{
  font-size:60px;line-height:1.08;display:block;margin-top:auto;
  overflow-wrap:break-word;hyphens:none;
}
.wotd-script-big.is-long{font-size:40px;}
.wotd-script-big.is-xlong{font-size:30px;line-height:1.15;}
.wotd-s-paleo.wotd-script-big,.wotd-s-aramaic-old.wotd-script-big{font-size:54px;}
.wotd-script-meta{padding:16px 4px 0;}
.wotd-bar-more{
  margin:10px 0 0;font-size:13px;color:var(--wotd-sub);font-style:italic;
}
.wotd-script-accent{
  margin:0 0 4px;font-size:12px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--wotd-accent);
}
.wotd-script-name{margin:0 0 2px;font-size:18px;font-weight:700;}
.wotd-script-say{margin:0 0 2px;font-size:14px;color:var(--wotd-sub);}
.wotd-script-line{margin:0;font-size:13px;color:var(--wotd-sub);}

/* ═══ 4. As it is written ══════════════════════════════════════════════ */
.wotd-written-row{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;align-items:start;}
.wotd-written-face{padding:26px 26px 72px;}
.wotd-written-text{
  margin:16px 0 0;font-size:24px;line-height:1.7;
}
.wotd-written-card .wotd-face{min-height:220px;}

/* ═══ 5. Letter by letter ══════════════════════════════════════════════ */
.wotd-letter-row{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:18px;align-items:start;
}
.wotd-letter-item{min-width:0;}
/* ONE CARD, NOT A PANEL INSIDE A CARD.
 *
 * The tile is a gradient band with the letter on it and parchment under
 * it. It used to be drawn as a bordered card with the band placed inside:
 * the 1px border inset the band by a pixel all round, so a hairline of
 * parchment ran above and beside the colour and the band's own corners
 * were squared off inside the card's rounded ones. Two radii, and a gap.
 *
 * The border becomes an INSET RING, which takes no space, so the band
 * reaches the edge and the card's single 26px radius clips it. */
.wotd-letter-card .wotd-front{
  border-radius:26px;border:0;overflow:hidden;
  box-shadow:inset 0 0 0 1px var(--wotd-edge),var(--wotd-shadow);
  background:var(--wotd-parchment);
}
.wotd-letter-top{
  display:flex;align-items:center;justify-content:center;padding:28px 0;min-height:140px;
  border-radius:0;margin:0;
}
.wotd-letter-big{font-size:72px;line-height:1;}
.wotd-letter-foot{padding:16px 18px 72px;direction:ltr;text-align:left;}
.wotd-letter-name{margin:0 0 6px;font-size:17px;}
.wotd-letter-match{margin:0;font-size:13px;color:var(--wotd-sub);}
.wotd-letter-note{direction:ltr;}
.wotd-letter-list{list-style:none;margin:0 0 12px;padding:0;}
.wotd-letter-list li{
  display:grid;grid-template-columns:76px 1fr;gap:10px;align-items:baseline;
  padding:4px 0;border-bottom:1px solid var(--wotd-edge);
}
.wotd-letter-pair{font-size:26px;display:inline-flex;gap:10px;}
.wotd-letter-square{font-size:22px;}
.wotd-letter-text{font-size:14px;}

/* ═══ 6. The counts and the dictionaries ═══════════════════════════════ */
.wotd-wide-row{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;align-items:start;}
.wotd-big-n{
  font-family:var(--wotd-serif);font-size:56px;font-weight:700;line-height:1;
  margin:0 0 18px;
}
.wotd-big-n-sub{
  display:block;font-family:var(--wotd-ui);font-size:13px;font-weight:400;
  letter-spacing:.1em;text-transform:uppercase;color:var(--wotd-sub);margin-top:6px;
}
.wotd-bars{display:grid;gap:8px;}
.wotd-bar-row{display:grid;grid-template-columns:minmax(90px,1fr) 2fr auto;gap:10px;align-items:center;}
.wotd-bar-label{font-size:14px;}
.wotd-bar-track{
  height:10px;border-radius:999px;background:var(--wotd-track);overflow:hidden;
}
.wotd-bar-fill{
  display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,#4E2629 0%,#8A5652 100%);
}
.wotd-bar-n{font-size:13px;color:var(--wotd-sub);font-variant-numeric:tabular-nums;}
.wotd-search{
  margin:18px 0 0;padding:16px 18px;border-radius:18px;
  background:linear-gradient(180deg,#6F93AC 0%,#A9C3D4 55%,#DCE7EE 100%);color:#122838;
}
.wotd-search .wotd-eyebrow{color:#122838;margin-bottom:8px;}
.wotd-search p{margin:0;font-size:15px;}

/* ═══ 7. Where else it is used ═════════════════════════════════════════ */
.wotd-use-row{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;align-items:start;}
.wotd-use-ref{
  margin:0 0 6px;font-size:12px;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:var(--wotd-accent);
}
.wotd-use-book{font-family:var(--wotd-serif);font-size:22px;margin:0 0 10px;}
.wotd-use-text{margin:0;font-family:var(--wotd-serif);font-size:17px;}
.wotd-use-note{margin:8px 0 0;font-size:12px;color:var(--wotd-sub);}

/* ═══ 8. Found in the ground ═══════════════════════════════════════════ */
.wotd-dig-row{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;align-items:start;}
.wotd-dig-label{
  margin:0 0 10px;font-size:11px;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;
}
.wotd-dig-title{font-family:var(--wotd-serif);font-size:24px;margin:0 0 8px;}
.wotd-dig-meta{margin:0;font-size:13px;opacity:.82;}

/* ═══ The archive ══════════════════════════════════════════════════════ */
.wotd-arch-row{
  list-style:none;margin:0;padding:0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:18px;
}
.wotd-arch-item{min-width:0;}
/* The painted face is the whole card, not a panel inside it: the gradient
 * is on .wotd-arch-face, and when that was only as tall as its own text the
 * "+" button — which is anchored to the card — floated in the white space
 * underneath it. */
.wotd-arch-card .wotd-face{min-height:280px;}
.wotd-arch-face{padding:20px 20px 72px;min-height:280px;height:100%;}
.wotd-arch-date{
  margin:0 0 10px;font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
}
.wotd-arch-english{font-family:var(--wotd-serif);font-size:26px;margin:0 0 10px;}
.wotd-arch-lemma{font-size:30px;display:block;}
.wotd-count{font-size:13px;letter-spacing:.1em;text-transform:uppercase;color:var(--wotd-sub);margin:0 0 18px;}
.wotd-months{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:22px 0 0;}
.wotd-foot-links{display:flex;flex-wrap:wrap;gap:18px;margin:56px 0 0;}

footer{margin:72px 0 0;padding:32px 0 46px;border-top:1px solid var(--wotd-edge);}
footer p{font-size:13px;color:var(--wotd-sub);margin:0;}
.wotd-vs{font-family:var(--wotd-serif);font-size:17px;color:var(--wotd-text);margin:0 0 10px;}

/* ═══ Hover, on a desktop only ═════════════════════════════════════════ */
@media (hover:hover) and (pointer:fine){
  .wotd-flip .wotd-front{transition:transform .3s ease, box-shadow .3s ease;}
  .wotd-flip:not(.is-flipped) .wotd-front:hover{
    transform:translateY(-4px);
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.4), 0 26px 54px rgba(0,0,0,0.16);
  }
}

/* ═══ Reduced motion: a crossfade, not a rotation ══════════════════════ */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .wotd-flip-inner{transition:none;}
  .is-flipped .wotd-flip-inner{transform:none;}
  .wotd-face{
    backface-visibility:visible;-webkit-backface-visibility:visible;
    /* The crossfade is 200ms, so the face swap moves with it rather than
       waiting at .35s for a rotation that is not happening. */
    transition:opacity .2s linear, visibility 0s linear .1s;
  }
  .wotd-back{transform:none;opacity:0;}
  .is-flipped .wotd-front{opacity:0;}
  .is-flipped .wotd-back{opacity:1;z-index:2;}
  .wotd-flip:not(.is-flipped) .wotd-front:hover{transform:none;}
}

/* ═══ 768px ════════════════════════════════════════════════════════════ */
@media (max-width:980px){
  .wotd-use-row{grid-template-columns:repeat(2,1fr);}
  .wotd-letter-row{grid-template-columns:repeat(3,1fr);}
  .wotd-arch-row{grid-template-columns:repeat(3,1fr);}
  .wotd-hero-word{font-size:72px;}
}

/* ═══ Under 734px: the phone ═══════════════════════════════════════════
 *
 * The four script cards become one horizontal scroll-snap row — the only
 * thing on the page that scrolls sideways, and the dots under the row say
 * where you are in it.
 */
@media (max-width:733px){
  .wrap{padding:0 18px;}
  header.hero{padding:34px 0 10px;}
  .wotd-hero-word{font-size:56px;}
  .wotd-hero-means{font-size:18px;}
  .wotd-h2{font-size:28px;}
  .wotd-sec{margin:40px 0 0;}

  .wotd-script-row{
    display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    margin:0 -18px;padding:0 18px 6px;
    scrollbar-width:none;-ms-overflow-style:none;
  }
  .wotd-script-row::-webkit-scrollbar{display:none;}
  .wotd-script-item{flex:0 0 auto;width:78vw;max-width:320px;scroll-snap-align:start;}

  /* The chevrons appear with the carousel, and nowhere else. */
  .wotd-chevs{display:inline-flex;align-items:center;gap:2px;margin-left:auto;}

  .wotd-written-row,.wotd-wide-row,.wotd-use-row,.wotd-dig-row{grid-template-columns:1fr;}
  /* One column is one card per row, so every one of them grows to its
     taller face here — a phone is where a clipped line costs most. */
  .wotd-written-row > .wotd-flip > .wotd-flip-inner,
  .wotd-wide-row > .wotd-flip > .wotd-flip-inner,
  .wotd-use-row > .wotd-flip > .wotd-flip-inner,
  .wotd-dig-row > .wotd-flip > .wotd-flip-inner{display:grid;}
  .wotd-written-row > .wotd-flip > .wotd-flip-inner > .wotd-face,
  .wotd-wide-row > .wotd-flip > .wotd-flip-inner > .wotd-face,
  .wotd-use-row > .wotd-flip > .wotd-flip-inner > .wotd-face,
  .wotd-dig-row > .wotd-flip > .wotd-flip-inner > .wotd-face{grid-area:1 / 1;}
  .wotd-written-row > .wotd-flip > .wotd-flip-inner > .wotd-back,
  .wotd-wide-row > .wotd-flip > .wotd-flip-inner > .wotd-back,
  .wotd-use-row > .wotd-flip > .wotd-flip-inner > .wotd-back,
  .wotd-dig-row > .wotd-flip > .wotd-flip-inner > .wotd-back{position:relative;inset:auto;}
  .wotd-written-row .wotd-back-body,
  .wotd-wide-row .wotd-back-body,
  .wotd-use-row .wotd-back-body,
  .wotd-dig-row .wotd-back-body{position:relative;inset:auto;overflow:visible;}
  .wotd-written-row .wotd-back::after,
  .wotd-wide-row .wotd-back::after,
  .wotd-use-row .wotd-back::after,
  .wotd-dig-row .wotd-back::after{content:none;}
  .wotd-letter-row{grid-template-columns:repeat(2,1fr);}
  .wotd-arch-row{grid-template-columns:repeat(2,1fr);}
  .wotd-back-body{padding:20px 20px 24px;}
  .wotd-card-body,.wotd-written-face{padding:20px 20px 72px;}
  .wotd-verse-text{font-size:19px;}
  .wotd-written-text{font-size:20px;}
  .wotd-script-big{font-size:52px;}
  .wotd-big-n{font-size:44px;}
}
