/* Settings.
   Split from style.css (16 Nov 2026, C2): each page links css/base.css and its own sheets in <head>, in the order
   base, pattern, marketing, auth, make, library, settings, share, workspace; a rule that came later in style.css still
   comes later where both load. Its dark twin is css/settings-dark.css (07_scripts/maintenance/site_dark_css.py).
   An !important left says why, on the line before its rule: what it must win over. */

/* =====================================================================
                            COMMON PAGE STYLES
   ===================================================================== */

/* A phone's one-line note: patterns are made on a computer or a tablet; × closes it (settings.html, 24 Nov 2026, Israa:
   it was a card filling half the first screen). */
.settings-page #main_right div.phone-note:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 6px 8px 14px;
  border: 1px solid var(--ds-line);
  border-radius: 12px;
  background: var(--ds-surface);
  color: var(--ds-text);
}
.settings-page .phone-note svg { flex: none; width: 20px; height: 20px; color: var(--ds-brand); }
.settings-page .phone-note p { flex: 1; margin: 0; font-size: 0.875rem; line-height: 1.25rem; }
.settings-page .phone-note-close {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ds-quiet);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
.settings-page .phone-note-close:hover { background: var(--ds-track); }

/* =======================
   SETTINGS STYLES
   ======================= */

.settings-page #main_right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: auto;
  max-height: none;
}

/* The page itself doesn't scroll on a laptop or a tablet: the sections scroll inside #main_right. On a phone the page
   scrolls, the only scroll there (24 Nov 2026: this was the body's own style in settings.html, at every width). */
@media (min-width: 601px) {
  /* !important: over base.css's body overflow (and more) */
  body.settings-page {
    overflow: hidden !important;
  }
}

.settings-page .settings-layout {
  flex: 1;
  display: flex;
  margin: 1rem 0.5rem 0.5rem 0.5rem;
  gap: 2rem;
  min-height: 0;
  height: calc(100vh - 7rem);
  background-color: var(--bg-light);
}

.settings-page .settings-sidebar {
  min-width: 22.5rem;
  border-right: 0.0625rem solid var(--Gray-Divider);
  padding-right: 1.5rem;
  padding-top: 1%;
}

.settings-page .settings-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.settings-page .settings-sidebar li {
  margin-bottom: 1rem;
}

.settings-page .settings-sidebar a.active,
.settings-page .settings-sidebar a:hover {
  background: var(--bg-light);
  color: var(--Black);
  text-decoration: underline;
  text-decoration-thickness: 0.1875rem;
  text-underline-offset: 0.1875rem;
  text-decoration-color: transparent;
  background-image: linear-gradient(60deg, var(--Pure-Blue), var(--Pure-Blue));
  background-repeat: no-repeat;
  background-size: 100% 0.1875rem;
  background-position: 0 100%;
}

.settings-page .section-header {
  display: inline-block;
  font-size: 2rem;
  font-family: var(--font-family-roboto);
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: 0.5625rem;
  scroll-margin-top: 20px;
  border-bottom: 0.0625rem solid var(--Gray-Divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-page #main_right > div[id$="_section"] {
  scroll-margin-top: 20px;
}

/* An ended trial or subscription (settings-page.js showAccessEnded): the notice at the top, and what waits for a
   subscription greyed out with a line saying so. */
.settings-page #main_right div.access-ended-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 0.0625rem solid #FF2828;
  border-radius: 0.75rem;
  background: #FFF5F5;
}

.settings-page #main_right div.access-ended-notice[hidden] {
  display: none;
}

.settings-page .access-ended-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 20rem;
  font-family: var(--font-family-open-sans);
  font-size: 1rem;
}

.settings-page .access-ended-text strong {
  color: #FF2828;
  font-family: var(--font-family-roboto);
  font-size: 1.25rem;
}

.settings-page .settings-locked {
  opacity: 0.45;
}

.settings-page .locked-note {
  margin: 0 0 0.75rem;
  color: #B42318;
  font-weight: 600;
}

.mobile-section-toggle-icon {
  display: none;
  width: 0.6em;
  height: 0.4em;
  margin-bottom: 1rem;
  background: none;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M5.8 8.3a1 1 0 0 1 1.4 0L10 11.09l2.8-2.8a1 1 0 1 1 1.4 1.42l-3.5 3.5a1 1 0 0 1-1.4 0l-3.5-3.5a1 1 0 0 1 0-1.42z"/></svg>');
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  background-position: center;
}

.settings-page .form_row {
  margin-bottom: 0.9375rem;
}

/* !important: over the inline font-weight a script sets (and more) */
.settings-page .form_row label {
  font-weight: 700 !important;
  font-family: var(--font-family-open-sans) !important;
  font-size: 1rem !important;
  display: inline-block;
  margin-bottom: 0.3125rem;
}

