@charset "UTF-8";
/* ===========================================================
   AFTER — LAYER 2 of 3: FAMILY "student"
   The Clever Student Tools tool pages. All of them are generated from one
   shell (student-src/build.js) and driven by one engine
   (templates/engines/student-engine.js), so the shared page patterns
   belong HERE:

     .toolnav             "Free Student Tools" pill navigation under the hero
     .tool / #toolBody    the tool card that hosts each tool's own interface
     .opt-row/.opt-l/.opt-in   the controls those interfaces are built from
     .prog / .tool-msg    progress bar and status line
     .tool-hint           privacy footnote strip
     .lf-* (longform)     shared "In practice" card grid

   Every Student-template tool is recreated: Images and media, Citations and
   references, Text utilities, AI writing helpers, Study calculators.

   If a rule is specific to one tool, it belongs in after-student/<slug>.css;
   if it would help every tool on the site, move it up to after-global.css.

   =========================================================== */

/* -----------------------------------------------------------
   WORKSPACE CONTROL STATES
   Before defines hover only, so a press goes unacknowledged — and on touch,
   where hover does not exist, there is no feedback at all. The primary
   action's press is the site-wide one (after-global.css); the smaller
   secondary buttons (Import, Pause, Stop, Copy, Cancel, Clear) stay still and
   answer with tone only, in the same language as the tool navigation pills.
   ----------------------------------------------------------- */
.tool .qa-btn:not(:disabled):active{
  border-style:solid;
  border-color:var(--green);
  color:var(--green);
  background:var(--green-tint);
  box-shadow:inset 0 1px 3px rgba(14,123,84,.18);
  transition:none;
}

/* -----------------------------------------------------------
   LOCKED WHILE PROCESSING
   The engine already disables the inputs of a running job (Image to Text:
   file input and language while recognising) and marks the dropzone
   aria-disabled. The lock is made visible the way the PDF tools show it:
   the dropzone reads as unavailable, its text dims, the cursor says no.
   ----------------------------------------------------------- */
.tool .dropzone[aria-disabled="true"],
.tool .dropzone[aria-disabled="true"]:hover,
.tool .dropzone[aria-disabled="true"]:active{
  cursor:not-allowed;
  border-style:solid;
  border-color:var(--line);
  background:var(--surface2);
}
.tool .dropzone[aria-disabled="true"] .dz-ic,
.tool .dropzone[aria-disabled="true"] > b,
.tool .dropzone[aria-disabled="true"] > p{opacity:.55}
/* the result field is read-only for the duration: no text cursor, no focus ring */
.tool textarea.opt-in[readonly]{cursor:default}
.tool textarea.opt-in[readonly]:focus{border-color:var(--line)}

/* -----------------------------------------------------------
   WORKSPACE CONTROLS — integrated fields
   The same field as the PDF tools: the label sits inside the box, over the
   value, and the whole 58px rectangle is the control. Student rows mix
   fields with buttons and a range, so each label + control pair is grouped
   into an .opt-field (by the page, as the production adapter would) and the
   row is a wrapping flex line of fields and buttons on one baseline.
   ----------------------------------------------------------- */
/* margin-bottom:0 — production (723caa5) gives .opt-row 14px below; the family
   spacing above sets every gap itself, so that margin is not inherited */
#toolBody .opt-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-top:16px;margin-bottom:0}
/* a card that opens with a controls row starts at the card padding, like one
   that opens with a text field: 22px above and below, not 38 above */
#toolBody > .opt-row:first-child,
#toolBody > :first-child > .opt-row:first-child{margin-top:0}
/* a button that follows a list (Copy all under the bibliography, + Add course
   under the GPA rows) keeps the workspace block spacing instead of touching
   the list's last line */
#toolBody :is(#bibList, #gpaRows) + .qa-btn{margin-top:14px}
/* and ends at the card padding: an empty note line (Readability tip, Weighted
   grade note) takes no room until it has text, and the last platform bar of
   the Social Media Counter does not push its spacing below the card content */
#toolBody > :is(#rdTip, #wgNote):empty{display:none}
#smBars > :last-child{margin-bottom:0!important}   /* the engine sets 9px inline */
#toolBody .opt-field{position:relative;flex:1 1 200px;min-width:0}
/* open-ended text reads wider than an enumerated choice (as in the PDF rows) */
#toolBody .opt-field:has(> input[type="text"]){flex:2 1 280px}
#toolBody .opt-field > .opt-l{
  position:absolute;top:0;left:0;right:0;z-index:1;
  margin:0;padding:11px 14px 0;
  line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  pointer-events:none;
}
#toolBody .opt-field > .opt-in{
  display:block;width:100%;max-width:none!important;min-width:0;flex:none;
  box-sizing:border-box;height:58px;margin:0;
  background-color:var(--surface);
  border:1.5px solid var(--line);border-radius:12px;
  font-size:15px;font-weight:600;color:var(--ink);line-height:1.35;
  transition:border-color .15s,background-color .15s,box-shadow .15s;
}
#toolBody .opt-field > input.opt-in{padding:19px 13px 0}
#toolBody .opt-field > .opt-in:hover{border-color:var(--sw-off);background-color:var(--surface2)}
#toolBody .opt-field > .opt-in:active{
  border-color:var(--green);background-color:var(--surface2);
  box-shadow:inset 0 1px 3px rgba(17,34,28,.10);transition:none;
}
#toolBody .opt-field > .opt-in:focus,
#toolBody .opt-field > .opt-in:focus-visible{
  outline:none;border-color:var(--green);background-color:var(--surface);
  box-shadow:0 0 0 3px rgba(14,123,84,.16);
}

