/* Spelling rules guide: the strip of table (pages.css) with a word sort lying on the wood, then the guide on plain
   paper: the rules at a glance, a section for each rule with the words to say at the table and its words from the
   lists, and the floss rule's own page. */
/* Double letters are the subject here, so ff and fi are never joined into one shape. */
main { font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0, "calt" 0; }
/* An ending such as -es or -ing keeps its hyphen with its letters. */
.nw { white-space: nowrap; }
main :focus { scroll-margin-top: calc(var(--top-h) + 20px); scroll-margin-bottom: 20px; }
.pg h2[id], .pg h3[id] { scroll-margin-top: calc(var(--top-h) + 24px); }

/* The strip of table: the card with the answer, and two cards of a word sort beside it. */
.sr-band .band-card { max-width: 680px; }
.sr-band .band-card .kicker a { font-weight: 700; text-decoration-color: var(--red); }
.sr-band .band-card .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.sr-band .thing { pointer-events: none; }
/* The answer on the card itself: all twelve rules as bars, the eight that never break and the four that do. */
.sr-band .band-card { max-width: 700px; }
.band-card p.hn-lede { margin: 0 0 6px; }
/* The tally sits on a clear patch of the card, so its own row lines are the only lines under the bars. */
.hn { position: relative; margin: 10px -24px 0; padding: 2px 24px 8px; background: var(--paper); }
.band-card p.hn-h { margin: 14px 0 2px; font-size: 18px; line-height: 26px; }
.hn-h b { font-size: 21px; text-decoration: underline 3px var(--red); text-underline-offset: 6px; text-decoration-skip-ink: none; }
.hn-rows { list-style: none; margin: 0; padding: 0; }
.hn-rows li { margin: 0; border-bottom: 1px solid rgba(79,134,219,.45); }
.hn-rows a { display: grid; grid-template-columns: 10em minmax(0, 1fr) 6.4em; align-items: center; gap: 14px; min-height: 38px; padding: 3px 0; color: inherit; text-decoration: none; }
.hn-rows a:hover .hn-l, .hn-rows a:focus-visible .hn-l { text-decoration: underline 2px var(--red); text-underline-offset: 3px; }
.hn-l { font-size: 17px; line-height: 22px; }
.hn-rows .tally { max-width: none; margin: 0; height: 18px; }
.hn-rows b { font-size: 19px; line-height: 24px; text-align: right; white-space: nowrap; }
.hn figcaption { margin-top: 8px; font-size: 15px; line-height: 22px; }
.hn figcaption .key::before { width: 16px; height: 10px; margin-right: 5px; vertical-align: 0; }
.hn figcaption .key { white-space: normal; }
.band-card p.hn-after { margin: 12px 0 0; font-size: 17px; line-height: 27px; }
/* The floss page's answer: one bar of its 70 words, and the 13 that keep one letter under it. */
.fl-n { padding-top: 14px; }
.fl-n > .tally { max-width: none; height: 34px; margin: 0; }
.band-card p.fl-k { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0; font-size: 17px; line-height: 24px; }
.fl-k b { font-size: 22px; }
.fl-k .fl-b { color: var(--red); text-align: right; }
.fl-n .chips { margin: 4px 0 0; }
@media (max-width: 760px) {
  /* On a phone the strip of table is short, so the card and its bars come up into the first screen. */
  .sr-band { padding-top: calc(var(--top-h) + 118px); }
  .sr-band .band-card { padding-left: 18px; padding-right: 18px; }
  .hn { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .hn-rows a { grid-template-columns: 6.9em minmax(0, 1fr) auto; gap: 10px; min-height: 36px; }
  .hn-l { font-size: 16px; line-height: 20px; }
  .hn-rows b { font-size: 17px; }
  .band-card p.hn-h { margin-top: 12px; font-size: 16px; }
  .hn-h b { font-size: 19px; }
}
/* Very narrow (a small phone, or a phone zoomed in): the rule and its count on one line, its bar full width under them. */
@media (max-width: 359px) {
  .hn-rows a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l n" "t t"; gap: 2px 8px; padding: 6px 0 8px; }
  .hn-l { grid-area: l; }
  .hn-rows b { grid-area: n; }
  .hn-rows .tally { grid-area: t; }
  .band-card p.fl-k { flex-wrap: wrap; }
}
/* An index card: its rules are drawn by a layer inside it, in the card's own width (cqw), so each word sits on a line. */
.wcard { container-type: inline-size; aspect-ratio: 5 / 3.4; background: #fff; color: var(--graphite); box-shadow: 0 0 0 1px rgba(51,54,59,.12), 10px 14px 18px rgba(80,45,10,.32); }
.wcard > .rl { position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(transparent 17cqw, rgba(215,55,42,.75) 17cqw calc(17cqw + 1.5px), transparent 0),
    repeating-linear-gradient(transparent 0 calc(13.44cqw - 1px), rgba(79,134,219,.38) calc(13.44cqw - 1px) 13.44cqw) 0 17cqw / 100% 100% no-repeat; }
.wcard p, .wcard ul { position: relative; }
.wcard p { margin: 0; padding: 4cqw 7cqw 0; font: 700 9.5cqw/1.25 var(--font); color: var(--red); }
.wcard ul { list-style: none; margin: .3cqw 0 0; padding: 0 7cqw; display: grid; grid-template-columns: 1fr 1fr; gap: 0 6cqw; }
.wcard li { font: 400 12cqw/1.12 var(--font); color: #3d4045; margin: 0; }

/* The rules at a glance. */
.sr-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-size: 17px; line-height: 25px; }
.sr-table caption { text-align: left; font-size: 16px; line-height: 24px; padding: 0 0 10px; caption-side: top; }
.sr-table th, .sr-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(79,134,219,.45); }
.sr-table thead th { font-size: 15px; line-height: 21px; border-bottom: 2px solid var(--red); padding-bottom: 8px; }
.sr-table tbody th { font-weight: 700; }
.sr-table tbody th a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.sr-table td.n { white-space: nowrap; }
.sr-table thead th:nth-child(1) { width: 29%; }
.sr-table thead th:nth-child(2) { width: 25%; }
.sr-table thead th:nth-child(3) { width: 15%; }
.sr-table td.n .tally { max-width: 210px; }
.sr-table td.n b { font-size: 19px; }
.sr-table .ex { font-size: 16px; line-height: 23px; }
.sr-wide { margin: 0 calc(min(0px, (760px - min(100vw - 2 * var(--gap), 1000px)) / 2)); }

/* A rule's words as a bar: one mark per word, grey for the words that follow it and red for those that break it.
   A rule with too many words for marks to show (more than about 90) is drawn solid. */
.tally { --g: 1.5px; display: flex; gap: 3px; width: 100%; max-width: 230px; height: 16px; margin: 3px 0 5px; }
.tally i, .tally s { display: block; min-width: 3px; text-decoration: none;
  background: linear-gradient(90deg, var(--c) 0 72%, transparent 0) 0 0 / calc(100% / var(--k)) 100% repeat-x; }
.tally i { --c: #6E7177; --k: var(--f); flex: var(--f) 0 0; }
.tally s { --c: var(--red); --k: var(--b); flex: var(--b) 0 0; }
.tally.solid i, .tally.solid s { background: var(--c); }
/* A solid bar keeps its true proportion even when only a few words break it (3 of 230 is a sliver). */
.tally.solid s { min-width: 1px; }
.sr-table td.n .tally { display: flex; }
/* The key above the table, in the bars' own colors. */
.key { white-space: nowrap; }
.key::before { content: ""; display: inline-block; width: 22px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.key-f::before { background: #6E7177; }
.key-b::before { background: var(--red); }
.pg p.lead-in { font-size: 17px; line-height: 27px; }

/* A rule's count at the top of its section, with the way back to all 12. */
.pg p.sec-n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: -2px 0 12px; padding: 8px 0 10px; border-bottom: 1px solid rgba(79,134,219,.45); font-size: 17px; line-height: 25px; }
.sec-n .tally { flex: 0 1 200px; margin: 0; }
.sec-n .to-all { margin-left: auto; }
.to-all { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }
.to-all::before { content: "\2191"; margin-right: 6px; color: var(--red); }
.pg p.back { margin: -4px 0 0; }
.pg p.more { margin: 4px 0 18px; }
.pg p.more .btn { white-space: normal; text-align: left; }

/* Words from a list, as small cards, so a parent can copy them out one by one. */
.chips, .pg ul.chips, .guide ul.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 6px; margin: 4px 0 12px; padding: 0; }
.pg .chips li, .chips li { margin: 0; padding: 1px 9px 2px; background: #fff; border: 1px solid rgba(79,134,219,.55); border-radius: 3px; font-size: 17px; line-height: 26px; }
.chips.br li { color: var(--red); border-color: rgba(215,55,42,.55); }
/* A doubled word whose vowel isn't short (ball, full): outside the rule's count, drawn with a dashed edge. */
.chips li.ns { border: 1.5px dashed #6E7177; }
.sr-table .chips { margin: 0; gap: 4px; }
.sr-table .chips li { font-size: 15.5px; line-height: 22px; padding: 0 7px 1px; }
.sr-table .ex.none { color: #55585e; }
.pg .credit { margin-top: -4px; }
.pg p.chips-h { margin-bottom: 6px; }
.wl-table td .chips { margin: 0; }

/* The floss week, one card per group of words: the sort and the Friday sentences. */
.weeks-g { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0 20px; }
.wk { margin: 0; padding: 16px 18px 12px; background: #fff; border: 1.5px solid var(--graphite); border-radius: 4px; box-shadow: 4px 4px 0 var(--manila), 4px 4px 0 1.5px rgba(51,54,59,.2); }
.guide .wk h3 { margin: 0 0 6px; font-size: 21px; line-height: 28px; }
.pg .wk p { font-size: 16px; line-height: 24px; margin: 8px 0 4px; font-weight: 700; }
.wk .chips { margin: 0 0 4px; }
.pg .wk p.wk-note { font-weight: 400; margin: 0 0 6px; }
.wk .chips li { font-size: 16px; line-height: 24px; }
.guide .wk ol.dict { margin: 0; padding-left: 1.4em; }
.guide .wk ol.dict li { font-size: 19px; line-height: 30px; }
@media (max-width: 760px) { .weeks-g { grid-template-columns: 1fr; } }

/* The words to say at the table: a small index card. */
.say { position: relative; margin: 14px 0 18px; padding: 14px 18px 12px 20px; background: var(--paper); border: 1.5px solid var(--graphite); border-radius: 4px; box-shadow: 4px 4px 0 var(--manila), 4px 4px 0 1.5px rgba(51,54,59,.2); }
.say p { margin: 0; }
.pg .say p { font-size: 18px; line-height: 29px; }
.pg .say .say-h { font-size: 15px; line-height: 22px; margin-bottom: 2px; font-weight: 700; }

/* A rule's words from the list, opened on request. */
.words { margin: 10px 0 18px; border-top: 1px solid rgba(79,134,219,.45); border-bottom: 1px solid rgba(79,134,219,.45); }
.words summary { cursor: pointer; padding: 10px 0; font-weight: 700; font-size: 17px; line-height: 26px; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; }
.words summary::-webkit-details-marker { display: none; }
.words summary::before { content: "+"; display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border: 2px solid var(--graphite); border-radius: 50%; font-size: 17px; line-height: 1; }
.words[open] summary::before { content: "\2212"; }
.pg .words p { font-size: 17px; line-height: 28px; margin: 0 0 12px; }
.pg .words p.wl { word-spacing: .12em; }

/* The floss words by ending: a reference table to copy word cards from. */
.wl-table { width: 100%; border-collapse: collapse; margin: 14px 0 12px; }
.wl-table caption { text-align: left; font-size: 16px; line-height: 24px; padding: 0 0 8px; }
.wl-table th, .wl-table td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid rgba(79,134,219,.45); font-size: 18px; line-height: 28px; }
.wl-table thead th { font-size: 15px; line-height: 21px; border-bottom: 2px solid var(--red); padding-bottom: 8px; }
.wl-table tbody th { font-weight: 700; white-space: nowrap; width: 9.5em; }
.wl-table .cnt { display: block; font-weight: 400; font-size: 15px; line-height: 20px; }
.wl-table td { word-spacing: .12em; }
.guide ol.dict li { font-size: 20px; line-height: 32px; }
.guide figure { margin: 26px 0 30px; }
.guide figure img { display: block; width: 100%; height: auto; }
.guide figcaption { font-size: 16px; line-height: 24px; margin-top: 8px; }
.guide blockquote { margin: 16px 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--red); }
.guide blockquote p { font-size: 18px; line-height: 29px; margin: 0 0 4px; }
.guide blockquote footer { font-size: 15px; line-height: 22px; }
.guide h3 { margin: 26px 0 8px; }
.guide ol { padding-left: 1.4em; }
.guide ol li::marker { color: var(--red); font-weight: 700; }
.pg .src { font-size: 16px; line-height: 25px; }
.guide .weeks { columns: 2; column-gap: 32px; padding-left: 1.2em; }
.guide .weeks li { break-inside: avoid; font-size: 17px; line-height: 26px; margin-bottom: 6px; }

/* The signup form's note shows only when the page's signup script (su-send, in the head) has just had a refusal. */
.signup .su-err.su-no:not([hidden]) { display: block; }
.signup .su-no[hidden] { display: none; }

/* Phone-sized targets for the shared menu and footer on this page. */
@media (max-width: 760px) {
  .top .menu summary { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .top .top-tab { padding-top: 1px; padding-bottom: 1px; }
  .top .menu li a { min-height: 44px; display: flex; align-items: center; }
  .foot li { margin: 0; }
  .foot li a { min-height: 44px; display: inline-flex; align-items: center; padding: 0; }
  .signup .tick { min-height: 44px; align-items: center; }
  .sr-wide { margin: 0; }
  /* The glance table reads as one card per rule. */
  .sr-table, .sr-table tbody, .sr-table tr, .sr-table td, .sr-table tbody th { display: block; }
  .sr-table caption { display: block; }
  .sr-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sr-table tr { padding: 12px 0 10px; border-bottom: 1px solid rgba(79,134,219,.45); }
  .sr-table th, .sr-table td { border: 0; padding: 2px 0; }
  .sr-table tbody th { font-size: 19px; line-height: 27px; padding-bottom: 4px; }
  .sr-table td[data-label]::before { content: attr(data-label) ": "; font-size: 15px; }
  .sr-table td.n { white-space: normal; }
  /* Phone card: the bar and its count on one line, the Spache count and a "None" side by side under it. */
  .sr-table td:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
  .sr-table td:nth-child(2)::before { content: "Dale-Chall"; flex: none; }
  .sr-table td:nth-child(2) .tally { flex: 1 1 50px; max-width: 150px; margin: 0; }
  .sr-table td:nth-child(3), .sr-table td.ex.none { display: inline-block; font-size: 15px; line-height: 22px; margin-right: 12px; }
  .sr-table td:nth-child(3)::before { content: "Spache: "; }
  .sr-table td.ex.none::before { content: "Breaks it: "; }
  .sr-table .ex .chips { margin-top: 2px; }
  .sr-table tr { padding: 10px 0 8px; }
  .pg p.sec-n { gap: 0 12px; font-size: 16px; line-height: 23px; padding: 6px 0 4px; }
  .sec-n .tally { flex: 0 0 96px; }
  .sec-n .to-all { min-height: 40px; }
  .guide .weeks { columns: 1; }
}