.settings-page .edit_field {
  padding: 0.5625rem 1.375rem;
  border-radius: 1.25rem;
  /* border: 0.0625rem solid var(--Pure-Blue); */
  width: 100%;
  max-width: 42.5rem;
  display: none;
  font-size: 1.125rem;
  font-weight: normal;
  font-family: var(--font-family-open-sans);
}

.settings-page [id$="_display"] {
  font-weight: normal;
  font-size: 1rem;
  font-weight: normal;
  font-family: var(--font-family-open-sans);
}

.settings-page .button_row {
  margin: 0rem;
}

.settings-page .toggle_container {
  margin: 0.625rem 0;
}

.settings-page .toggle_container input[type="radio"] {
  margin-right: 0.3125rem;
  accent-color: var(--Pure-Blue);
  color: var(--Pure-Blue);
}

.settings-page .toggle_container label {
  margin-right: 0.9375rem;
  font-weight: normal;
}

/* !important: over #infoBtn (and more) */
.settings-page .floating-input:focus+label,
.settings-page .floating-input:not(:placeholder-shown)+label,
.settings-page .floating-input:-webkit-autofill+label,
.settings-page .floating-input:focus~label,
.settings-page .floating-input:not(:placeholder-shown)~label {
  color: var(--Pure-Blue) !important;
  font-weight: normal !important;
  font-family: var(--font-family-open-sans) !important;
  font-size: 0.875rem !important;
  background: var(--White);
  padding: 0 0.25rem;
}

/* !important: over .settings-page #cp_sub input */
.settings-page .floating-input-wrapper:focus-within {
  border-color: var(--Pure-Blue) !important;
  background: var(--White);
}

/* !important: over .settings-page .floating-input:focu… */
.settings-page .floating-input-wrapper label {
  color: #bbb !important;
}

.settings-page .modal_content {
  background: var(--White);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 0.625rem;
  max-width: 25rem;
  width: 90vw;
  box-shadow: 0 0.5rem 2rem var(--Box-Shadow);
  text-align: center;
}

.settings-page .modal_buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.settings-page #confirm_delete {
  background: var(--Red);
  color: var(--White);
}

.settings-page #confirm_delete:hover {
  background: var(--Red);
}

.settings-page .helper_text {
  font-size: 0.75rem;
  color: #57606a;
  margin-top: 0.3125rem;
}

.settings-page #cp_sub {
  max-width: 13.75rem;
  margin-left: 0;
}

.settings-page #cp_sub div {
  margin-bottom: 0.625rem;
}

.settings-page #cp_sub input {
  padding: 0.5625rem 1.375rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid var(--Dusty-Gray);
  width: 100%;
  font-size: 0.875rem;
}

.settings-page #Change {
  background: var(--Pure-Blue);
  color: var(--White);
  padding: 0.375rem 1rem;
  border-radius: 0.375rem;
  text-align: center;
  cursor: pointer;
  font-weight: normal;
  font-size: 1rem;
  font-family: var(--font-family-open-sans);
  transition: background-color var(--transition);
}

.settings-page #Change:hover {
  background: var(--Pure-Blue);
}

.settings-page #pp,
.settings-page #logout_everywhere,
.settings-page #change_password {
  color: var(--Pure-Blue);
  cursor: pointer;
  display: inline-block;
  margin-bottom: 0.5rem;
  font-weight: normal;
  font-size: 1rem;
  font-family: var(--font-family-open-sans);
}

.settings-page #pp:hover,
.settings-page #logout_everywhere:hover,
.settings-page #change_password:hover {
  text-decoration: underline;
  color: var(--Pure-Blue);
}

.settings-page #PrivacyPolicy {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--White);
  padding: 1.25rem;
  border-radius: 0.375rem;
  max-width: 37.5rem;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 0.5rem 1.5rem rgba(140, 149, 159, 0.2);
  border: 0.0625rem solid var(--Dusty-Gray);
}

.settings-page p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--Black);
  font-weight: normal;
  font-family: var(--font-family-open-sans);
}

.settings-page #subscription_section,
.settings-page #payment_section {
  margin-bottom: 1.25rem;
}

.settings-page #subscription_section p,
.settings-page #payment_section p {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.line_thickness_control input[type="number"],
.grid_control input[type="number"] {
  margin-left: 0.5rem;
  width: 3.125rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  border: 0.0625rem solid var(--Dusty-Gray);
}