/* the select: the native element keeps the value, the trigger is the field */
#toolBody .opt-field > .psel-native{display:none}
#toolBody .opt-field > button.psel-trigger{
  text-align:left;padding:19px 38px 0 13px;
  font-family:var(--font-body);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  cursor:pointer;position:relative;
}
#toolBody .opt-field > button.psel-trigger.is-open{
  border-color:var(--green);box-shadow:0 0 0 3px rgba(14,123,84,.16);
}
#toolBody .opt-field > button.psel-trigger:disabled{cursor:not-allowed}
#toolBody .opt-field > button.psel-trigger > .psel-chev{
  position:absolute;top:50%;right:15px;
  width:11px;height:7px;margin-top:-3.5px;
  pointer-events:none;
  background:var(--muted);
  -webkit-mask:var(--psel-chev) no-repeat center/11px 7px;
  mask:var(--psel-chev) no-repeat center/11px 7px;
  transition:transform .15s ease;
}
#toolBody .opt-field > button.psel-trigger.is-open > .psel-chev{transform:rotate(180deg)}
:root{
  --psel-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.4 5.5 5.7 10 1.4'/%3E%3C/svg%3E");
}

/* a range reads as a field too: same box, the track on the value line */
#toolBody .opt-field.is-range{
  box-sizing:border-box;height:58px;
  background:var(--surface);border:1.5px solid var(--line);border-radius:12px;
  padding:27px 13px 0;
}
#toolBody .opt-field.is-range > input[type="range"]{display:block;width:100%;margin:0;accent-color:var(--green)}

/* number fields: the browser spinner is hidden. A typed value (score,
   weight, word count, prior GPA) is a plain field; a counter (GPA Credits)
   gets the PDF family's stepper (after-family-pdf.css) — two buttons centred
   on the whole 58px field, added by the page (enhanceControls) */
#toolBody .opt-field > input[type="number"].opt-in{
  -moz-appearance:textfield;appearance:textfield;
}
#toolBody .opt-field:has(> .num-step) > input[type="number"].opt-in{padding-right:44px}
#toolBody .opt-field > input[type="number"].opt-in::-webkit-outer-spin-button,
#toolBody .opt-field > input[type="number"].opt-in::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}
#toolBody .opt-field > .num-step{
  position:absolute;right:11px;top:50%;transform:translateY(-50%);z-index:2;
  display:flex;flex-direction:column;gap:2px;
}
#toolBody .opt-field > .num-step .ns-b{
  width:20px;height:15px;padding:0;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line);border-radius:5px;background:var(--surface2);color:var(--muted);
  font:700 9px/1 var(--font-body);cursor:pointer;
  transition:border-color .15s,background-color .15s,color .15s;
}
#toolBody .opt-field > .num-step .ns-b:hover{border-color:var(--green);color:var(--green)}
#toolBody .opt-field > .num-step .ns-b:active{
  background:var(--green-tint);border-color:var(--green);color:var(--green);
  box-shadow:inset 0 1px 2px rgba(14,123,84,.2);transition:none;
}
#toolBody .opt-field > .num-step .ns-b:focus-visible{outline:2.5px solid var(--green);outline-offset:1px}
#toolBody .opt-field > .num-step .ns-b:disabled{opacity:.6;cursor:not-allowed;background:var(--surface2);border-color:var(--line);color:var(--muted);box-shadow:none}

/* a row of exactly three fields and no button (Words to Pages, Final Grade)
   keeps them on one line on tablets instead of sending the third below */
@media (min-width:661px) and (max-width:800px){
  #toolBody .opt-row:has(> .opt-field:nth-child(3)):not(:has(> .opt-field:nth-child(4))):not(:has(> button)) > .opt-field{flex:1 1 0}
}
/* likewise two fields and a single option (Study Timer: Focus, Break, sound) */
@media (min-width:601px) and (max-width:800px){
  #toolBody .opt-row:has(> .opt-checks:not(.is-many)):not(:has(> button)) > .opt-field{flex:1 1 0}
}

/* the narrowest phones: half-width fields (GPA Credits, Weighted "your score
   %") keep their whole caption — slimmer side padding and letter spacing */
@media (max-width:360px){
  #toolBody .opt-field > .opt-l{padding-left:10px;padding-right:8px;letter-spacing:.04em}
  #toolBody .opt-field > input.opt-in{padding-left:10px}
  #toolBody .opt-field > button.psel-trigger{padding-left:10px}
}

/* a calculator result line (GPA: semester + cumulative) wraps when a narrow
   phone cannot hold both, instead of running past the card */
#toolBody .g-out{flex-wrap:wrap;row-gap:6px}

/* calculator result (GPA, Final Grade, Weighted Grade, Words to Pages): the
   result part of the family — a dashed rule and 24px each side, after the
   form. Each number stands over its own caption, so a pair (GPA semester +
   cumulative) never breaks apart; the engine's sentence under the caption
   (#fgNote, #wgLetter, #gpaCr, #wpNote) reads as text, not as a mono label.
   The Study Timer clock is a g-out too, but the first thing in the card. */
#toolBody > .g-out:not(:first-child){
  display:grid;grid-template-rows:auto auto;grid-auto-flow:column;
  justify-content:center;justify-items:center;column-gap:48px;row-gap:8px;
  margin-top:24px;padding-top:24px;border-top:1px dashed var(--line);
  text-align:center;
}
#toolBody > .g-out:not(:first-child) > .score-num{align-self:end}
#toolBody > .g-out:not(:first-child) > .score-cap{align-self:start;max-width:100%}
#toolBody > .g-out:not(:first-child) > .score-cap > br{display:none}
#toolBody > .g-out:not(:first-child) > .score-cap > span{
  display:block;margin-top:6px;
  font:500 14px/1.45 var(--font-body)!important;letter-spacing:normal;text-transform:none;color:var(--ink);
}
#toolBody > .g-out:not(:first-child) > .score-cap > span::first-letter{text-transform:uppercase}
#toolBody > .g-out:not(:first-child) > .score-cap > span:empty{display:none}
/* the Weighted Grade note belongs to the same result */
#toolBody > .g-out:not(:first-child) + #wgNote{max-width:56ch;margin:12px auto 0!important;text-align:center}
#toolBody > .g-out:not(:first-child) + #wgNote:empty{display:none}
@media (max-width:600px){
  #toolBody > .g-out:not(:first-child){column-gap:28px}
}
/* result states the engine marks (Final Grade, Weighted Grade): is-warn —
   the goal is impossible / the weights do not add up to 100%; is-safe — the
   goal is already locked in. The number takes the tone (a safe "0%" is muted,
   never a green answer), the sentence becomes a plaque with the status-line
   icons. Block + absolute icon, so the note's first-letter capital survives. */
