/*
 * The professional style: what changes from the pixel-art look of style.css
 * when <html data-style="pro"> (the member's choice, theme.py). Every rule
 * here is scoped to [data-style="pro"], and colours still come from the
 * palette variables, so every colour theme works with both styles.
 *
 * The look: a sober, modern console. The system's own fonts at a real type
 * scale, cards with a one-pixel border, rounded corners and soft shadows,
 * titles in normal case, comfortable spacing; no digital rain, no scanlines,
 * no pixel drawings.
 *
 * How it works:
 *   - style.css draws its frames as hard shadows one "art pixel" (--px)
 *     outside each box, and leaves --px of room around framed elements.
 *     Here --px is a hairline (1 px) and the frame a single spread shadow,
 *     which follows the rounded corners: every frame becomes a 1 px border,
 *     and every gap left for a frame shrinks to match, in this file and in
 *     the modules' stylesheets alike;
 *   - --font-pixel and --font-term name the system fonts, so every rule of
 *     style.css and the modules gets them; sizes are set again below;
 *   - each rule mirrors the rule of style.css it replaces, with the same
 *     selector inside :where([data-style="pro"]), which adds no specificity:
 *     it wins over style.css by coming later, and the modules' stylesheets,
 *     which come after this file, still win over it. What is specific to a
 *     module is in that module's stylesheet, under "Professional style".
 */

/* ---- Tokens ---------------------------------------------------------------- */

/* Not :where(): this must beat style.css's :root, which sets --px and the fonts. */
[data-style="pro"] {
  --px: 1px;

  /* The system's interface font, and its monospace for code and generated values. */
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-code: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --font-pixel: var(--font-ui);
  --font-term: var(--font-ui);
  --pro-input-size: 15px; /* 16 px on touch screens (below), or iOS zooms into the field */
  /* Heights of fields and of segmented buttons; 44 px on touch screens (below).
     The modules' stylesheets use them too, so their controls follow. */
  --pro-control: 40px;
  --pro-segment: 34px;

  /* Hairlines, tints, corners and shadows, all derived from the palette. */
  --pro-line: color-mix(in srgb, var(--cyan-300) 15%, var(--panel));        /* card and row borders */
  --pro-line-strong: color-mix(in srgb, var(--cyan-300) 28%, var(--panel)); /* input and button borders */
  --pro-line-hover: color-mix(in srgb, var(--cyan-300) 42%, var(--panel));
  --pro-hover: color-mix(in srgb, var(--cyan-300) 8%, transparent);         /* a hovered row or button */
  --pro-selected: color-mix(in srgb, var(--cyan-300) 15%, transparent);     /* a chosen row, a chip */
  --pro-radius-sm: 6px;
  --pro-radius: 8px;
  --pro-radius-lg: 12px;
  --pro-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --pro-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.25);
  --pro-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --pro-ring: 0 0 0 3px var(--focus-halo);                                   /* around a focused field */
  --pro-focus: 2px solid var(--cyan-300);                                    /* keyboard focus outline */
}

/* ---- Page ------------------------------------------------------------------ */

:where([data-style="pro"]) body {
  padding: 40px 24px 28px;
  background:
    radial-gradient(1000px 460px at 50% -200px, color-mix(in srgb, var(--cyan-300) 7%, transparent), transparent),
    var(--bg);
  font: 400 15px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased; /* style.css turns smoothing off for its pixel fonts */
  -moz-osx-font-smoothing: grayscale;
}

/* Code in the system's monospace, a little smaller than the text around it (but not again when nested). */
:where([data-style="pro"]) :is(code, pre, kbd, samp) {
  font-family: var(--font-code);
  font-size: 0.9em;
}

:where([data-style="pro"]) :is(code, pre, kbd, samp) :is(code, kbd, samp) {
  font-size: 1em;
}

:where([data-style="pro"]) ::selection {
  color: var(--cyan-100);
  background: color-mix(in srgb, var(--cyan-300) 32%, transparent);
}

/* No digital rain (js/rain.js stops drawing it too) and no CRT scanlines. */
:where([data-style="pro"]) .rain,
:where([data-style="pro"]) .crt {
  display: none;
}