.mobile-trial-banner {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  background: #F7D6D9;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: normal;
  color: #222;
  gap: 6px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.mobile-trial-banner-text {
  white-space: normal;
  word-break: break-word;
  display: block;
  width: 100%;
}

.mobile-trial-banner-btn {
  display: inline-block;
  background: #fff;
  color: #d00;
  border: none;
  border-radius: 1.25rem;
  padding: 0.25em 1.25em;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0.5em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.mobile-trial-banner-btn:hover,
.mobile-trial-banner-btn:focus {
  background: #ffeaea;
  color: #a00;
}

/* =======================
   MEDIA QUERIES
   ======================= */

/* 600px and below: Phones */
/* !important: over the inline color a script sets */
@media (max-width: 600px) {

  .settings-page .btn-primary,
  .settings-page .btn-secondary {
    color: var(--Pure-Blue) !important;
  }

  /* !important: over .settings-page #confirm_delete */
  .settings-page .btn-danger {
    color: var(--Red) !important;
  }

  /* !important: over .settings-page .settings-sidebar a:… (and more) */
  .settings-page .btn-primary:hover,
  .settings-page .btn-secondary:hover,
  .settings-page .btn-danger:hover {
    text-decoration: underline !important;
    background: none !important;
    color: inherit !important;
  }

  .settings-page .settings-layout {
    flex-direction: column;
    gap: 0;
    margin: 1rem 0rem 1rem 0rem;
    /* (One scroll, the page's: as tall as the window, the sections scrolled inside the page that scrolled too, a grey
       bar at the side and the cards' tops under the tabs; 24 Nov 2026.) */
    height: auto;
  }

  .settings-page .settings-sidebar {
    min-width: 100vw;
    width: 100vw;
    border-right: none;
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    gap: 1rem;
    /* (Clear, no line under it: on the page's grey it was a white box round the tabs' track, 24 Nov 2026, Israa.) */
    background: transparent;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }

  .settings-page .settings-sidebar ul {
    flex-direction: row;
    display: flex;
    width: auto;
    padding: 0;
    margin: 0;
  }

  .settings-page .settings-sidebar li {
    margin-bottom: 0;
    display: inline-block;
  }

  .settings-page .settings-sidebar a {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    min-width: 6rem;
    text-align: center;
  }

  /* !important: over .settings-page #confirm_delete */
  .settings-page .settings-sidebar a.active,
  .settings-page .settings-sidebar a:hover {
    background: var(--White) !important;
    color: var(--Black);
    text-decoration: underline;
    text-decoration-thickness: 0.1875rem;
    text-underline-offset: 0.25rem;
    text-decoration-color: var(--Pure-Blue);
  }

  .settings-page #main_right {
    overflow-y: visible;
  }

  /* Room under the last part for the tab bar and Help's button over it (24 Nov 2026: Help's ? sat on the last fields). */
  html:not(.workspace-body) body.settings-page #main_right::after {
    flex-basis: 148px;
  }

  .settings-page #main_right>div {
    /* display: none; */
    margin-bottom: 1.5rem;
  }

  /* The phone's "trial ends in N days" banner is shown by settings-page.js only when a trial is ending soon (forced on
     here, it told every account "ends in 3 days", ended trials and subscribers included; 4 November 2026). Settings
     only: Make a pattern and the Library work on a phone since 13 Nov 2026 and show the site's banner there. */
  /* !important: over the display of a rule loaded later */
  .settings-page .trial-banner {
    display: none !important;
  }

  .mobile-section-toggle-icon {
    display: inline-block;
  }

  .section-content {
    display: none;
  }
}
.body-profiles-list { list-style: none; margin: 8px 0 0; padding: 0; max-width: 40rem; }
.body-profiles-list .body-profile { padding: 6px 0; border-bottom: 1px solid #e6e6e6; font-size: 0.9375rem; line-height: 1.5; }
.body-profiles-list .link-button { margin-left: 0.5rem; min-height: 32px; }

/* --- B: one tab with every action and the menus; the modes and zoom in a dock rising from a status bar --- */
/* Settings › Layout and theme: the four two by two (16 Nov 2026: four offered; three to a row left the fourth alone), in
   one row where the Current design's section is wide enough. */
@media (min-width: 700px) { #layout_theme_section .layout-grid:not(.compact) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* !important: over style-dark's :where(html[data-site-dark]:not(.wo… */
.layout-saved { min-height: 1.2em; color: #1e6b34 !important; }

/* ---- The workspace's recommendations 2, 4, 6, 8, 11 and 12 (13 Nov 2026) ---- */

/* 7. Settings › Preferences in groups, as the workspace's Settings tab: Workspace, Canvas, Measuring, Sizes and
   grading, Keyboard shortcuts, each a card with a small heading (settings.html .pref-group); Layout and theme's groups
   (Design, Look, Workspace layout) the same. */
:is(#preference_section, #layout_theme_section) .pref-group {
  margin: 0 0 14px;
  padding: 14px 18px 16px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fbfbfd;
}
:is(#preference_section, #layout_theme_section) .pref-group-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6b7a;
}
/* (The first setting in a group sits under its heading; the blocks' own top margins were for one long list.) */
/* !important: over h1's !important */
:is(#preference_section, #layout_theme_section) .pref-group > .pref-group-title + * { margin-top: 0 !important; }
:is(#preference_section, #layout_theme_section) .pref-group > * + *:not(.pref-group-title) { margin-top: 14px; }
/* !important: over the New design's .index-hero-content h4 (and more) */
:is(#preference_section, #layout_theme_section) .pref-group h4 { font-size: 1rem !important; margin: 0 0 6px !important; color: #000646 !important; }
:is(#preference_section, #layout_theme_section) .pref-group label > h4 { display: inline; }
/* The keyboard group's own heading says what the list under it did. */
:is(#preference_section, #layout_theme_section) .pref-group--keys .keyboard-shortcuts-section > h4:first-child { display: none; }
/* !important: over .btn-rounded's !important */
#preference_section #savePreferencesBtn { margin-top: 4px !important; }

/* ---- The redesign review's fixes for every page (13 Nov 2026) ---- */

/* Settings › Preferences › Look (site_look.js): kept in this browser and never locked, so it sits apart from the
   account's preferences that Save Preferences keeps. */
.site_look_control .toggle_container { flex-wrap: wrap; }
/* (Settings scrolls inside its own column, not the page: the room goes at the column's foot. Under the page it made the
   page 84 px taller than the window, and a box taking the focus scrolled the section tabs under the header, 14 Nov 2026.) */
html:not(.workspace-body) body.settings-page:has(#chatbot-button)::after { content: none; }
html:not(.workspace-body) body.settings-page #main_right::after { content: ""; display: block; flex: 0 0 84px; }

/* Legal's tabs on a phone: in rows, every one in sight (they scrolled sideways with the scrollbar hidden: "Cookie
   Poli…", with nothing to show there was more). Settings' tabs: one row that scrolls sideways (Israa), its edges
   fading where there are more (site_chrome.js marks at-start / at-end), the chosen tab brought into view. */
@media (max-width: 768px) {
  .settings-page .settings-sidebar {
    min-width: 0;
    width: auto;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    white-space: nowrap;
    flex-wrap: nowrap;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 36px), transparent 100%);
  }
  .settings-page .settings-sidebar::-webkit-scrollbar { display: none; }
  .settings-page .settings-sidebar.at-start {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent 100%);
  }
  .settings-page .settings-sidebar.at-end {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px);
    mask-image: linear-gradient(to right, transparent 0, #000 24px);
  }
  .settings-page .settings-sidebar.at-start.at-end { -webkit-mask-image: none; mask-image: none; }
  .settings-page .settings-sidebar ul {
    flex-wrap: nowrap;
    gap: 4px;
    padding: 0 12px;
  }
  .settings-page .settings-sidebar li { flex: none; scroll-snap-align: start; }
  .settings-page .settings-sidebar a {
    min-width: 0;
    padding: 0.55rem 0.8rem;
    font-size: 0.9375rem;
  }
}

/* ---- What was left from the redesign review (13 Nov 2026, evening: "fix what is left") ---- */

/* Settings: Account and Security in cards, as Preferences' groups are. */
.settings-page #account_section > .section-content,
.settings-page #password_section > .section-content {
  margin-top: 12px;
  padding: 14px 18px 16px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fbfbfd;
}

/* ==== The style system (13 Nov 2026, Israa: "do all the other recommendations"): the canvas's Style boards made the
   site's. The tokens are on :root (--ds-*), and the headings, buttons and fields are set where they are defined; here
   the body's type, placeholders, the sizes that had their own, one kind of tab, switches, Legal's text. ==== */
.settings-page .settings-sidebar a {
  font-family: var(--ds-font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ds-quiet);
  border-radius: 999px;
  padding: 8px 14px;
}
/* !important: over .settings-page #confirm_delete (and more) */
.settings-page .settings-sidebar a.active,
.settings-page .settings-sidebar a:hover {
  background: var(--ds-brand-pale) !important;
  background-image: none !important;
  text-decoration: none !important;
  color: var(--ds-ink);
}
@media (max-width: 768px) {
  .settings-page .settings-sidebar ul { background: var(--ds-track); border-radius: 999px; padding: 4px; margin: 0 12px; width: max-content; }
  .settings-page .settings-sidebar a { padding: 6px 12px; font-size: 0.9375rem; }
  /* !important: over .settings-page .settings-sidebar a:… */
  .settings-page .settings-sidebar a.active { background: var(--ds-surface) !important; box-shadow: 0 1px 3px rgba(0, 6, 70, 0.14); }
  /* !important: over .settings-page #confirm_delete */
  .settings-page .settings-sidebar a:hover:not(.active) { background: transparent !important; }
}

/* Settings' choices of one (units, piece menu, look) as segments in the same track. */
.settings-page .toggle_container:not([hidden]) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  background: var(--ds-track);
  border-radius: 999px;
}
.settings-page .toggle_container input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.settings-page .toggle_container label {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ds-quiet);
}
.settings-page .toggle_container input[type="radio"]:checked + label { background: var(--ds-surface); color: var(--ds-ink); box-shadow: 0 1px 3px rgba(0, 6, 70, 0.14); }
.settings-page .toggle_container input[type="radio"]:focus-visible + label { outline: 2px solid var(--ds-brand); outline-offset: 2px; }

/* On/off as a switch (Settings' training choice). */
/* !important: over the inline width a script sets (and more) */
#use_data_for_training_toggle {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 44px !important;
  height: 26px !important;
  margin: 0;
  border-radius: 13px;
  background: var(--ds-line-strong);
  cursor: pointer;
  transition: background var(--transition);
}
#use_data_for_training_toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition);
}
#use_data_for_training_toggle:checked { background: var(--ds-brand); }
#use_data_for_training_toggle:checked::before { transform: translateX(18px); }
#use_data_for_training_toggle:focus-visible { outline: 2px solid var(--ds-brand); outline-offset: 2px; }

/* Settings' two headings inside Subscription and payments (they were 24 px by an inline style, larger than the
   section's own heading). */
/* !important: over h3's !important */
.settings-subhead { font-size: var(--ds-size-4) !important; margin: 0 0 8px; }

/* Settings › Preferences › Sizes and grading: the size chart (14 Nov 2026, Israa: "the pref-group--sizes is a bit of an
   issue"). Its eleven sizes were wider than the card, so most were cut off and the sideways scrollbar sat at the foot of
   a table 20 rows tall; the boxes' arrows covered the numbers. Now the chart scrolls in a box no taller than the window,
   the sizes stay along its top and the measurements down its left, and the boxes are compact, numbers lined up. */
/* !important: over .visually-hidden's !important (and more) */
.pref-group--sizes .size-chart-section > div:has(> #sizeChartMainTable) {
  max-height: min(70vh, 640px);
  overflow: auto !important;
  padding: 0 !important;
  overscroll-behavior: contain;
}
/* !important: over the inline min-width a script sets (and more) */
#sizeChartMainTable { min-width: 0 !important; width: max-content !important; border-collapse: separate !important; border-spacing: 0; }
/* !important: over the inline padding a script sets (and more) */
#sizeChartMainTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  padding: 8px 4px !important;
  border-bottom: 1px solid #e3e3ea;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}
/* !important: over #main_right div:not(.label):not(.su… */
#sizeChartMainTable tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
  padding-left: 12px !important;
  padding-right: 12px !important;
  border-right: 1px solid #e3e3ea;
  white-space: nowrap;
  font-size: 0.875rem;
}
#sizeChartMainTable thead tr > :first-child { z-index: 3; }
#sizeChartMainTable tbody td { padding: 3px 4px; }
/* !important: over the inline width a script sets */
#sizeChartMainTable input[type="number"] {
  width: 3.75rem !important;
  box-sizing: border-box;
  padding: 5px 8px;
  text-align: right;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