#toolBody > .g-out:not(:first-child) > .score-num.is-warn{color:var(--msg-warn-ink)}
#toolBody > .g-out:not(:first-child) > .score-num.is-safe{color:var(--muted)}
#toolBody > .g-out:not(:first-child) > .score-cap > span:is(.is-warn, .is-safe),
#toolBody > .g-out:not(:first-child) + #wgNote.is-warn{
  position:relative;width:fit-content;max-width:100%;box-sizing:border-box;
  padding:10px 14px 10px 39px;border:1px solid;border-radius:12px;
  text-align:left;text-wrap:pretty;font:600 14px/1.45 var(--font-body)!important;
}
#toolBody > .g-out:not(:first-child) > .score-cap > span:is(.is-warn, .is-safe){margin:10px auto 0}
#toolBody > .g-out:not(:first-child) > .score-cap > span.is-warn,
#toolBody > .g-out:not(:first-child) + #wgNote.is-warn{
  background:var(--msg-warn-bg);border-color:var(--msg-warn-line);color:var(--msg-warn-ink)!important;
}
#toolBody > .g-out:not(:first-child) > .score-cap > span.is-safe{
  background:var(--green-tint);border-color:var(--diff-line);color:var(--green-deep);
}
#toolBody > .g-out:not(:first-child) > .score-cap > span:is(.is-warn, .is-safe)::before,
#toolBody > .g-out:not(:first-child) + #wgNote.is-warn::before{
  content:"";position:absolute;left:14px;top:10px;width:16px;height:1.45em;
  background:currentColor;
  -webkit-mask:var(--msg-i-warn) center / 16px 16px no-repeat;mask:var(--msg-i-warn) center / 16px 16px no-repeat;
}
#toolBody > .g-out:not(:first-child) > .score-cap > span.is-safe::before{
  -webkit-mask-image:var(--msg-i-ok);mask-image:var(--msg-i-ok);
}

/* -----------------------------------------------------------
   CALCULATOR ITEM ROWS — GPA courses (.g-row) and Weighted Grade categories
   (#wgRows > .opt-row) are one layout: a text field, two value fields and a
   remove button, in that order. From tablet up an item is one line — the
   name takes the room, the two short values (1–3 characters, short
   captions) are compact — a fifth of the row, 128–160px, so on small
   tablets they give way before the name does — remove a 58px square. On phones an item lies
   on its own light panel: name and remove on the first line, the two values
   halves below (a line each on phones up to 420px, where a half is too
   tight for "your score %" and the "not graded" hint).
   ----------------------------------------------------------- */
#toolBody .g-rows{gap:12px}
#toolBody #wgRows > .opt-row{margin:0 0 12px!important}   /* the engine sets 6px inline */
#toolBody :is(.g-row, #wgRows > .opt-row){
  display:grid;grid-template-columns:minmax(0,1fr) repeat(2,clamp(128px,20%,160px)) 58px;gap:12px;align-items:end;
}
#toolBody :is(.g-row, #wgRows > .opt-row) > *{min-width:0}
/* small tablets: slimmer gaps keep "your score %" whole beside the stepper */
@media (min-width:601px) and (max-width:720px){
  #toolBody :is(.g-row, #wgRows > .opt-row){gap:8px}
}
/* remove: the secondary-button box at field height, with the red hover and
   press of a delete action */
#toolBody :is(.g-row > .g-rm, #wgRows > .opt-row > .wg-x){
  display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;width:58px;height:58px;padding:0;border-radius:12px;
  border:1.5px dashed var(--line);background:var(--surface2);
  font:400 18px/1 var(--font-body);color:var(--muted);
  transition:border-color .15s,color .15s,background-color .15s;
}
/* the engines type different glyphs (GPA "×", Weighted "✕"); both are
   hidden and one drawn cross takes their place, the same in both tools */
#toolBody :is(.g-row > .g-rm, #wgRows > .opt-row > .wg-x){font-size:0!important;gap:0}   /* .qa-btn sets a 7px gap to the hidden text */
#toolBody :is(.g-row > .g-rm, #wgRows > .opt-row > .wg-x)::before{
  content:"";width:16px;height:16px;background:currentColor;
  -webkit-mask:var(--rm-icon) no-repeat center/16px 16px;mask:var(--rm-icon) no-repeat center/16px 16px;
}
:root{--rm-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9'/%3E%3C/svg%3E")}
#toolBody :is(.g-row > .g-rm, #wgRows > .opt-row > .wg-x):hover{border-style:solid;border-color:#C0453F;color:#C0453F;background:var(--surface2)}
#toolBody :is(.g-row > .g-rm, #wgRows > .opt-row > .wg-x):active{
  border-style:solid;border-color:#C0453F;color:#C0453F;
  background:rgba(192,69,63,.08);box-shadow:inset 0 1px 3px rgba(192,69,63,.18);transition:none;
}
@media (max-width:600px){
  #toolBody :is(.g-row, #wgRows > .opt-row){
    display:flex;flex-wrap:wrap;gap:8px;
    box-sizing:border-box;padding:12px;
    background:var(--bg);border:1px solid var(--line);border-radius:14px;
  }
  #toolBody :is(.g-row, #wgRows > .opt-row) > .opt-field:first-child{flex:1 1 calc(100% - 66px);order:0}
  #toolBody :is(.g-row, #wgRows > .opt-row) > :is(.g-rm, .wg-x){flex:none;order:1}
  #toolBody :is(.g-row, #wgRows > .opt-row) > .opt-field:not(:first-child){flex:1 1 calc(50% - 4px);order:2}
}
@media (max-width:420px){
  #toolBody :is(.g-row, #wgRows > .opt-row) > .opt-field:not(:first-child){flex:1 1 100%}
}

/* a number field's caption stops before the stepper (centred on the whole
   field), so the arrows never cover it; where a caption would not fit, the
   tool's layout gives the field more width instead */
#toolBody .opt-field:has(> .num-step) > .opt-l{padding-right:36px}

/* buttons that share a row with fields take the field height */
#toolBody .opt-row:has(.opt-field) > .qa-btn{height:58px}

/* tablet: fields share the first line, the buttons move down together
   (never one orphan button on a line of its own) */