/* ---- Frames ------------------------------------------------------------------ */
/* The pixel frame of style.css, as one 1 px ring in --c that follows the corners. */

:where([data-style="pro"]) .panel,
:where([data-style="pro"]) .tab,
:where([data-style="pro"]) .btn,
:where([data-style="pro"]) .field input,
:where([data-style="pro"]) .alert,
:where([data-style="pro"]) .notice,
:where([data-style="pro"]) .prompt,
:where([data-style="pro"]) .topbar,
:where([data-style="pro"]) .dash-tab,
:where([data-style="pro"]) .select,
:where([data-style="pro"]) .segmented button,
:where([data-style="pro"]) .pwgen-value,
:where([data-style="pro"]) .check input {
  box-shadow: 0 0 0 var(--px) var(--c), var(--depth, 0 0 transparent);
}

/* ---- Header ------------------------------------------------------------------ */

:where([data-style="pro"]) .brand {
  margin-bottom: 28px;
}

/* A text wordmark instead of the pixel logo: a small mark (a rounded tile in
   the accent with two lines of text cut out of it, a snippet), then the name.
   Sized in em, so one font-size scales both. The link keeps its aria-label. */
:where([data-style="pro"]) .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  color: var(--cyan-100);
  font: 700 26px/1 var(--font-ui);
  letter-spacing: -0.03em;
  text-decoration: none;
  border-radius: var(--pro-radius);
}

:where([data-style="pro"]) .logo svg {
  display: none;
}

:where([data-style="pro"]) .logo::before {
  content: "";
  flex: none;
  width: 1.2em;
  height: 1.2em;
  border-radius: 0.3em;
  background:
    linear-gradient(var(--ink), var(--ink)) 0.3em 0.36em / 0.6em 0.12em no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0.3em 0.68em / 0.36em 0.12em no-repeat,
    linear-gradient(145deg, var(--cyan-200), var(--cyan-400));
  box-shadow: var(--pro-shadow-sm);
}

:where([data-style="pro"]) .logo::after {
  content: "snipp";
  content: "snipp" / ""; /* the link's aria-label already names it */
}

:where([data-style="pro"]) .logo:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 6px;
}

/* The terminal prompt ("> authentication required") and its cursor: the
   page's title says the same, without the terminal. */
:where([data-style="pro"]) .prompt {
  display: none;
}

/* ---- Panel ------------------------------------------------------------------- */

:where([data-style="pro"]) .panel {
  --c: var(--pro-line);
  --depth: var(--pro-shadow);
  margin: var(--px);
  padding: 32px 28px 28px;
  border-radius: var(--pro-radius-lg);
}

:where([data-style="pro"]) h1 {
  margin: 0 0 20px;
  color: var(--cyan-100);
  font: 600 22px/1.3 var(--font-ui);
  letter-spacing: -0.015em;
  text-transform: none;
  text-shadow: none;
}

:where([data-style="pro"]) .hl {
  padding: 1px 6px;
  color: var(--cyan-100);
  background: var(--pro-selected);
  border-radius: 4px;
  font-weight: 500;
}

:where([data-style="pro"]) .small {
  margin: 20px 0 0;
  font-size: 14px;
}

:where([data-style="pro"]) a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:where([data-style="pro"]) a:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
}

/* ---- Tabs (Log in / Sign up) ----------------------------------------------------- */

:where([data-style="pro"]) .tabs {
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  background: var(--well);
  border-radius: 10px;
  box-shadow: 0 0 0 var(--px) var(--pro-line);
}

:where([data-style="pro"]) .tab {
  --c: transparent;
  padding: 9px 8px;
  border-radius: var(--pro-radius-sm);
  background: transparent;
  font: 500 14px/20px var(--font-ui);
  text-transform: none;
}

:where([data-style="pro"]) .tab:hover {
  --c: transparent;
  color: var(--cyan-100);
  background: var(--pro-hover);
}

:where([data-style="pro"]) .tab.is-active {
  --c: var(--pro-line-strong);
  --depth: var(--pro-shadow-sm);
  color: var(--cyan-100);
  background: var(--panel);
}

