/*
 * Full Text — tool-specific styles (page cards + centered modal). Requires
 * ../../shared/css/tokens.css and ../../shared/css/tool-shell.css loaded
 * first. Source: build_docs/design_handoff_witch_tools/redesign/tools.html.
 */

.ft-page { border: 1px solid var(--desk); border-radius: 3px; padding: 24px 26px; margin-top: 20px; background: var(--paper); cursor: pointer; transition: border-color 150ms; }
.ft-page:hover { border-color: var(--rust); }
.ft-meta { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mid); margin-bottom: 10px; }
.ft-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.ft-fulltext { font-family: Georgia, 'Times New Roman', serif; font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); font-style: italic; }
.ft-fulltext mark, .ft-modal-body mark { background: var(--ochre); color: var(--ink); font-style: normal; padding: 0 2px; border-radius: 2px; }

#ftModal { position: fixed; inset: 0; z-index: 200; display: none; }
#ftModal.open { display: block; }
.ft-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.ft-modal { position: relative; margin: 60px auto; max-width: 640px; max-height: 80vh; overflow-y: auto; background: var(--paper); border-radius: 4px; padding: 40px 44px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.ft-modal-close { all: unset; position: absolute; top: 16px; right: 20px; font-size: 24px; line-height: 1; color: var(--ink-mid); cursor: pointer; }
.ft-modal-close:hover { color: var(--ink); }
.ft-modal-meta { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mid); margin-bottom: 10px; }
.ft-modal-title { font-size: 22px; font-weight: 600; color: var(--ink); margin: 0 0 18px; }
.ft-modal-body { font-family: Georgia, 'Times New Roman', serif; font-size: 15.5px; line-height: 1.75; color: var(--ink-soft); font-style: italic; }
.ft-modal-actions { margin-top: 28px; display: flex; align-items: center; gap: 12px; }
.ft-modal-copy { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 20px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600; }
.ft-modal-copy:hover { background: var(--rust); }
.ft-source-link { font-size: 12.5px; color: var(--rust); text-decoration: underline; }
.ft-source-link:hover { color: var(--ochre); }
.ft-modal-copied { font-size: 12px; color: var(--ink-mid); opacity: 0; transition: opacity 150ms; }
.ft-modal-copied.show { opacity: 1; }
.ft-prompt { margin-top: 44px; color: var(--ink-mid); font-size: 14px; }

.ft-summary { margin: 22px 0 0; color: var(--ink-mid); font-size: 13.5px; line-height: 1.5; max-width: 62ch; }
.ft-page:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

/* The reader: the whole text, matches marked, a bar to step between them and a rail showing where they fall. */
body.ftr-open { overflow: hidden; }
#ftReader { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; background: var(--cream); }
#ftReader.open { display: flex; }
.ftr-bar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--paper); border-bottom: 1px solid var(--desk); flex-wrap: wrap; }
.ftr-back, .ftr-prev, .ftr-next, .ftr-copy { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 20px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ftr-back { background: transparent; color: var(--ink); border: 1px solid var(--desk); }
.ftr-back:hover { border-color: var(--rust); color: var(--rust); }
.ftr-prev:hover, .ftr-next:hover, .ftr-copy:hover { background: var(--rust); }
.ftr-prev:disabled, .ftr-next:disabled { opacity: .35; cursor: default; background: var(--ink); }
.ftr-prev:focus-visible, .ftr-next:focus-visible, .ftr-back:focus-visible, .ftr-copy:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.ftr-id { flex: 1 1 260px; min-width: 0; }
.ftr-meta { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mid); }
.ftr-title { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftr-nav { display: flex; align-items: center; gap: 10px; }
.ftr-count { min-width: 118px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); }
.ftr-tools { display: flex; align-items: center; gap: 10px; }
.ftr-copied { font-size: 12px; color: var(--ink-mid); opacity: 0; transition: opacity 150ms; }
.ftr-copied.show { opacity: 1; }
.ftr-wrap { flex: 1; min-height: 0; display: flex; }
.ftr-body { flex: 1; overflow-y: auto; padding: 36px 24px 60vh; outline: none; scroll-behavior: auto; }
.ftr-text { max-width: 700px; margin: 0 auto; font-family: Georgia, 'Times New Roman', serif; font-size: 17.5px; line-height: 1.8; color: var(--ink-soft); }
.ftr-text h2 { font-size: 22px; line-height: 1.3; color: var(--ink); margin: 2em 0 .6em; }
.ftr-text h3 { font-size: 18px; color: var(--ink); margin: 1.6em 0 .5em; }
.ftr-text p { margin: 0 0 1em; }
.ftr-text blockquote { margin: 1em 0 1em 1.2em; padding-left: 1em; border-left: 3px solid var(--desk); }
.ftr-text sup { font-size: .72em; color: var(--ink-mid); }
.ftr-text table { border-collapse: collapse; margin: 1em 0; } .ftr-text td { border: 1px solid var(--desk); padding: 4px 8px; }
.ftr-loading { color: var(--ink-mid); }
/* a page break: a small marker inline in the text (generated content, so the text itself is not changed) */
a.ft-pb::before { content: attr(data-n); display: inline-block; vertical-align: super; margin: 0 .35em; padding: 1px 6px; border: 1px solid var(--desk); border-radius: 9px; font: 600 10px/1.4 'Familjen Grotesk', sans-serif; letter-spacing: .04em; color: var(--ink-mid); background: var(--paper); }
a.ft-pb { text-decoration: none; cursor: help; }
.ftr-text mark.ft-hit { background: var(--ochre); color: var(--ink); padding: 0 1px; border-radius: 2px; }
.ftr-text mark.ft-hit.cur { background: var(--rust); color: var(--paper); box-shadow: 0 0 0 3px var(--rust); }
.ftr-rail { position: relative; width: 22px; flex: none; background: var(--paper); border-left: 1px solid var(--desk); cursor: pointer; }
.ftr-thumb { position: absolute; left: 0; right: 0; background: var(--desk); opacity: .55; pointer-events: none; min-height: 6px; }
.ftr-tick { position: absolute; left: 3px; right: 3px; height: 4px; background: var(--ochre); border-radius: 1px; margin-top: -2px; }
.ftr-tick:hover { background: var(--rust); }
.ftr-foot { display: flex; justify-content: space-between; gap: 12px; padding: 6px 18px; font-size: 11.5px; color: var(--ink-mid); background: var(--paper); border-top: 1px solid var(--desk); }
@media (max-width: 700px) { .ftr-bar { gap: 6px 10px; padding: 8px 12px; } .ftr-back { order: 1; } .ftr-tools { order: 2; margin-left: auto; } .ftr-id { order: 3; flex: 1 1 100%; } .ftr-nav { order: 4; flex: 1 1 100%; justify-content: space-between; } .ftr-back, .ftr-prev, .ftr-next, .ftr-copy { padding: 7px 12px; } .ftr-keys { display: none; } .ftr-count { min-width: 0; } .ftr-body { padding: 24px 16px 60vh; } .ftr-text { font-size: 16.5px; } }