@media (max-width:800px){
  #toolBody .opt-row:has(.opt-field ~ .opt-field) > .opt-field{flex:1 1 calc(50% - 6px)}
}
/* phone: fields take the full width, buttons wrap below */
@media (max-width:600px){
  #toolBody .opt-field,
  #toolBody .opt-row:has(.opt-field ~ .opt-field) > .opt-field{flex:1 1 100%}
  #toolBody .opt-row:has(.opt-field) > .btn-primary{flex:1 1 auto}
}

/* -----------------------------------------------------------
   CHECKBOX OPTIONS
   Before sets an option in the field-caption style (10.5px mono caps) beside
   a browser-blue box with an 18px hit area, and the action button falls
   wherever the row wraps. The page groups a row's consecutive option labels
   into one .opt-checks (as it groups fields into .opt-field): the option reads
   as a sentence beside a brand checkbox, the whole 40px line is the target,
   and a group of several options takes its own line, so the action button
   always follows it. A lone option beside fields sits on the fields' line.
   ----------------------------------------------------------- */
#toolBody .opt-row > .opt-checks{display:flex;flex-wrap:wrap;gap:2px 26px;margin:0;padding:0;min-width:0}
#toolBody .opt-row > .opt-checks.is-many{flex:1 1 100%}
#toolBody .opt-row:has(.opt-field) > .opt-checks:not(.is-many){height:58px;align-items:center}
#toolBody .opt-checks > label.opt-l{
  display:inline-flex;align-items:center;gap:10px;min-height:40px;margin:0;
  font-family:var(--font-body);font-size:14.5px;font-weight:600;letter-spacing:0;text-transform:none;
  color:var(--ink);white-space:nowrap;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
#toolBody .opt-checks .opt-t{display:inline-block}
#toolBody .opt-checks .opt-t::first-letter{text-transform:uppercase}
#toolBody .opt-checks input[type="checkbox"]{
  -webkit-appearance:none;appearance:none;flex:none;margin:0;
  width:20px;height:20px;border-radius:6px;
  border:1.5px solid var(--sw-off);background:var(--surface);
  display:inline-grid;place-content:center;cursor:pointer;
  transition:background-color .15s,border-color .15s,transform .1s;
}
#toolBody .opt-checks input[type="checkbox"]::before{
  content:"";width:11px;height:8px;opacity:0;background:#fff;
  -webkit-mask:var(--cbx-tick) no-repeat center/11px 8px;
  mask:var(--cbx-tick) no-repeat center/11px 8px;
}
#toolBody .opt-checks input[type="checkbox"]:checked{background:var(--green);border-color:var(--green)}
#toolBody .opt-checks input[type="checkbox"]:checked::before{opacity:1}
#toolBody .opt-checks > label.opt-l:hover input[type="checkbox"]:not(:checked){border-color:var(--green)}
#toolBody .opt-checks > label.opt-l:active input[type="checkbox"]{transform:scale(.92);transition:none}
#toolBody .opt-checks input[type="checkbox"]:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(14,123,84,.22)}
#toolBody .opt-checks input[type="checkbox"]:disabled,
#toolBody .opt-checks > label.opt-l:has(input:disabled){cursor:not-allowed;opacity:.55}
:root{
  --cbx-tick:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 8' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 4.2 4 7 10 1'/%3E%3C/svg%3E");
}
/* an option that shares the line with a field (Study Timer's sound beside
   Break) keeps clear of the field's edge: 24px, not the row's 12 */