:where([data-style="pro"]) .tab:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
}

/* ---- Form fields ----------------------------------------------------------------- */

:where([data-style="pro"]) .field {
  margin: 0 0 18px;
}

:where([data-style="pro"]) .field label {
  margin: 0 0 6px;
  color: var(--text);
  font: 500 14px/1.4 var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
}

/* No "> " before the labels. */
:where([data-style="pro"]) .field label::before {
  content: none;
}

:where([data-style="pro"]) .field input {
  --c: var(--pro-line-strong);
  --depth: 0 0 transparent;
  min-height: var(--pro-control);
  padding: 8px 12px;
  border-radius: var(--pro-radius);
  font: 400 var(--pro-input-size)/22px var(--font-ui);
  transition: box-shadow 0.15s;
}

:where([data-style="pro"]) .field input:hover {
  --c: var(--pro-line-hover);
}

:where([data-style="pro"]) .field input:focus {
  --c: var(--cyan-400);
  --depth: var(--pro-ring);
}

:where([data-style="pro"]) .field input[aria-invalid="true"] {
  --c: var(--danger);
}

:where([data-style="pro"]) .field input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

:where([data-style="pro"]) .field-note {
  margin: 6px var(--px) 0;
  font-size: 13px;
  line-height: 1.45;
}

/* Errors start with a small round "!" badge instead of the terminal's "! ". */
:where([data-style="pro"]) .field-note.is-error::before {
  content: "!";
  content: "!" / "";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  color: var(--ink);
  background: var(--danger);
  border-radius: 50%;
  font: 700 11px/1 var(--font-ui);
  vertical-align: -2px;
}

/* ---- Buttons ----------------------------------------------------------------------- */
/* Heights come from padding and line-height (no min-height), so the label
   stays centred on links drawn as buttons too: 40 px, 36 px inline, 30 px
   small, and 44 px for all of them on touch screens (below). */

:where([data-style="pro"]) .btn {
  --c: transparent;
  --depth: var(--pro-shadow-sm);
  padding: 10px 16px;
  border-radius: var(--pro-radius);
  font: 600 14px/20px var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
  transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
}

:where([data-style="pro"]) .btn:hover {
  --c: transparent;
  --depth: var(--pro-shadow-sm);
  background: color-mix(in srgb, var(--cyan-300) 82%, var(--cyan-100));
}

:where([data-style="pro"]) .btn:active {
  --depth: 0 0 transparent;
  background: color-mix(in srgb, var(--cyan-300) 85%, var(--ink));
}

:where([data-style="pro"]) .btn:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
}

/* Secondary: neutral text in a bordered button, a tint on hover. */
:where([data-style="pro"]) .btn-ghost {
  --c: var(--pro-line-strong);
  --depth: 0 0 transparent;
  color: var(--cyan-100);
  background: transparent;
}

:where([data-style="pro"]) .btn-ghost:hover {
  --c: var(--pro-line-hover);
  --depth: 0 0 transparent;
  color: var(--cyan-100);
  background: var(--pro-hover);
}

:where([data-style="pro"]) .btn-ghost:active {
  background: var(--pro-selected);
}

:where([data-style="pro"]) .btn:disabled,
:where([data-style="pro"]) .btn:disabled:hover,
:where([data-style="pro"]) .btn:disabled:active {
  --c: var(--pro-line);
  --depth: 0 0 transparent;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  background: color-mix(in srgb, var(--cyan-300) 4%, transparent);
}

/* ---- Messages ------------------------------------------------------------------------ */
/* A tinted box with a bar of colour on its left. */

:where([data-style="pro"]) .alert,
:where([data-style="pro"]) .notice {
  margin: var(--px) var(--px) 20px;
  padding: 12px 16px 12px 18px;
  border-radius: var(--pro-radius);
  font-size: 14px;
  line-height: 1.5;
}

:where([data-style="pro"]) .alert {
  --c: color-mix(in srgb, var(--danger) 40%, transparent);
  --depth: inset 3px 0 0 var(--danger);
}

:where([data-style="pro"]) .notice {
  --c: var(--pro-line-strong);
  --depth: inset 3px 0 0 var(--cyan-300);
  color: var(--text);
  background: color-mix(in srgb, var(--cyan-300) 6%, var(--panel));
}