#sizeChartMainTable input[type="number"]::-webkit-outer-spin-button,
#sizeChartMainTable input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
html[data-site-dark] #sizeChartMainTable thead th,
html[data-site-dark] #sizeChartMainTable tr > :first-child { background: #1b1f2a; border-color: #343b4d; }

/* ===== Account and Library round, 15 Nov 2026 (site account helper) ===== */

/* Settings (A10): one section at a time from the side list (Current design, a laptop or a tablet); deleting apart at
   the foot of the list; the size chart one size at a time. */
/* !important: over .hide-mobile's !important */
.settings-sidebar li.settings-sidebar-danger { margin-top: 12px; padding-top: 12px; border-top: 1px solid #E3E3EA; }
.settings-sidebar li.settings-sidebar-danger a { color: #B3261E; }
.settings-danger-section .section-content { border: 1px solid #F1C7C3; border-radius: 12px; }
.settings-danger-section .danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 0;
  border-top: 1px solid #F1E1DF;
}
.settings-danger-section .danger-row-words h4 { margin: 0 0 4px; }
.settings-danger-section .danger-row-words p { margin: 0; color: #4B5162; max-width: 36rem; }
.size-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.size-picker-label { font-weight: 600; margin-right: 4px; }
.size-picker button {
  min-width: 44px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #C5C9D6;
  border-radius: 8px;
  background: #FFFFFF;
  color: #000646;
  font: inherit;
  cursor: pointer;
}
.size-picker button[aria-checked="true"] { background: #0025E6; border-color: #0025E6; color: #FFFFFF; font-weight: 600; }
.size-picker button:focus-visible { outline: 3px solid #A8B8FF; outline-offset: 1px; }
@media (pointer: coarse) { .size-picker button { min-height: 44px; } }
.size-picker-note { margin: 0 0 8px; }
/* !important: over the inline min-width a script sets (and more) */
table.size-chart-one { min-width: 0 !important; width: auto !important; }
.settings-load-failed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #F1C7C3;
  border-radius: 10px;
  background: #FDECEA;
  color: #5F1410;
}

/* --- Plans and billing (15 Nov 2026, billing helper: M28, M30-M33, M41) ------------------------------------------------- */
/* Settings > Subscription and payments: how the plan is billed, a change waiting, invoices and a VAT number. */
.plan-change-line { margin: 0.25rem 0 0.75rem; padding: 0.625rem 0.875rem; border-left: 4px solid #0025E6; background: #f3f3f5; border-radius: 6px; color: #303850; font-family: var(--font-family-inter); }
#keep_plan_btn { margin-left: 8px; }
.billing-part { margin-top: 1.75rem; }
.invoice-list { list-style: none; margin: 0.5rem 0 0; padding: 0; max-width: 40rem; }
.invoice-row { display: grid; grid-template-columns: minmax(9rem, 1.4fr) minmax(4.5rem, 0.8fr) minmax(5rem, 0.8fr) auto; gap: 0.5rem 1rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #e1e3ea; font-family: var(--font-family-inter); color: #303850; }
.invoice-amount { font-variant-numeric: tabular-nums; font-weight: 600; color: #000646; }
.invoice-status { font-size: 0.875rem; font-weight: 600; }
.invoice-status--paid { color: #1d6b3a; }
.invoice-status--open, .invoice-status--uncollectible { color: #8a3b00; }
.invoice-status--void { color: #4a5868; }
.invoice-links { display: flex; gap: 0.25rem; }
.invoice-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.625rem; color: #0025E6; font-weight: 600; text-decoration: underline; }
.vat-list { list-style: none; margin: 0.5rem 0; padding: 0; }
.vat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.375rem 0; font-family: var(--font-family-inter); color: #303850; }
.vat-value { font-weight: 700; color: #000646; letter-spacing: 0.02em; }
.vat-remove { min-height: 44px; }
.vat-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; max-width: 44rem; margin-top: 0.5rem; }
.vat-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 12rem; }
.vat-field input { min-height: 44px; padding: 0 0.75rem; border: 1px solid #8a8fa3; border-radius: 10px; background: #ffffff; color: #1b1f2a; font-family: var(--font-family-inter); font-size: 1rem; }
.vat-field input:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.vat-field input[aria-invalid="true"] { border-color: #B3261E; }
.vat-form .btn-rounded { min-height: 44px; }
.vat-error { flex-basis: 100%; margin: 0; color: #B3261E; font-weight: 600; font-family: var(--font-family-inter); }
.vat-error:empty { display: none; }
/* Settings > Preferences > Emails: Tips and news by email. */
.email-tips-row { display: flex; align-items: center; gap: 0.625rem; min-height: 44px; }
.email-tips-row input { width: 18px; height: 18px; margin: 0; }
@media (max-width: 600px) {
  .invoice-row { grid-template-columns: 1fr auto; }
  .invoice-links { grid-column: 1 / -1; }
  #keep_plan_btn { margin: 8px 0 0; }
}

/* --- Teams and classes (16 Nov 2026, teams helper: M35, M36; script/settings/team_settings.js, script/account/teams_pricing.js) --------- */
/* Settings > Subscription and payments > Team and class. */
#team_access_line { margin: 0.25rem 0 0.75rem; color: #1d6b3a; font-weight: 600; font-family: var(--font-family-inter); }
#team_access_line[hidden], .team-status:empty, .delete-team-note[hidden] { display: none; }
.team-status { margin: 0.25rem 0 0.75rem; font-family: var(--font-family-inter); font-weight: 600; color: #303850; }
.team-card .plan-change-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.team-card .plan-change-line p { flex-basis: 100%; margin: 0; }
.team-invite-form .helper_text { flex-basis: 100%; margin: 0; }
/* The team's "version approved" webhook (20 Nov 2026, helper E: script/settings/team_webhook.js). */
.team-webhook { margin-top: 1rem; padding-top: 0.875rem; border-top: 1px solid #e3e3ea; }
.team-webhook-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
/* (As the team's other labels, Seats and Invite, and 8 px under the line before it: it sat on that line, a size bigger.
   21 Nov 2026.) */
.team-webhook-form label { flex-basis: 100%; font-weight: 600; color: #000646; font-size: 0.9375rem; margin-top: 0.5rem; }
.team-webhook-url { flex: 1 1 16rem; min-width: 0; min-height: 44px; padding: 0 0.75rem; border: 1px solid #c9ced9; border-radius: 8px; background: #ffffff; color: #000646; font: inherit; }
.team-webhook-url:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.team-webhook-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #c77700; border-radius: 10px; background: #fff4e5; color: #3d2600; }
.team-webhook-secret p { flex-basis: 100%; margin: 0; }
.team-webhook-secret code { flex: 1 1 14rem; overflow-wrap: anywhere; font-size: 0.875rem; }
.team-invite-input:focus-visible, .team-seats-input:focus-visible, #class_code_input:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.team-code-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; max-width: 36rem; }
.team-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; width: 100%; }
#class_code_input { flex: 1 1 12rem; min-height: 44px; padding: 0 0.75rem; border: 1px solid #8a8fa3; border-radius: 10px; background: #ffffff; color: #1b1f2a; font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase; }
#class_code_input::placeholder { text-transform: none; letter-spacing: normal; }
.team-code-form .btn-rounded { min-height: 44px; }
.team-code-form .helper_text { margin: 0; }
.delete-team-note { margin: 0.75rem 0 0; padding: 0.625rem 0.875rem; border-left: 4px solid #8a3b00; background: #fff4e5; color: #4a2a00; border-radius: 6px; line-height: 1.5; }

/* --- Class work (20 Nov 2026, helper F; script/settings/class_work.js): a class's assignments, progress and marks -------- */
.class-work[hidden] { display: none; }
.team-card.cw-card { max-width: none; }
.cw-sub { margin: 1.25rem 0 0.5rem; font-size: 1rem; font-weight: 700; color: #000646; font-family: var(--font-family-inter); }
.cw-assignments { list-style: none; margin: 0.5rem 0; padding: 0; }
.cw-assignment { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid #e1e3ea; }
.cw-a-words { flex: 1 1 18rem; min-width: 0; }
.cw-a-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: #000646; }
.cw-a-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.cw-meta, .cw-brief, .cw-ai, .cw-note, .cw-mark { margin: 0.25rem 0 0; line-height: 1.5; font-size: 0.9375rem; color: #4a5868; }
.cw-brief { white-space: pre-wrap; color: #303850; }
.cw-ai--off { color: #8a3b00; }
.cw-note { padding: 0.5rem 0.75rem; border-left: 3px solid #0025E6; background: #f3f5ff; color: #303850; border-radius: 6px; white-space: pre-wrap; }
.cw-mark { font-weight: 600; color: #000646; }
.cw-pill { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; white-space: nowrap; background: #eef0f6; color: #303850; }
.cw-pill[data-status="in_progress"] { background: #e8eeff; color: #1a2a8f; }
.cw-pill[data-status="submitted"] { background: #fff4d6; color: #6b4a00; }
.cw-pill[data-status="changes"] { background: #ffe8e0; color: #8a2a00; }
.cw-pill[data-status="done"] { background: #e3f4e8; color: #1d6b3a; }
/* (The grid scrolls inside its own box on a narrow screen, the students' names kept in view.) */
.cw-grid-wrap { overflow-x: auto; max-width: 100%; border: 1px solid #e1e3ea; border-radius: 10px; }
.cw-grid-wrap:focus-visible, .cw-cell:focus-visible { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.cw-grid { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-family: var(--font-family-inter); }
.cw-grid th, .cw-grid td { padding: 0.375rem 0.5rem; border-bottom: 1px solid #e1e3ea; text-align: left; vertical-align: top; }
.cw-grid thead th { max-width: 10rem; font-weight: 600; line-height: 1.3; color: #000646; overflow-wrap: anywhere; background: #f7f7f9; }
.cw-grid tbody th { position: sticky; left: 0; z-index: 1; min-width: 10rem; max-width: 14rem; background: #ffffff; }
.cw-who { display: block; font-weight: 600; color: #000646; overflow-wrap: anywhere; }
.cw-email { display: block; font-size: 0.8125rem; font-weight: 400; color: #4a5868; overflow-wrap: anywhere; }
.cw-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 0.125rem; width: 100%; min-width: 8rem; min-height: 44px; padding: 0.375rem 0.5rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cw-cell:hover { border-color: #c9cede; background: #f7f8fc; }
.cw-when { font-size: 0.8125rem; color: #4a5868; }
.cw-cell-mark { font-size: 0.8125rem; font-weight: 600; color: #000646; }
.cw-late { font-size: 0.75rem; font-weight: 600; color: #8a2a00; }
dialog.app-dialog.cw-dialog { width: min(40rem, calc(100vw - 32px)); }
.cw-dialog .cw-sub { font-size: 0.9375rem; }
.cw-handins { list-style: none; margin: 0.25rem 0; padding: 0; }
.cw-handins li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.375rem 0; border-bottom: 1px solid #e1e3ea; }
.cw-check-list { margin: 0.25rem 0; padding-left: 1.25rem; font-size: 0.9375rem; line-height: 1.5; }
.cw-check-list ul { padding-left: 1.125rem; color: #4a5868; }
.cw-ok { margin: 0.25rem 0; font-weight: 600; color: #1d6b3a; }
.cw-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.cw-row > * { flex: 1 1 10rem; }
.cw-check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; margin-top: 0.25rem; cursor: pointer; }
.cw-check input { flex: none; width: 20px; height: 20px; }
/* (min-inline-size: a fieldset is as wide as its widest part, so a long pattern's name in its menu pushed New assignment
   170 px past its window's side, 21 Nov 2026; the menu wraps to the window instead.) */
.cw-starter { margin: 0.75rem 0 0; padding: 0.5rem 0.75rem; border: 1px solid #e1e3ea; border-radius: 10px; min-inline-size: 0; }
.cw-starter select { box-sizing: border-box; max-width: 100%; }
.cw-starter legend { padding: 0 0.25rem; font-weight: 600; }
.cw-hint { display: block; font-size: 0.8125rem; color: #4a5868; }
.cw-dialog-buttons { flex-wrap: wrap; }

/* --- Tester rounds (20 Nov 2026, helper J; script/settings/tester_rounds.js): built on class work's parts above -------- */
.tester-rounds[hidden] { display: none; }
.tr-pill[data-status="applied"], .tr-pill[data-status="small"] { background: #fff4d6; color: #6b4a00; }
.tr-pill[data-status="accepted"], .tr-pill[data-status="downloaded"] { background: #e8eeff; color: #1a2a8f; }
.tr-pill[data-status="submitted"], .tr-pill[data-status="good"] { background: #e3f4e8; color: #1d6b3a; }
.tr-pill[data-status="late"], .tr-pill[data-status="big"] { background: #ffe8e0; color: #8a2a00; }
dialog.app-dialog.tr-dialog { width: min(52rem, calc(100vw - 32px)); }
.tr-tools { margin: 0.5rem 0 0; }
/* !important: over base.css h4's !important margin */
.tr-dialog h4.cw-sub { margin: 1.5rem 0 0.5rem !important; }
.tr-size { margin: 0.75rem 0; padding: 0.75rem; border: 1px solid #e1e3ea; border-radius: 10px; }
.tr-size-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; color: #000646; }
.tr-files { display: grid; gap: 0.25rem; margin: 0.5rem 0; }
.tr-filerow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.tr-filename { font-size: 0.9375rem; color: #303850; overflow-wrap: anywhere; min-width: 0; }
.tr-pick { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.tr-pick:focus-within { outline: 2px solid #1A2A8F; outline-offset: 2px; }
.tr-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.tr-who { flex: 1 1 12rem; min-width: 0; }
.tr-paid { margin: 0; }
.tr-points { margin: 0.25rem 0 0.5rem; }
.tr-points .cw-grid tbody th { min-width: 9rem; }
.tr-name, .tr-num { width: 100%; box-sizing: border-box; min-height: 40px; padding: 0 0.5rem; border: 1px solid #8a8fa3; border-radius: 8px; background: #ffffff; color: #1b1f2a; font: inherit; }
.tr-num { min-width: 4.5rem; text-align: right; }
.tr-x { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #4a5868; font-size: 1.25rem; cursor: pointer; }
.tr-url { font-family: monospace; font-size: 0.875rem; }
.tr-measures { margin: 0 0 0.75rem; }
.tr-measures td, .tr-measures thead th { white-space: nowrap; max-width: none; }
.tr-measures.cw-grid-wrap tbody th { min-width: 7rem; }
.tr-caption { margin: 0.75rem 0 0.375rem; font-weight: 600; color: #000646; }
.tr-measures tr[data-out="true"] td:last-child { color: #8a2a00; font-weight: 600; }
.tr-answer { padding: 0.75rem 0; border-bottom: 1px solid #e1e3ea; }
.tr-list { margin: 0.25rem 0; padding-left: 1.25rem; font-size: 0.9375rem; line-height: 1.5; color: #303850; }
.tr-list li[data-status="over"], .tr-list li[data-status="under"] { color: #8a2a00; }
.tr-photos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0; }
.tr-thumb { padding: 0; border: 1px solid #e1e3ea; border-radius: 8px; background: transparent; cursor: pointer; min-width: 44px; min-height: 44px; }
.tr-thumb img { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 8px; }
.tr-big { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