#toolBody .opt-row > .opt-field + .opt-checks:not(.is-many){margin-left:12px}
@media (max-width:600px){#toolBody .opt-row > .opt-field + .opt-checks:not(.is-many){margin-left:0}}

/* phone: several options read as a column */
@media (max-width:600px){
  #toolBody .opt-row > .opt-checks.is-many{flex-direction:column;gap:0}
}

/* -----------------------------------------------------------
   STAT CARDS
   Before intends two columns below 720px, but the tools that set their
   own column count inline (4, or 3 for Readability) keep it on phones, so
   the last cards are cut off. Below 720px every counter grid is two
   columns; an odd last card takes the full line.
   ----------------------------------------------------------- */
@media (max-width:720px){
  #toolBody .wc-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #toolBody .wc-grid > .stat:last-child:nth-child(odd){grid-column:1 / -1}
}

/* -----------------------------------------------------------
   CITATION TOOLS
   The five citation pages share one interface (Citation, APA, MLA, Harvard,
   Bibliography); matched by the bibliography list, so no other tool is.
   ----------------------------------------------------------- */
/* the status line sits right under the action row, above the citation and
   the bibliography it talks about ("Added to your bibliography below.").
   Before puts it last, under the list. The markup stays as the engine owns
   it: the tool body is laid out as contents of one column and ordered. */
.tool > div:has(#bibList){display:flex;flex-direction:column}
.tool > div:has(#bibList) > div:has(> #toolBody),
.tool > div:has(#bibList) #toolBody{display:contents}
.tool > div:has(#bibList) #toolBody > .opt-row{order:1}
.tool > div:has(#bibList) > #prog{order:2}
.tool > div:has(#bibList) > #toolMsg{order:3}
.tool > div:has(#bibList) #toolBody > .out-wrap{order:4}

/* the style list holds four short names (APA 7, MLA 9, Chicago, Harvard):
   a compact field, the source takes the rest — so on tablets the action
   stays on the line instead of dropping below. Phones keep the stacked row. */
#toolBody .opt-row > .opt-field:has(> #optStyle),
#toolBody .opt-row > .opt-field:has(#optStyle){flex:0 0 170px}
@media (max-width:800px){
  #toolBody .opt-row:has(#optStyle) > .opt-field:has(#citQ){flex:1 1 180px}
  #toolBody .opt-row:has(#optStyle) > .opt-field:has(#optStyle){flex:0 0 150px}
}
/* where the three no longer fit one line, the action takes the whole second
   line (as on phones) rather than sitting there alone at its own width */
@media (min-width:601px) and (max-width:660px){
  #toolBody .opt-row:has(#optStyle) > .btn-primary{flex:1 1 100%}
}
@media (max-width:600px){
  #toolBody .opt-row:has(#optStyle) > .opt-field:is(:has(#citQ), :has(#optStyle)){flex:1 1 100%}
}

/* the result block is named (the page adds the heading), in the same weight
   as the "My bibliography" title below it */
/* both titled blocks start 24px below whatever precedes them (the status
   line above Latest citation, the citation above My bibliography) */
.tool > div:has(#bibList) #outWrap{margin-top:24px}
.tool > div:has(#bibList) #outWrap > .cit-head{
  margin:0 0 8px;font-family:var(--font-body);font-size:14px;font-weight:700;color:var(--ink);
}
/* the bibliography opens like the result block above it: the title 8px above
   a line — the first entry gets the dashed rule its siblings have between
   them, so the eye measures title → line in both blocks, not title → text */
#bibWrap > b{display:block;margin:0 0 8px}
#bibList{margin-top:0!important}   /* the engine sets 8px inline */
#bibList > .bib-row:first-child{border-top:1px dashed var(--line)}
/* an empty bibliography is not shown at all — no title, no empty note, no
   Copy all with nothing to copy; it appears with the first citation */
#bibWrap:not(:has(.bib-row)){display:none!important}

/* remove from the bibliography: a 40px square target with the delete
   action's red hover (as in the calculators), not a 26px dot */
#bibList .bib-row{align-items:center;gap:12px}
/* a long DOI or URL breaks inside the column instead of pushing remove off
   the card on narrow phones */
#bibList .bib-row > span,
.tool > div:has(#bibList) #citOut{min-width:0;overflow-wrap:anywhere}
#bibList .bib-row > .fc-x{
  flex:none;width:40px;height:40px;border-radius:10px;
  border:1.5px dashed var(--line);background:var(--surface2);
  font-size:17px;line-height:1;color:var(--muted);
  transition:border-color .15s,color .15s,background-color .15s;
}
#bibList .bib-row > .fc-x:hover{border-style:solid;border-color:#C0453F;color:#C0453F}
#bibList .bib-row > .fc-x:active{
  border-style:solid;border-color:#C0453F;color:#C0453F;
  background:rgba(192,69,63,.08);box-shadow:inset 0 1px 3px rgba(192,69,63,.18);transition:none;
}
#bibList .bib-row > .fc-x:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(14,123,84,.22)}

/* -----------------------------------------------------------
   BATCH B POLISH
   ----------------------------------------------------------- */
/* a row without fields (buttons with a counter caption: Case Converter,
   Remove Line Breaks, Text Compare, Em Dash, Invisible Character) is
   centred on one line — the caption no longer sits at the buttons' foot */
#toolBody .opt-row:not(:has(.opt-field)){align-items:center}

/* Import: the site's document icon instead of the emoji (Word Counter, Text
   to Speech, AI Summarizer, Flashcards, Cover Letter) */
#toolBody .qa-btn.has-doc-icon{display:inline-flex;align-items:center;gap:8px}
#toolBody .qa-btn.has-doc-icon::before{
  content:"";flex:none;width:14px;height:16px;background:currentColor;
  -webkit-mask:var(--doc-icon) no-repeat center/14px 16px;mask:var(--doc-icon) no-repeat center/14px 16px;
}
:root{
  --doc-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M8.5 1H3a1.5 1.5 0 0 0-1.5 1.5v11A1.5 1.5 0 0 0 3 15h8a1.5 1.5 0 0 0 1.5-1.5V5L8.5 1Z'/%3E%3Cpath d='M8.5 1v4h4M4.5 8.5h5M4.5 11.5h5'/%3E%3C/svg%3E");
}

/* Text Compare: paste both versions first, then choose how to compare and
   press Compare — the fields lead, the settings follow them; each field is
   named (Original / Changed) */
/* a text field that follows a row of buttons (Case Converter: the format
   buttons, then the result) keeps the block spacing instead of touching it */
#toolBody > .opt-row + textarea.opt-in{margin-top:14px}

#toolBody:has(> .tc-grid){display:flex;flex-direction:column}
#toolBody:has(> .tc-grid) > .tc-grid{order:1;margin-top:0}
#toolBody:has(> .tc-grid) > .tc-grid + .opt-row{order:2;margin-top:16px}   /* the page moves the row after the texts (Tab order) */
#toolBody:has(> .tc-grid) > .opt-row:has(#runBtn){order:3}
#toolBody:has(> .tc-grid) > .out-wrap{order:4}
#toolBody .tc-col{display:flex;flex-direction:column;min-width:0}
#toolBody .tc-col > textarea{flex:1;width:100%}
#toolBody .tc-cap,
#toolBody #kdList:has(.cf-chip)::before{
  display:block;margin:0 0 6px;
  font-family:var(--font-mono);font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);   /* captions 11.5 — see after-global */
}

/* Word Counter: the keyword line is named */
/* the caption is the list's own first line, shown only once there are words
   (the empty hint "Keyword density appears here…" needs none) */
#toolBody #kdList:has(.cf-chip)::before{content:"Top words";flex:1 1 100%;margin:0}

/* stat cards: a caption that wraps (avg words/sentence, reading time on
   phones) keeps tight lines instead of the paragraph line height */
#toolBody .wc-grid .stat > span:not(.big){display:block;line-height:1.3}

/* Readability: the reading level reads at the size of the two scores, and
   the advice is a visible note, not a grey footnote */
#toolBody .wc-grid .big#rdVerdict{font-size:24px!important;line-height:1.1}
#toolBody #rdTip:not(:empty){
  margin-top:12px!important;padding:11px 14px;border-radius:12px;
  background:var(--surface2);border:1px solid var(--line);
  font-size:14.5px!important;color:var(--ink)!important;line-height:1.5;
}

/* Words to Pages: the answer is the headline, and the reverse estimate sits
   on the same centre line under it */
#toolBody #wpOut{font-size:52px}
#toolBody > p:has(#wpRev){text-align:center}

/* -----------------------------------------------------------
   RESULT PART
   The tool and its result are two parts: once a result is shown, a dashed
   rule (the list rule) and 24px on each side set it apart from the controls.
   The first result block only — the citation pages' bibliography under the
   latest citation stays in the same part (it takes the rule itself when there
   is no latest citation). Flashcards' result is its card grid.
   ----------------------------------------------------------- */
#toolBody > #outWrap.show,
#toolBody > #outWrap:not(.show) + #bibWrap:has(.bib-row),
#toolBody > .cards-part:has(> #cardsWrap:not(:empty)){
  margin-top:24px!important;padding-top:24px;border-top:1px dashed var(--line);
}

/* -----------------------------------------------------------
   TRANSFORM TOOLS (Remove Line Breaks, Case Converter, Em Dash Remover,
   Invisible Character Remover): input → settings and action → result.
   ----------------------------------------------------------- */
/* settings: a field with long choices (Mode, Replace with) keeps its own full
   line first; the options and the action share the next line, the action at
   the right — the options wrap inside their group rather than dropping the
   action onto a line of its own */
#toolBody > .opt-row:has(> .opt-checks.is-many):has(> #runBtn) > .opt-field{flex:1 1 100%;order:-1}
#toolBody > .opt-row:has(> .opt-checks.is-many):has(> #runBtn) > .opt-checks.is-many{flex:1 1 0;min-width:0;align-self:center}
#toolBody > .opt-row:has(> .opt-checks.is-many):has(> #runBtn) > #runBtn{margin-left:auto;flex:none;align-self:center}
@media (max-width:600px){
  #toolBody > .opt-row:has(> .opt-checks.is-many):has(> #runBtn) > .opt-checks.is-many{flex:1 1 100%}
  #toolBody > .opt-row:has(> .opt-checks.is-many):has(> #runBtn) > #runBtn{margin-left:0;flex:1 1 100%}
}

/* result: its own part — the dashed rule and 24px each side (as for the
   result blocks above), shown only once the result field has text */
#toolBody > .res-part{margin-top:24px;padding-top:24px;border-top:1px dashed var(--line)}
/* live counters (Word Counter, Readability Checker, Social Media Counter):
   their statistics are the result, as a calculator's number is — the same
   dashed rule and 24px each side, before the first result block (Word
   Counter's Top words line, the others' stat cards) */
#toolBody > #kdList,
#toolBody > :is(#rdIn, #smIn) + .wc-grid{margin-top:24px!important;padding-top:24px;border-top:1px dashed var(--line)}
#toolBody > :is(#rdIn, #smIn){display:block}   /* an inline-block field added a line gap under it */
#toolBody > .res-part:has(> textarea.opt-in:placeholder-shown){display:none}
#toolBody > .res-part > :first-child{margin-top:0!important}
#toolBody > .res-part > textarea.opt-in{margin-top:12px!important}
#toolBody > .res-part > .res-head + textarea.opt-in{margin-top:0!important}
#toolBody > .res-part > .opt-row{margin-top:12px}
/* the result field is read-only, so it reads as a result, not an input: the
   result-block surface of the citation pages (surface2, 12px, 14/16 padding,
   15px text), no hover or focus ring that invites typing; the corner still
   resizes it, vertically, so it cannot outgrow the card */
#toolBody > .res-part > textarea.opt-in[readonly]{
  background:var(--surface2);border:1.5px solid var(--line);border-radius:12px;
  padding:14px 16px;font-size:15px;line-height:1.75;color:var(--ink);
  resize:vertical;box-shadow:none;
}
#toolBody > .res-part > textarea.opt-in[readonly]:hover,
#toolBody > .res-part > textarea.opt-in[readonly]:focus{border-color:var(--line);background:var(--surface2);box-shadow:none;outline:none}
#toolBody > .res-part > textarea.opt-in[readonly]:focus-visible{border-color:var(--sw-off)}

/* Case Converter: the live count describes the input, so it sits under the
   input field (hidden while the field is empty) */
#toolBody > #ccStat.in-stat{display:block;margin:8px 0 0}
#toolBody > #ccIn:placeholder-shown + #ccStat.in-stat{display:none}

#toolBody > .res-part > .res-head{
  display:block;margin:0 0 8px;
  font-family:var(--font-body);font-size:14px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink);
}
#toolBody > .res-part > .res-head::first-letter{text-transform:uppercase}
#toolBody > .res-part > .res-head:empty{display:none}