/* Results by source */
.fs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 22px; }
.fs-bar .ft-summary { margin: 0; }
.fs-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-mid); }
.fs-sort span { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; margin-right: 4px; }
.fs-sort button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--desk); color: var(--ink); font-size: 12.5px; font-weight: 600; background: var(--paper); }
.fs-sort button:hover { border-color: var(--rust); }
.fs-sort button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fs-sort button:focus-visible, .fs-more:focus-visible, .fs-read:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.fs-card { border: 1px solid var(--desk); border-radius: 3px; padding: 20px 24px 14px; margin-top: 16px; background: var(--paper); }
.fs-card:hover { border-color: var(--rust); }
.fs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.fs-id { min-width: 0; }
.fs-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.fs-title a { color: var(--ink); text-decoration: none; } .fs-title a:hover { color: var(--rust); text-decoration: underline; }
.fs-count { text-align: right; flex: none; display: flex; flex-direction: column; line-height: 1.1; }
.fs-n { font-size: 30px; font-weight: 700; color: var(--ink); } .fs-l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mid); font-weight: 700; }
.fs-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 12px; font-size: 12.5px; color: var(--ink-mid); }
.fs-rel { width: 90px; height: 6px; background: var(--desk); border-radius: 3px; overflow: hidden; display: inline-block; }
.fs-rel i { display: block; height: 100%; background: var(--ochre); }
.fs-term { padding: 2px 9px; border: 1px solid var(--desk); border-radius: 11px; color: var(--ink-soft); } .fs-term b { color: var(--ink); }
.fs-place { display: flex; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 3px; cursor: pointer; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; line-height: 1.65; color: var(--ink-soft); font-style: italic; }
.fs-place:hover { background: var(--cream); }
.fs-place:focus-visible { outline: 2px solid var(--rust); outline-offset: -2px; }
.fs-place mark { background: var(--ochre); color: var(--ink); font-style: normal; padding: 0 2px; border-radius: 2px; }
.fs-pg { flex: none; font: 600 10.5px/2.2 'Familjen Grotesk', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-mid); font-style: normal; min-width: 62px; }
.fs-extra { display: none; } .fs-open-all .fs-extra { display: flex; }
.fs-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.fs-more { all: unset; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-mid); padding: 4px 0; } .fs-more:hover { color: var(--rust); }
.fs-read { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--rust); text-decoration: none; } .fs-read:hover { text-decoration: underline; }
@media (max-width: 700px) { .fs-card { padding: 16px 16px 12px; } .fs-n { font-size: 24px; } .fs-pg { display: none; } }

.fs-opts { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.search-wrap .fs-opts label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-soft); } .fs-opts small { color: var(--ink-mid); font-size: 12px; }
.fs-opts input { width: 16px; height: 16px; accent-color: var(--rust); cursor: pointer; }
.fs-var { flex-basis: 100%; font-size: 12.5px; color: var(--ink-mid); } .fs-var summary { cursor: pointer; } .fs-var p { margin: 6px 0 0 14px; } .fs-var b { color: var(--ink); font-weight: 600; }