/* The pixel-art icons (envelope, padlock) are part of the pixel look only. */
:where([data-style="pro"]) .icon {
  display: none;
}

/* ---- Footer ---------------------------------------------------------------------------- */

:where([data-style="pro"]) .footer {
  margin-top: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

/* ---- Dashboard ------------------------------------------------------------------------- */

/* The top bar: the wordmark on the left, the account and its buttons on the right. */
:where([data-style="pro"]) .topbar {
  --c: transparent;
  gap: 12px 20px;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
}

:where([data-style="pro"]) .topbar .logo {
  font-size: 22px;
}

:where([data-style="pro"]) .topbar-user {
  gap: 10px 16px;
  margin-left: auto; /* the hidden prompt no longer pushes it right */
}

:where([data-style="pro"]) .topbar-user .hl {
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 400;
}

/* Sync badge: a round status dot with a soft halo, and a word. */
:where([data-style="pro"]) .sync-status {
  gap: 8px;
  font-size: 13px;
}

:where([data-style="pro"]) .sync-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan-300) 20%, transparent);
}

:where([data-style="pro"]) .sync-status[data-state="offline"]::before,
:where([data-style="pro"]) .sync-status[data-state="expired"]::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
}

:where([data-style="pro"]) .btn-inline {
  margin: var(--px);
  padding: 8px 14px;
}

/* Tabs: text on a line, the active one underlined in the accent. */
:where([data-style="pro"]) .dash-tabs {
  gap: 2px;
  margin: 0 0 28px;
  box-shadow: inset 0 -1px 0 var(--pro-line); /* the line under the tabs */
}

:where([data-style="pro"]) .dash-tab {
  --c: transparent;
  padding: 10px 12px 12px;
  color: var(--muted);
  background: transparent;
  border-radius: var(--pro-radius-sm) var(--pro-radius-sm) 0 0;
  font: 500 14px/20px var(--font-ui);
  text-transform: none;
  transition: color 0.15s, background-color 0.15s;
}

:where([data-style="pro"]) .dash-tab:hover {
  --c: transparent;
  color: var(--cyan-100);
  background: var(--pro-hover);
}

:where([data-style="pro"]) .dash-tab.is-active {
  --c: transparent;
  --depth: inset 0 -2px 0 var(--cyan-300);
  color: var(--cyan-100);
  background: transparent;
}

:where([data-style="pro"]) .dash-tab:focus-visible {
  outline: var(--pro-focus);
  outline-offset: -2px;
}

:where([data-style="pro"]) .modules {
  gap: 24px;
}

:where([data-style="pro"]) .module-subhead {
  margin: 28px var(--px) 12px;
  color: var(--cyan-100);
  font: 600 15px/1.4 var(--font-ui);
  text-transform: none;
}

:where([data-style="pro"]) .item {
  padding: 12px var(--px);
  border-bottom: 1px solid var(--pro-line);
}

:where([data-style="pro"]) .item-title {
  color: var(--cyan-100);
}

:where([data-style="pro"]) .item-meta {
  font-size: 13px;
}

:where([data-style="pro"]) .btn-small {
  padding: 5px 10px;
  border-radius: var(--pro-radius-sm);
  font: 500 13px/18px var(--font-ui);
  letter-spacing: 0;
}

/* A module: a card whose title sits on a line above the body. */
:where([data-style="pro"]) .module-head {
  gap: 12px;
  min-height: 52px;
  padding: 14px 20px 13px;
  color: var(--cyan-100);
  background: transparent;
  font: 600 16px/1.4 var(--font-ui);
  text-transform: none;
  box-shadow: inset 0 -1px 0 var(--pro-line);
}

/* The three title-bar "buttons" of the pixel window. */
:where([data-style="pro"]) .module-head::after {
  display: none;
}

/* "Send": a quiet "more actions" button, three round dots. */
:where([data-style="pro"]) .module-share {
  top: 9px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: var(--pro-radius-sm);
  transition: background-color 0.15s;
}