/* -----------------------------------------------------------
   BATCH C POLISH (AI helpers)
   ----------------------------------------------------------- */
/* result buttons (Copy, Download .txt) are a row under the result with the
   workspace spacing, not glued to the result and to each other */
#toolBody > #outWrap.show:has(> .qa-btn){display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#toolBody > #outWrap.show:has(> .qa-btn) > :not(.qa-btn){flex:1 1 100%}
#toolBody > #outWrap.show:has(> .qa-btn) > .ai-out + .qa-btn{margin-top:0}

/* the other emoji icons, drawn in the Import icon's manner */
#toolBody .qa-btn:is(.has-dl-icon, .has-shuffle-icon, .has-plus-icon){display:inline-flex;align-items:center;justify-content:center;gap:8px}
#toolBody .qa-btn:is(.has-dl-icon, .has-shuffle-icon, .has-plus-icon)::before{
  content:"";flex:none;width:14px;height:14px;background:currentColor;
  -webkit-mask:var(--btn-icon) no-repeat center/14px 14px;mask:var(--btn-icon) no-repeat center/14px 14px;
}
#toolBody .qa-btn.has-dl-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 1.5v7.5M3.8 6 7 9.2 10.2 6M2 12.5h10'/%3E%3C/svg%3E")}
#toolBody .qa-btn.has-shuffle-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 3.5h2.2c1 0 1.9.5 2.4 1.3l1.8 2.9c.5.8 1.4 1.3 2.4 1.3H12.5M1.5 10.5h2.2c1 0 1.9-.5 2.4-1.3M8.4 4.8c.5-.8 1.4-1.3 2.4-1.3h1.7M11 2l1.5 1.5L11 5M11 9l1.5 1.5L11 12'/%3E%3C/svg%3E")}
/* media buttons (Study Timer Start / Pause / Reset, Text to Speech Play /
   Pause / Stop, Speech to Text Stop): the typed glyphs become site icons, on
   the primary button as on the secondary ones */