.fs-cited, .ftr-cited { font-size: 12.5px; font-weight: 600; color: var(--rust); text-decoration: none; white-space: nowrap; } .fs-cited:hover, .ftr-cited:hover { text-decoration: underline; }
.ftr-cited[hidden] { display: none; }

.fs-also { flex-basis: 100%; font-size: 12.5px; color: var(--ink-mid); margin: 8px 0 0; }

/* what the research ties to the text */
.ftr-layers { display: flex; gap: 12px; font-size: 12.5px; color: var(--ink-mid); }
.ftr-layers label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.ftr-sw { display: inline-block; width: 14px; height: 10px; }
.ftr-sw-cite { width: 4px; height: 12px; border-radius: 2px; background: rgba(31, 110, 136, .5); }
.ftr-sw-name { border-bottom: 1px dotted var(--rust); }
.ftr-text { position: relative; }
.ftr-text .ft-cite.glow { background: rgba(31, 110, 136, .10); }
.ftr-text .ft-name { border-bottom: 1px dotted var(--rust); cursor: pointer; }
.ftr-text .ft-name:hover { background: rgba(138, 75, 34, .10); }
.ftr-text.hide-names .ft-name { border-bottom: 0; cursor: auto; background: none; }
.ftr-mg { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.ftr-mb { position: absolute; width: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(31, 110, 136, .38); cursor: pointer; transition: background 120ms; }
.ftr-mb:hover, .ftr-mb.on, .ftr-mb:focus-visible { background: var(--wave-core); outline: none; }
@media (max-width: 700px) { .ftr-mb { width: 3px; } }
.ftr-ctick { position: absolute; right: 0; width: 6px; height: 3px; background: var(--wave-core); opacity: .8; pointer-events: none; }
.ftr-pop { position: absolute; z-index: 5; width: min(420px, calc(100% - 24px)); max-height: 60%; overflow: hidden; background: var(--paper); border: 1px solid var(--desk); border-radius: 4px; box-shadow: 0 8px 28px rgba(26, 20, 16, .28); padding: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.ftr-pop[hidden] { display: none; }
.ftr-pop h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mid); }
.ftr-pop h4:not(:first-of-type) { margin-top: 12px; }
.ftr-pop ul { list-style: none; margin: 0; padding: 0; }
.ftr-pop li { padding: 7px 0; border-top: 1px solid var(--desk); }
.ftr-pop li:first-child { border-top: 0; }
.ftr-pk { display: block; font-size: 11px; color: var(--ink-mid); text-transform: uppercase; letter-spacing: .05em; }
.ftr-pl { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; }
.ftr-pl a { color: var(--wave-core); font-size: 12.5px; }
.ftr-pop-x { position: absolute; top: 4px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-mid); }
@media (max-width: 700px) { .ftr-layers { order: 5; flex: 1 1 100%; } }
.ftr-pop li > b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.ftr-pop li.ftr-pr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 5px 0; }
.ftr-pop li.ftr-pr .ftr-pk { display: inline; min-width: 44px; } .ftr-pop li.ftr-pr .ftr-pl { margin: 0; margin-left: auto; }
.ftr-pop li.ftr-pr > b { display: inline; }
.ftr-pop-in { max-height: min(60vh, 520px); overflow-y: auto; padding: 12px 16px 14px; }
.ftr-pop-in h4:first-child { padding-right: 28px; }
.ftr-pop-x { z-index: 1; }


.ftr-ml { position: absolute; transform: translateX(-100%); max-width: 150px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 10.5px/14px var(--sans, system-ui, sans-serif); letter-spacing: .02em; color: var(--wave-core); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.ftr-ml:hover, .ftr-ml.on { opacity: 1; text-decoration: underline; font-weight: 800; }
@media (max-width: 1050px) { .ftr-ml { display: none; } }

/* "About this case and its sources" at the foot of a text (same block as on the Edition pages) */
.ftr-about { max-width: 700px; margin: 0 auto; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.ftr-about .edition-about { margin-top: 56px; }
.ftr-about h2 { font-size: 22px; margin: 0 0 10px; color: var(--ink); }
.ftr-about h3 { font-size: 15px; margin: 20px 0 6px; color: var(--ink); }
.ftr-about hr { border: 0; border-top: 1px solid var(--desk); margin: 0 0 24px; }
.ftr-about ul { margin: 0; padding-left: 1.2em; } .ftr-about li { margin: 2px 0; }
.ftr-about a { color: var(--wave-core); }
.ftr-pc { flex-basis: 100%; font-size: 12px; color: var(--ink-mid); } .ftr-pc a { color: var(--rust); }
.ftr-ll { color: var(--ink-mid); } .ftr-nm { border-bottom: 1px dotted var(--rust); }
.fs-tm { font-size: 11px; font-weight: 600; color: var(--rust); margin-left: 6px; white-space: nowrap; } .fs-titlecard .fs-count .fs-l { color: var(--rust); font-weight: 700; }
.fs-lt { display: block; flex-basis: 100%; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