:where([data-style="pro"]) .module-share span {
  width: 4px;
  height: 4px;
  margin: 0 auto;
  background: var(--muted);
  border-radius: 50%;
  box-shadow: -7px 0 0 var(--muted), 7px 0 0 var(--muted);
}

:where([data-style="pro"]) .module-share:hover {
  background: var(--pro-hover);
}

:where([data-style="pro"]) .module-share:hover span,
:where([data-style="pro"]) .module-share:focus-visible span {
  background: var(--cyan-100);
  box-shadow: -7px 0 0 var(--cyan-100), 7px 0 0 var(--cyan-100);
}

:where([data-style="pro"]) .module-share:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 0;
}

:where([data-style="pro"]) .module.has-share .module-head {
  padding-right: 56px;
}

/* Dialogs (the "Send" menu of the modules' title bars). */
:where([data-style="pro"]) .share-dialog {
  --depth: var(--pro-shadow-lg);
  margin: auto; /* centred, as in style.css (the .panel rule above came later) */
  padding: 24px;
  border: 0; /* the browser's own dialog border */
}

:where([data-style="pro"]) .share-dialog::backdrop {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

:where([data-style="pro"]) .share-head .btn {
  margin: 0; /* level with the title */
}

:where([data-style="pro"]) .share-title {
  color: var(--cyan-100);
  font: 600 18px/1.3 var(--font-ui);
}

:where([data-style="pro"]) .share-file {
  margin: 6px 0 0;
  font-size: 14px;
}

:where([data-style="pro"]) .share-status {
  padding: 10px 12px;
  border-radius: var(--pro-radius);
  font-size: 14px;
  box-shadow: 0 0 0 var(--px) var(--pro-line);
}

:where([data-style="pro"]) .share-part {
  margin-top: 22px;
  padding-top: 18px;
  box-shadow: inset 0 var(--px) 0 0 var(--pro-line);
}

:where([data-style="pro"]) .share-part h3 {
  margin: 0 0 4px;
  color: var(--cyan-100);
  font: 600 15px/1.4 var(--font-ui);
}

:where([data-style="pro"]) .module-body {
  padding: 20px 20px 22px;
}

/* In a module, on screens wider than a phone, a button is as wide as its
   label rather than the whole column: a form ends with its button on the
   left, as in most consoles. Rows of buttons that a module lays out itself
   keep the widths it gives them (its stylesheet comes after this one). */
@media (min-width: 481px) {
  :where([data-style="pro"]) .module-body .btn:where(:not(.btn-inline)) {
    width: fit-content;
  }
}

/* Segmented control: one bordered track, the chosen option a raised, tinted tab inside it. */
:where([data-style="pro"]) .segmented {
  gap: 3px;
  padding: 3px;
  background: var(--well);
  border-radius: 10px;
  box-shadow: 0 0 0 var(--px) var(--pro-line);
}

:where([data-style="pro"]) .segmented button {
  --c: transparent;
  min-height: var(--pro-segment);
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 7px;
  font: 500 14px/20px var(--font-ui);
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.15s, background-color 0.15s;
}

:where([data-style="pro"]) .segmented button:hover {
  --c: transparent;
  color: var(--cyan-100);
  background: var(--pro-hover);
}

:where([data-style="pro"]) .segmented button[aria-pressed="true"] {
  --c: color-mix(in srgb, var(--cyan-300) 42%, transparent);
  --depth: var(--pro-shadow-sm);
  color: var(--cyan-100);
  background: color-mix(in srgb, var(--cyan-300) 20%, var(--panel));
}

:where([data-style="pro"]) .segmented button:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 1px;
}

/* ---- Module: password generator ----------------------------------------------------- */

:where([data-style="pro"]) .pwgen-value {
  --c: var(--pro-line-strong);
  --depth: 0 0 transparent;
  min-height: 60px;
  padding: 15px 16px;
  border-radius: var(--pro-radius);
  font: 500 21px/1.4 var(--font-code);
  letter-spacing: 0.02em;
}

/* Strength meter: ten rounded segments. */
:where([data-style="pro"]) .meter {
  gap: 4px;
  margin: 24px var(--px) 8px;
}