#toolBody :is(.qa-btn, .btn):is(.has-play-icon, .has-pause-icon, .has-stop-icon, .has-reset-icon){display:inline-flex;align-items:center;justify-content:center;gap:8px}
#toolBody :is(.qa-btn, .btn):is(.has-play-icon, .has-pause-icon, .has-stop-icon, .has-reset-icon)::before{
  content:"";flex:none;width:14px;height:14px;background:currentColor;
  -webkit-mask:var(--btn-icon) no-repeat center/14px 14px;mask:var(--btn-icon) no-repeat center/14px 14px;
}
#toolBody .has-play-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 2.3v9.4c0 .5.5.8.9.5l7.2-4.7c.4-.3.4-.8 0-1L4.9 1.8c-.4-.3-.9 0-.9.5z'/%3E%3C/svg%3E")}
#toolBody .has-pause-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='3' y='2' width='2.8' height='10' rx='.9'/%3E%3Crect x='8.2' y='2' width='2.8' height='10' rx='.9'/%3E%3C/svg%3E")}
#toolBody .has-stop-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='2.5' y='2.5' width='9' height='9' rx='1.6'/%3E%3C/svg%3E")}
#toolBody .has-reset-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E")}
/* + Add course / + Add category: the typed "+" was a small text glyph set
   close to the label; a drawn plus at icon size, with the icon gap */
#toolBody .qa-btn.has-plus-icon{--btn-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M7 2v10M2 7h10'/%3E%3C/svg%3E")}

/* short choices (Length, Cards, Stance, Tone, Register) take a compact field;
   the topic or word beside them takes the rest */
#toolBody .opt-row > .opt-field:has(> :is(#optLen, #optCount, #optStance, #optTtone, #optReg)){flex:0 0 170px}
@media (max-width:800px){
  #toolBody .opt-row > .opt-field:has(> :is(#optLen, #optCount, #optStance, #optTtone, #optReg)){flex:0 0 150px}
}
@media (max-width:600px){
  #toolBody .opt-row > .opt-field:has(> :is(#optLen, #optCount, #optStance, #optTtone, #optReg)){flex:1 1 100%}
}

/* Summarizer Length's longest choice ("Detailed + key points") needs more
   than the compact width: the field is as wide as its longest item, so no
   menu item wraps to a second line (phones: full width, as all fields) */
@media (min-width:601px){
  #toolBody .opt-row > .opt-field:has(> #optLen){flex:0 0 240px}
}
/* Summarizer and Flashcards share one layout (text, Import, a list, the
   action), so they share its sizes: the same 180px text field and the same
   240px list (Cards as wide as Length) */
@media (min-width:601px){
  #toolBody .opt-row > .opt-field:has(> #optCount){flex:0 0 240px}
}
#toolBody:has(#optCount) #aiIn{min-height:180px!important}

/* a caption over a text field (Cover Letter, Personal Statement, Synonym /
   Antonym) — the Text Compare caption, with the field's usual spacing above */
#toolBody > .field-cap{margin-top:16px}
#toolBody > .field-cap:first-child{margin-top:0}
#toolBody > .field-cap + textarea.opt-in{margin-top:0!important}

/* Flashcards: Export and Shuffle head the finished cards, at the right; the
   card grid keeps its spacing below them. The part takes the result rule. */
#toolBody > .cards-part > .cards-actions{justify-content:flex-end;margin:0 0 14px}
#toolBody > .cards-part > .cards-actions:not(:has(> .qa-btn:not([hidden]))){display:none}
#toolBody > .cards-part > #cardsWrap{margin-top:0}

/* phone: an action alone on its row (Synonym, Antonym, Personal Statement)
   takes the full width, like every other action on phones — not left at its
   own width */
@media (max-width:600px){
  #toolBody > .opt-row:has(> .btn-primary):not(:has(> .opt-field, > .opt-checks, > .qa-btn, > .opt-l)) > .btn-primary{flex:1 1 100%}
}

/* a field with Import: one frame holding the text area and, at its foot, a
   bar with Import (Word Counter, Summarizer, Flashcards, Cover Letter, Text to
   Speech). The frame carries the field's border, focus ring and the resize
   corner; the text area inside is bare. The caption stays above the frame. */
#toolBody > .ta-box{
  display:flex;flex-direction:column;overflow:hidden;resize:vertical;
  border:1.5px solid var(--line);border-radius:10px;background:var(--surface);
  transition:border-color .15s,box-shadow .15s;
}
#toolBody > .ta-box:hover{border-color:var(--sw-off)}
#toolBody > .ta-box:focus-within{border-color:var(--green);box-shadow:0 0 0 3px rgba(14,123,84,.16)}
#toolBody > .ta-box > textarea.opt-in{
  flex:1 1 auto;width:100%;margin:0!important;
  border:0!important;border-radius:0;background:transparent;box-shadow:none!important;outline:none;resize:none;
}
#toolBody > .ta-box > .ta-bar{
  flex:none;display:flex;align-items:center;gap:8px;
  padding:8px 10px;background:var(--surface2);border-top:1px solid var(--line);
}
#toolBody > .field-cap + .ta-box{margin-top:0}
#toolBody > .ta-box > .ta-bar > .qa-btn{white-space:nowrap}
#toolBody > .ta-box > .ta-bar .imp-more{margin-left:-4px}   /* the icon gap is 8px; a word space is ~4 */
@media (max-width:360px){
  #toolBody > .ta-box > .ta-bar .imp-more{display:none}
}

/* the result heading counted from the result ("10 cards", "Summary · 84
   words"); in Flashcards it opens the Export / Shuffle bar at the left */
#toolBody .res-count{
  display:block;margin:0 0 8px;
  font-family:var(--font-body);font-size:14px;font-weight:700;color:var(--ink);
}
#toolBody .res-count:empty{display:none}
#toolBody > #outWrap.show > .res-count{flex:1 1 100%}
#toolBody > .cards-part > .cards-actions{justify-content:flex-end}
#toolBody > .cards-part > .cards-actions > .res-count{margin:0 auto 0 0}

/* Personal Statement: the questions the generator asks when facts run short
   are a panel of their own under the draft's actions (the engine sets inline
   margins and list padding, hence !important) */
