:root {
  color-scheme: light;
  --paper: #f7f5ed;
  --ink: #293d37;
  --muted: #606d5d;
  --teal: #226459;
  --teal-soft: #e1ebe2;
  --orange: #b66a3f;
  --line: #dadfd2;
  --serif: Georgia, "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, textarea { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, select, summary { touch-action: manipulation; }
button { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
button { transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
.page { max-width: 1192px; margin: 0 auto; padding: 0 46px; }
.masthead { min-height: 70px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; font-size: 11px; font-weight: 750; letter-spacing: 1.65px; text-decoration: none; color: var(--ink); }
.brand svg { width: 24px; height: 24px; stroke: var(--teal); stroke-width: 1.35; fill: var(--paper); }
.edition { font-family: var(--serif); font-size: 13px; font-style: italic; color: var(--muted); }
.masthead > .text-button { margin-left: auto; white-space: nowrap; }
.text-button { border: 0; background: transparent; padding: 10px 2px; font-size: 12px; font-weight: 550; text-underline-offset: 5px; }
.text-button:hover:not(:disabled) { color: var(--teal); text-decoration: underline; }
.text-button span { margin-left: 8px; }
.text-button:disabled { color: #a0a69b; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 28px 0 26px; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: 1.7px; }
.intro .eyebrow { color: var(--teal); }
h1 { margin: 10px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(72px, 8vw, 84px); letter-spacing: -5px; line-height: 1.08; }
h1 span { color: var(--orange); }
.subtitle { margin: 9px 0 0; font-family: var(--serif); font-size: 22px; font-style: italic; color: #677466; }
.puzzle-picker { display: flex; flex-direction: column; align-items: flex-start; width: 270px; padding-bottom: 3px; }
.puzzle-picker label { font-size: 9px; font-weight: 700; letter-spacing: 1.65px; color: var(--muted); }
.puzzle-picker select { width: 100%; min-height: 44px; margin-top: 9px; border: 1px solid #c6d0c1; border-radius: 3px; padding: 10px 34px 10px 12px; background-color: transparent; color: var(--ink); font-size: 13px; cursor: pointer; }
.puzzle-picker select:hover { border-color: var(--teal); }
#collection-progress { margin-top: 9px; font-size: 12px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 58px; border-top: 1px solid var(--line); padding: 24px 0 44px; }
.puzzle { min-width: 0; }
.puzzle-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.puzzle-heading .eyebrow { font-size: 9px; color: var(--muted); letter-spacing: 1.4px; }
.puzzle-heading h2 { margin: 7px 0 0; font-family: var(--serif); font-size: 27px; line-height: 1.25; font-weight: 400; letter-spacing: -.45px; }
.moves { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.moves strong { font-family: var(--serif); font-size: 29px; font-weight: 400; line-height: 1; color: var(--teal); }
.moves span { margin-top: 6px; font-size: 11px; color: var(--muted); }
.board-label { display: grid; grid-template-columns: minmax(0, 1fr) 164px; padding: 0 0 11px 30px; gap: 16px; color: var(--muted); font-size: 9px; line-height: 1.5; font-weight: 650; letter-spacing: 1.15px; }
#board { border-top: 1px solid var(--line); }
.word-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; min-height: 88px; border-bottom: 1px solid var(--line); align-items: center; transition: background-color .2s ease; }
.row-number { align-self: center; font-family: var(--serif); font-size: 13px; color: #606d5d; }
.word-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 164px; gap: 16px; align-items: center; }
.word-letters { display: flex; align-items: center; justify-content: flex-start; min-width: 0; min-height: 64px; }
.letter { flex: 0 0 21px; padding: 7px 0; text-align: center; font-family: var(--serif); font-size: 29px; line-height: 1.25; font-weight: 400; transition: background-color .16s ease, color .16s ease; }
.letter.suffix { background: var(--teal-soft); color: var(--teal); }
.letter.second-suffix { background: #f1e4d6; color: #936039; }
.seam { flex: 0 0 24px; width: 24px; height: 60px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; border-radius: 4px; position: relative; }
.seam-line { display: block; height: 28px; border-left: 1px dashed #bdc6b8; transition: height .16s ease, border-color .16s ease; }
.seam:hover:not(:disabled) { background: #e8ebe1; }
.seam:hover:not(:disabled) .seam-line { height: 39px; border-left-color: var(--orange); }
.seam[aria-pressed="true"] { background: #efe6d7; }
.seam[aria-pressed="true"] .seam-line { height: 40px; border-left: 2px dashed var(--orange); }
.seam[aria-pressed="true"]::before { content: ""; position: absolute; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.seam:focus-visible { outline-offset: 0; z-index: 1; }
.clue { position: relative; margin: 0; font-size: 14px; line-height: 1.5; color: #606d5d; }
.clue-length { display: block; margin: 3px 0 0; white-space: nowrap; color: #606d5d; font-size: 11px; }
.match-check { position: absolute; top: 1px; right: 0; color: var(--teal); font-size: 13px; font-weight: 750; }
.matched .clue { color: var(--teal); padding-right: 18px; }
.matched .row-number { color: var(--teal); }
.exchange-panel { margin-top: 26px; padding: 20px 22px; background: #eeeee4; border: 1px solid #e3e5d9; border-radius: 4px; }
.preview-label { margin: 0 0 11px; font-size: 9px; color: #606d5d; font-weight: 650; letter-spacing: 1.5px; }
.preview { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 29px; min-height: 38px; }
.empty-preview { font-family: var(--serif); font-size: 16px; font-style: italic; color: #606d5d; }
.preview-word { display: inline-flex; gap: 8px; align-items: baseline; }
.preview-word small { font-size: 12px; color: var(--muted); }
.preview-word strong { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: .4px; }
.preview-word b { color: var(--teal); font-weight: 400; }
.preview-word.invalid strong { text-decoration: underline; text-decoration-color: #b66a3f88; text-decoration-style: dotted; text-underline-offset: 5px; }
.preview-word.invalid b { color: #a56743; }
.exchange-actions { display: flex; align-items: center; gap: 19px; margin-top: 17px; }
.primary { display: inline-flex; justify-content: center; align-items: center; gap: 26px; min-height: 44px; padding: 12px 17px; border: 1px solid var(--teal); border-radius: 3px; color: #fffdf6; background: var(--teal); font-size: 12px; font-weight: 600; }
.primary span { font-size: 18px; line-height: .8; font-weight: 400; }
.primary:hover:not(:disabled) { background: #174c43; border-color: #174c43; }
.primary:disabled { color: #fffdf6; border-color: #a7b8a8; background: #a7b8a8; }
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 13px; border: 1px solid #cad2c3; border-radius: 3px; background: transparent; font-size: 12px; }
.secondary:hover:not(:disabled) { background: #e9eee2; border-color: #8ca28e; }
.secondary:disabled { color: #a2aa9b; border-color: #dfe3d6; }
.status { min-height: 34px; margin: 13px 1px 12px; font-size: 12px; color: #606d5d; line-height: 1.6; }
.status.error, .status.invalid { color: #9b5836; }
.status.success { color: var(--teal); }
.toolbar { display: flex; align-items: center; gap: 17px; padding-top: 4px; }
.toolbar > .text-button { font-size: 12px; }
.hint-button { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 11px 0 11px 8px; border: 0; background: transparent; color: var(--teal); font-size: 12px; }
.hint-button span { font-size: 18px; }
.hint-button:hover:not(:disabled) { color: #163e35; text-decoration: underline; text-underline-offset: 5px; }
.hint-button:disabled { color: #a2aa9b; }
aside { min-width: 0; }
.note { background: #eeeee4; padding: 25px 25px 21px; border-top: 3px solid var(--teal); }
.note .eyebrow { font-size: 9px; letter-spacing: 1.4px; color: var(--teal); }
.note h2 { font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1.25; letter-spacing: -.5px; margin: 15px 0 14px; }
.note p { font-size: 12px; line-height: 1.7; color: #606d5d; margin: 0; }
.example { margin: 24px 0 18px; }
.example > div { display: flex; justify-content: space-between; gap: 15px; padding: 0 5px; font-family: var(--serif); font-size: 23px; letter-spacing: 1px; }
.example em { font-style: normal; color: var(--teal); }
.example i { padding: 0 3px; color: var(--orange); font-size: 25px; font-style: normal; font-weight: 400; }
.example svg { display: block; width: 100%; height: 37px; margin: 3px auto 7px; fill: none; stroke: #a9ba9e; stroke-width: 1; }
.note .note-bottom { padding-top: 13px; border-top: 1px solid #d7ddce; font-family: var(--serif); font-size: 12px; font-style: italic; }
.goal { display: flex; gap: 12px; padding: 24px 0 20px; }
.goal > span { margin-top: -4px; font-size: 29px; color: var(--teal); }
.goal strong { display: block; font-size: 12px; line-height: 1.6; font-weight: 650; }
.goal p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.mini-rules { border-top: 1px solid var(--line); padding: 20px 0 5px; }
.mini-rules h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; font-weight: 400; }
.mini-rules ol { margin: 0; padding-left: 18px; color: #606d5d; font-size: 12px; line-height: 1.65; }
.mini-rules li { padding-left: 3px; margin-bottom: 8px; }
.mini-rules li::marker { color: #606d5d; font-family: var(--serif); }
.mini-rules strong { font-weight: 600; color: #55654e; }
.mini-rules p { margin: 15px 0; color: #606d5d; font-family: var(--serif); font-size: 12px; font-style: italic; line-height: 1.6; }
details { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; color: var(--muted); }
summary { cursor: pointer; line-height: 1.6; color: #64735c; }
details p { line-height: 1.8; margin: 11px 0 2px; }
details .text-button { font-size: 12px; color: var(--teal); }
#bank-list { max-height: 180px; overflow: auto; line-height: 2; font-size: 12px; padding: 8px 10px; border: 1px solid var(--line); background: #ffffff42; overflow-wrap: anywhere; }
#bank-list span { display: inline-block; margin-right: 7px; }
.win { position: relative; margin-top: 25px; padding: 26px; border: 1px solid #becfba; background: #e7edde; text-align: center; border-radius: 3px; }
.win-mark { color: var(--teal); font-size: 36px; line-height: 1; }
.win h2 { font-family: var(--serif); font-size: 35px; font-weight: 400; letter-spacing: -.8px; margin: 9px 0; }
.win p { color: #697a60; font-size: 12px; line-height: 1.8; }
.win-actions { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 19px; }
#share-fallback { display: block; width: 100%; min-height: 95px; margin-top: 16px; border: 1px solid #bccab7; background: var(--paper); padding: 12px; border-radius: 3px; color: var(--ink); font-size: 12px; resize: vertical; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 75px; border-top: 1px solid var(--ink); color: #606d5d; }
footer span:first-child { font-size: 9px; font-weight: 650; letter-spacing: 1.5px; }
footer span:last-child { font-family: var(--serif); font-size: 12px; font-style: italic; }
dialog { width: min(560px, calc(100% - 36px)); max-height: calc(100% - 48px); overflow-y: auto; border: 1px solid #c6d0bd; border-radius: 5px; padding: 30px 34px 34px; background: var(--paper); color: var(--ink); box-shadow: 0 22px 85px #19392d29; }
dialog::backdrop { background: #18382f66; backdrop-filter: blur(3px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-top .eyebrow { color: var(--teal); font-size: 9px; }
.close-button { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 25px; line-height: 1; }
.close-button:hover { background: #e9eee0; }
dialog h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -.7px; line-height: 1.15; margin: 22px 0 23px; }
dialog ol { padding-left: 21px; margin: 0; font-size: 13px; line-height: 1.75; color: #66755e; }
dialog li { padding-left: 6px; margin-bottom: 15px; }
dialog li::marker { font-family: var(--serif); color: var(--orange); }
dialog strong { color: var(--ink); font-weight: 650; }
dialog p { font-size: 12px; line-height: 1.7; color: #606d5d; }
dialog .keyboard-note { font-size: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 19px; }
dialog > .primary { margin-top: 10px; }
.noscript { margin: 24px auto; padding: 20px; max-width: 600px; text-align: center; border: 1px solid var(--orange); }

@media (max-width: 1070px) {
  .page { padding: 0 30px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 244px; gap: 32px; }
  .puzzle-picker { width: 244px; }
  .edition { display: none; }
  .word-main { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .word-row { min-height: 106px; padding: 3px 0 10px; }
  .row-number { align-self: start; margin-top: 24px; }
  .word-letters { min-height: 61px; }
  .clue { padding: 0 0 0 1px; font-size: 13px; }
  .board-label { display: block; }
  .board-label span:last-child { display: none; }
  .note { padding: 24px 22px 20px; }
}

@media (max-width: 760px) {
  .page { max-width: 620px; padding: 0 25px; }
  .masthead { min-height: 66px; gap: 10px; }
  .brand { font-size: 9px; letter-spacing: 1.2px; gap: 8px; }
  .brand svg { width: 22px; height: 22px; }
  .masthead > .text-button { font-size: 12px; }
  .intro { padding: 26px 0 24px; gap: 23px; flex-direction: column; align-items: flex-start; }
  .intro .eyebrow { font-size: 9px; letter-spacing: 1.15px; }
  h1 { font-size: 79px; letter-spacing: -4px; margin-top: 9px; }
  .subtitle { font-size: 20px; margin-top: 5px; }
  .puzzle-picker { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; }
  .puzzle-picker label { font-size: 9px; letter-spacing: 1.2px; }
  .puzzle-picker select { min-height: 42px; margin: 0; font-size: 12px; }
  #collection-progress { grid-column: 2; margin: 0; font-size: 12px; }
  .workspace { display: block; padding: 22px 0 30px; }
  .puzzle-heading { padding-bottom: 20px; }
  .puzzle-heading h2 { font-size: 25px; }
  .word-row { grid-template-columns: 17px minmax(0, 1fr); gap: 12px; min-height: 103px; padding-top: 2px; padding-bottom: 8px; }
  .word-main { gap: 0; }
  .row-number { margin-top: 24px; }
  .letter { flex-basis: 25px; font-size: 31px; }
  .seam { flex-basis: 26px; width: 26px; }
  .clue { font-size: 13px; }
  .exchange-panel { margin-top: 22px; padding: 19px 20px; }
  .empty-preview { font-size: 15px; }
  .toolbar { gap: 17px; }
  aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; border-top: 1px solid var(--line); margin-top: 38px; padding-top: 27px; }
  .note { grid-row: span 2; padding: 20px 18px; }
  .note h2 { font-size: 23px; }
  .note .eyebrow { font-size: 9px; letter-spacing: .8px; }
  .note p { font-size: 12px; }
  .note .note-bottom { font-size: 12px; }
  .example > div { font-size: 20px; gap: 7px; padding: 0; letter-spacing: 0; }
  .example i { padding: 0 2px; font-size: 21px; }
  .goal { padding: 0 0 18px; gap: 8px; }
  .goal > span { font-size: 24px; }
  .goal strong { font-size: 12px; }
  .goal p { font-size: 12px; }
  .mini-rules { padding: 17px 0 0; }
  .mini-rules h3 { font-size: 16px; }
  .mini-rules ol { font-size: 12px; padding-left: 15px; }
  .mini-rules p { font-size: 12px; }
  details { grid-column: 1 / -1; margin-top: 24px; padding-bottom: 0; }
  footer { min-height: 80px; gap: 12px; }
  footer span:first-child { font-size: 9px; letter-spacing: 1px; }
  footer span:last-child { font-size: 12px; }
}

@media (max-width: 430px) {
  .page { padding: 0 19px; }
  .masthead > .text-button span { margin-left: 4px; }
  .puzzle-picker { gap: 8px 11px; }
  .letter { flex-basis: 18px; font-size: 28px; }
  .seam { flex-basis: 24px; width: 24px; min-width: 24px; height: 60px; }
  .word-row { grid-template-columns: 15px minmax(0, 1fr); gap: 8px; }
  .board-label { padding-left: 23px; }
  .exchange-panel { padding: 17px; }
  .primary { font-size: 12px; gap: 16px; }
  .exchange-actions { gap: 16px; }
  .preview { gap: 10px 20px; }
  .preview-word strong { font-size: 22px; }
  .status { font-size: 12px; min-height: 32px; }
  aside { display: block; }
  .note { padding: 23px; }
  .note h2 { font-size: 26px; }
  .note .eyebrow { font-size: 9px; }
  .note p { font-size: 12px; }
  .example { max-width: 212px; margin: 23px auto; }
  .example > div { font-size: 25px; }
  .example i { font-size: 26px; }
  .goal { padding: 24px 0 20px; gap: 12px; }
  .goal strong { font-size: 12px; }
  .goal p, .mini-rules ol { font-size: 12px; }
  .mini-rules h3 { font-size: 18px; }
  .mini-rules p { font-size: 12px; }
  details { margin-top: 16px; }
  .win { padding: 23px 16px; }
  .win h2 { font-size: 32px; }
  dialog { padding: 22px; }
  dialog h2 { font-size: 30px; }
  dialog ol { font-size: 12px; padding-left: 16px; }
}

@media (max-width: 359px) {
  .page { padding: 0 17px; }
  .brand { font-size: 9px; letter-spacing: .75px; gap: 6px; }
  .masthead > .text-button { font-size: 12px; }
  .intro .eyebrow { font-size: 9px; letter-spacing: .75px; }
  .puzzle-picker { grid-template-columns: 1fr; }
  #collection-progress { grid-column: 1; }
  .letter { flex-basis: 14px; font-size: 24px; }
  .exchange-panel { padding: 15px 13px; }
  .empty-preview { font-size: 14px; }
  .primary { gap: 12px; padding-right: 13px; padding-left: 13px; }
  .exchange-actions { gap: 12px; }
  .toolbar { gap: 14px; }
  footer { align-items: flex-start; justify-content: center; flex-direction: column; padding: 19px 0; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