:where([data-style="pro"]) .meter i {
  height: 6px;
  background: var(--pro-line);
  border-radius: 3px;
}

:where([data-style="pro"]) .pwgen-strength {
  font-size: 13px;
}

:where([data-style="pro"]) .field-row label,
:where([data-style="pro"]) .field-row-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

:where([data-style="pro"]) .field-row label::before,
:where([data-style="pro"]) .field-row-label::before {
  content: none;
}

:where([data-style="pro"]) .pwgen-length {
  color: var(--cyan-100);
  font: 600 15px/1.4 var(--font-ui);
  font-variant-numeric: tabular-nums;
}

/* Range slider: a thin rounded track and a round handle. */
:where([data-style="pro"]) .range {
  height: 24px;
  margin: 8px var(--px) 0;
}

:where([data-style="pro"]) .range::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--well);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--pro-line-strong);
}

:where([data-style="pro"]) .range::-moz-range-track {
  height: 6px;
  background: var(--well);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--pro-line-strong);
}

/* Firefox shows how far the handle is; Chrome has no such part. */
:where([data-style="pro"]) .range::-moz-range-progress {
  height: 6px;
  background: var(--cyan-400);
  border-radius: 999px;
}

:where([data-style="pro"]) .range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  background: var(--cyan-300);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--panel), 0 1px 4px rgba(0, 0, 0, 0.5);
}

:where([data-style="pro"]) .range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--cyan-300);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--panel), 0 1px 4px rgba(0, 0, 0, 0.5);
}

:where([data-style="pro"]) .range:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
  border-radius: var(--pro-radius-sm);
}

/* Checkboxes: rounded boxes, filled in the accent with a check mark when ticked. */
:where([data-style="pro"]) .pwgen-sets {
  gap: 12px 16px;
  margin: 24px 0 0;
}

:where([data-style="pro"]) .check {
  gap: 10px;
}

:where([data-style="pro"]) .check input {
  --c: var(--pro-line-hover);
  display: inline-grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: var(--px);
  border-radius: 5px;
  transition: background-color 0.15s;
}

:where([data-style="pro"]) .check input::before {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
}

:where([data-style="pro"]) .check input:checked {
  --c: var(--cyan-300);
  --depth: 0 0 transparent;
}

:where([data-style="pro"]) .check input:checked::before {
  opacity: 1;
}

:where([data-style="pro"]) .check input:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
}

:where([data-style="pro"]) .pwgen-status {
  font-size: 14px;
}

/* ---- Lock screen ------------------------------------------------------------------ */