#toolBody > #personalQuestions{margin:20px 0 0!important;padding:16px 18px 18px;border:1px solid var(--line);border-radius:14px;background:var(--surface2)}
#toolBody > #personalQuestions[hidden]{display:none}
#toolBody > #personalQuestions > strong{display:block;font-family:var(--font-body);font-size:14px;font-weight:700;color:var(--ink)}
#toolBody > #personalQuestions > ul{display:grid;gap:6px;margin:10px 0 0!important;padding-inline-start:1.2em!important;font-size:14.5px;line-height:1.5;color:var(--ink)}
#toolBody > #personalQuestions li::marker{color:var(--green)}
/* the next step closes the panel: what to do with the answers + a button to the story field */
#toolBody > #personalQuestions > .pq-next{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
#toolBody > #personalQuestions > .pq-next > p{margin:0;flex:1 1 220px;font-size:13.5px;line-height:1.5;color:var(--muted)}
#toolBody > #personalQuestions > .pq-next > .qa-btn{margin:0 0 0 auto}
@media (max-width:600px){#toolBody > #personalQuestions > .pq-next > .qa-btn{flex:1 1 100%;margin:0}}
/* the copy kept under «Your story» while the answers are typed: the same panel, compact */
#toolBody > .pq-pinned{margin:10px 0 0;padding:12px 16px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface2)}
#toolBody > .pq-pinned[hidden]{display:none}
#toolBody > .pq-pinned > strong{display:block;font-family:var(--font-body);font-size:13.5px;font-weight:700;color:var(--ink)}
#toolBody > .pq-pinned > ul{display:grid;gap:4px;margin:8px 0 0;padding-inline-start:1.2em;font-size:14px;line-height:1.5;color:var(--ink)}
#toolBody > .pq-pinned li::marker{color:var(--green)}

/* Invisible Character Remover: the options grid (3 columns, production) keeps
   labels on one line, so «remove ZWJ/ZWNJ (may change emoji and scripts)» ran
   into the next column; labels wrap, the box stays on the first line */
body[data-tool="invisible-character-remover"] #toolBody .invisible-options label{white-space:normal;align-items:flex-start}
body[data-tool="invisible-character-remover"] #toolBody .invisible-options .opt-t{white-space:normal;min-width:0}
body[data-tool="invisible-character-remover"] #toolBody .invisible-options input{margin-top:2px}

/* Word Counter: production put Clear next to Import in the field's bottom bar;
   Clear ends the bar at the right and drops to its own line on narrow phones
   instead of running past the field */
#toolBody .ta-bar{flex-wrap:wrap}
#toolBody .ta-bar > #wcClear{margin-left:auto}

/* an action alone on its row sits at the right, where the action ends every
   other settings row (phones: full width, above) */
@media (min-width:601px){
  #toolBody > .opt-row:has(> .btn-primary):not(:has(> .opt-field, > .opt-checks, > .qa-btn, > .opt-l)){justify-content:flex-end}
  /* likewise beside a compact field (Summarizer Length, Flashcards Cards) */
  #toolBody > .opt-row:has(> .opt-field):not(:has(> .qa-btn)) > .btn-primary{margin-left:auto}
}

/* -----------------------------------------------------------
   NUMERIC CHOICES (Flashcards Cards)
   A caption (as Notes) over square choice buttons at field height: the
   secondary-button squares, the chosen one filled like the Translation pair
   pills. The engine's select stays the value, hidden with its field.
   ----------------------------------------------------------- */
#toolBody .opt-row > .opt-field.has-choice{display:none!important}
#toolBody .opt-row > .choice-field{display:flex;flex-direction:column;gap:8px;flex:0 0 auto;min-width:0}
#toolBody .choice-field > .choice-cap{margin:0}
#toolBody .choice-seg{display:flex;gap:8px}
#toolBody .choice-seg > .choice-b{
  width:58px;height:58px;padding:0;flex:none;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:12px;font-family:var(--font-body);font-size:20px;font-weight:600;
}
#toolBody .choice-seg > .choice-b.is-on,
#toolBody .choice-seg > .choice-b.is-on:hover{
  background:var(--panel-dark);border:1.5px solid var(--panel-dark);color:#F4F3EC;
}
#toolBody .choice-seg > .choice-b.is-on:active{box-shadow:inset 0 2px 4px rgba(0,0,0,.28)}
:root[data-theme="dark"] #toolBody .choice-seg > .choice-b.is-on,
:root[data-theme="dark"] #toolBody .choice-seg > .choice-b.is-on:hover{background:var(--green);border-color:var(--green);color:#0D1F17}
#toolBody .choice-seg > .choice-b:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(14,123,84,.22)}
/* phone: a choice group takes the line, its squares share it evenly */
@media (max-width:600px){
  #toolBody .opt-row > .choice-field{flex:1 1 100%;margin-left:0!important}
  #toolBody .choice-seg > .choice-b{flex:1 1 0;width:auto}
}

/* a button the engine hides must disappear: the baseline's display:flex on
   .qa-btn / .btn outranks the [hidden] attribute, so Speech to Text showed Stop
   while idle and Start while listening. Now they toggle as the engine intends.
   !important: hidden must beat every later display rule (the media-icon rule
   is #toolBody-scoped and outranked this). */
.tool .qa-btn[hidden],
.tool .btn[hidden]{display:none!important}

/* ---------- First screen on phones (SEO + GEO checklist, F2) ----------
   On a 375×667 phone the action button of these tools ended 3–16px below the
   first screen. Their first text field starts 20px lower instead (it still
   resizes from the corner): Remove Line Breaks and Invisible Characters
   150 → 130, Summarizer and Flashcards 180 → 160 (they keep one size, see
   above). The engine sets these heights inline, hence !important. */
@media (max-width:600px){
  #toolBody #lbIn,
  #toolBody #icIn{min-height:130px!important}
  #toolBody:is(:has(#optLen), :has(#optCount)) #aiIn{min-height:160px!important}
}
/* Cover Letter: "About you" 90 → 80px and the job posting 130 → 110px, so
   Generate fits a 1280×720 laptop screen (it ended 7px below); Personal
   Statement shares "About you" and keeps its 100px prompt */
#toolBody #aiMe{min-height:80px!important}
#toolBody:has(#optClLen) #aiJob{min-height:110px!important}