:where([data-style="pro"]) .lock-screen {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

:where([data-style="pro"]) .lock-title {
  color: var(--cyan-100);
  font: 600 20px/1.3 var(--font-ui);
  text-transform: none;
}

/* ---- Forms: selects, badges, dangerous actions ------------------------------------ */

/* The browser's own arrow is kept: it fits a system-font interface. */
:where([data-style="pro"]) .select {
  --c: var(--pro-line-strong);
  min-height: var(--pro-control);
  padding: 8px 12px;
  border-radius: var(--pro-radius);
  font: 400 var(--pro-input-size)/22px var(--font-ui);
}

:where([data-style="pro"]) .select:hover {
  --c: var(--pro-line-hover);
}

:where([data-style="pro"]) .select:focus {
  --c: var(--cyan-400);
  --depth: var(--pro-ring);
}

:where([data-style="pro"]) .badge {
  margin-left: 6px;
  padding: 2px 8px;
  color: var(--cyan-200);
  background: var(--pro-selected);
  border-radius: 999px;
  font: 600 12px/16px var(--font-ui);
  vertical-align: 1px;
}

:where([data-style="pro"]) .badge-off {
  color: var(--danger-text);
  background: color-mix(in srgb, var(--danger) 18%, transparent);
}

/* Collapsible how-to: a bordered box with the browser's disclosure triangle. */
:where([data-style="pro"]) .steps {
  margin: 0 var(--px) 20px;
  padding: 2px 16px;
  border-left: 0;
  border-radius: var(--pro-radius);
  box-shadow: 0 0 0 var(--px) var(--pro-line);
  font-size: 14px;
}

:where([data-style="pro"]) .steps summary {
  min-height: 40px;
  padding: 10px 0;
  color: var(--cyan-100);
  font-weight: 500;
  text-transform: none;
}

:where([data-style="pro"]) .steps summary:focus-visible {
  outline: var(--pro-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

:where([data-style="pro"]) .steps li {
  margin-bottom: 8px;
}

/* The Account module's forms: fields at a reading width, not the wide module's. */
:where([data-style="pro"]) .account-form {
  max-width: 520px;
  margin-bottom: 24px;
}

:where([data-style="pro"]) .module-subhead-danger {
  color: var(--danger);
}

:where([data-style="pro"]) .btn-danger {
  --c: color-mix(in srgb, var(--danger) 50%, transparent);
  --depth: 0 0 transparent;
  color: var(--danger-text);
  background: var(--danger-bg);
}

:where([data-style="pro"]) .btn-danger:hover {
  --c: var(--danger);
  --depth: 0 0 transparent;
  color: var(--ink);
  background: var(--danger);
}

/* ---- Small screens ------------------------------------------------------------------ */

@media (max-width: 480px) {
  :where([data-style="pro"]) body {
    padding: 24px 16px 24px;
  }

  :where([data-style="pro"]) .panel {
    padding: 24px 18px;
  }

  :where([data-style="pro"]) .tabs {
    gap: 4px;
  }

  /* The top bar on three rows (style.css's grid): wordmark and sync badge, the account, the buttons. */
  :where([data-style="pro"]) .topbar {
    gap: 12px;
    margin-bottom: 12px;
    padding: 0;
  }

  :where([data-style="pro"]) .topbar .logo {
    font-size: 21px;
  }

  :where([data-style="pro"]) .topbar-user .hl {
    font-size: 14px;
  }

  :where([data-style="pro"]) .topbar-user .topbar-actions {
    gap: 10px;
  }

  /* One scrollable row of tabs, from one edge of the screen to the other
     (scroll-padding: the tabs snap into place inside the page's margin). */
  :where([data-style="pro"]) .dash-tabs {
    gap: 2px;
    margin: 0 -16px 22px;
    padding: 0 16px;
    scroll-padding: 0 16px;
  }

  :where([data-style="pro"]) .module-body {
    padding: 18px 16px 18px;
  }

  :where([data-style="pro"]) .pwgen-value {
    font-size: 18px;
  }
}

/* ---- Touch screens ---------------------------------------------------------------- */
/* Every control at least 44 px tall, as in style.css (whose own rules for
   touch screens the rules above replace, hence their repetition here). */

@media (pointer: coarse) {
  [data-style="pro"] {
    --pro-input-size: 16px;
    --pro-control: 44px;
    --pro-segment: 44px;
  }

  :where([data-style="pro"]) .btn,
  :where([data-style="pro"]) .btn-inline {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  :where([data-style="pro"]) .btn-small {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  :where([data-style="pro"]) .logo {
    min-height: 44px;
  }

  :where([data-style="pro"]) .tab,
  :where([data-style="pro"]) .dash-tab {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  :where([data-style="pro"]) .check {
    min-height: 44px;
  }

  :where([data-style="pro"]) .range {
    height: 44px;
  }

  :where([data-style="pro"]) .module-head {
    min-height: 56px;
    padding-top: 16px;
    padding-bottom: 15px;
  }

  :where([data-style="pro"]) .module-share {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
  }

  :where([data-style="pro"]) .steps summary,
  :where([data-style="pro"]) details > summary {
    min-height: 44px;
  }
}

/* ---- Two-step verification (mfa_setup.html, mfa_codes.html) ------------------------- */

:where([data-style="pro"]) .mfa-qr {
  border-radius: var(--pro-radius);
}

:where([data-style="pro"]) .mfa-secret {
  font: 15px/1.5 var(--font-code);
  letter-spacing: 0.06em;
}

:where([data-style="pro"]) .mfa-codes {
  margin: 16px 0 24px;
  width: 100%;
  font: 15px/1.6 var(--font-code);
  border: 1px solid var(--pro-line-strong);
  border-radius: var(--pro-radius-sm);
}
