/* MONARO LAB account pages: type, thin rules, no containers. Colours from the site tokens (site.css). */

/* the same column and title as the beats page, so the title's left edge is the page's one edge */
.acct-page { width: min(100% - 2 * var(--margin), 1360px); margin: 0 auto; padding: clamp(110px, 14vw, 160px) 0 var(--gap-section); }
.acct-page h1, .acct-plain h1, .panel-title { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.035em; font-weight: 650; font-stretch: 125%; }
.dim { color: var(--muted); }
.meta { color: var(--muted); font-size: var(--step-small); }
.measure { max-width: 60ch; }

.notice { min-height: 0; margin-bottom: 20px; color: var(--muted); }
.notice:empty { display: none; }
.notice.error, .panel-notice.error { color: #e0867a; }
/* "Reload page" after a failure that only a fresh page fixes: compact, on its own line */
.acct-page .button.reload { display: flex; width: max-content; min-height: 40px; padding: 0 16px; margin-top: 12px; font-size: var(--step-small); }
.panel-notice { margin-top: 20px; font-size: var(--step-small); color: var(--muted); }
.panel-notice:empty { display: none; }

#stepup:empty { display: none; }
#stepup { margin-bottom: 40px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.14); border-bottom: 1px solid rgba(255,255,255,0.14); }
#stepup h2 { font-size: 1.25rem; font-weight: 650; }
#stepup .form { margin-top: 16px; }

/* forms: underlined fields, as on the contract check page */
.form { max-width: 440px; }
.field { margin-bottom: 28px; }
.label { display: block; color: var(--muted); font-size: var(--step-small); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-link { color: var(--muted); font-size: var(--step-small); }
.label-link:hover { color: #fff; }
/* the field of the beats search: underline only, violet when it has the focus */
.input { display: block; width: 100%; min-height: 40px; margin-top: 2px; padding: 0 2px; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.28); border-radius: 0;
  color: var(--ink); font: inherit; transition: border-color 200ms; }
.input:focus, .input:focus-visible { outline: none; border-bottom-color: rgba(255, 255, 255, 0.6); }
.help { margin-top: 6px; }
/* password field: the eye button sits at the right end of the line, the text stops before it */
.pw { position: relative; }
.pw .input { padding-right: 38px; }
.pw-toggle { position: absolute; right: 0; bottom: 2px; width: 34px; height: 34px; color: var(--muted); }
textarea.input { min-height: 132px; padding: 8px 2px; line-height: 1.5; resize: vertical; }
/* the support form's trap field: out of sight and out of the tab order, but present for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
button.button { font-family: inherit; }
/* the quiet button is an outline, the one the beats list uses; the primary one is the site's .button as it is */
.acct-page .button.quiet, .dialog .button.quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); transition: background-color 160ms, box-shadow 160ms; }
.acct-page .button.quiet::before, .dialog .button.quiet::before { display: none; }
.acct-page .button.quiet:hover, .dialog .button.quiet:hover { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
button:disabled { opacity: 0.55; cursor: default; }
/* a text action: underlined, violet */
.act { background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.35); padding: 2px 0; color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.act:hover { color: #fff; border-bottom-color: #fff; }

/* sign-in, sign-up, reset, result screens: one narrow column in the middle of the page */
.auth { max-width: 440px; margin-inline: auto; }
/* the title keeps the page's scale, not the form's width, and stays centred over the column */
.auth .panel-title { width: max-content; max-width: calc(100vw - 2 * var(--margin)); position: relative; left: 50%; transform: translateX(-50%); text-align: center; }
.auth .panel-lede, .auth .panel-notice, .auth .panel-divider { text-align: center; }
/* the column's buttons fill it, so the stack reads as one centred block */
.auth .button:not(.panel-divider + .button) { display: flex; width: 100%; justify-content: center; }
.auth .panel-divider + .button.quiet { display: flex; width: max-content; margin-inline: auto; }
.panel-lede { margin-top: 16px; color: var(--muted); }
.auth .form { margin-top: clamp(28px, 4vw, 48px); }
.auth .panel-notice { margin-top: 16px; }
.panel-title { text-wrap: balance; overflow-wrap: anywhere; }
/* a result screen ("Email confirmed"): the one action sits clear of the title, as the form would */
.panel > .button { margin-top: clamp(28px, 4vw, 48px); }
.panel > .button + .button { margin-top: 12px; }
/* the passkey button: the outline one, right under the solid one */
.panel > .form + .button.quiet { margin-top: 12px; }
/* "Allow MONARO Hub?": the code to compare is the largest thing on the screen; computer and access as a short list */
.hub-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; margin-top: 28px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: var(--step-small); }
.hub-facts dt { color: var(--ink); }
.hub-facts dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.hub-out { margin-top: 24px; text-align: center; color: var(--muted); font-size: var(--step-small); }
.hub-out .act { font-size: inherit; }
/* "or" and the second way in: a hairline, then a text action */
.panel-divider { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: var(--muted); font-size: var(--step-small); }
.acct-page .panel-divider + .button.quiet { margin-top: 8px; padding: 2px 0; min-height: 0; background: none; color: var(--ink); box-shadow: none; font-size: var(--step-body);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.acct-page .panel-divider + .button.quiet::before { display: none; }
.acct-page .panel-divider + .button.quiet:hover { color: #fff; border-bottom-color: #fff; background: none; box-shadow: none; }

/* ---- signed in. Operate mode: one sans, fixed rem sizes, short transitions, no decoration. ---- */
.acct { max-width: 760px; margin: 0 auto; font-size: 1rem; line-height: 1.5; }
.acct :focus-visible, .dialog :focus-visible { outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 2px; }
/* fields keep their underline only (DESIGN_RULES: no box), the focus shows in the line */
.acct .input:focus-visible, .dialog .input:focus-visible { outline: none; }

/* title, then the tabs with "Выйти" at the right end of the same row */
.acct-tabs { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.acct-tabs nav { min-width: 0; overflow-x: auto; }
.acct-tabs ul { display: flex; gap: 32px; }
.acct-tabs a { display: block; padding: 10px 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; transition: color 160ms, border-color 160ms; }
.acct-tabs a:hover { color: var(--ink); }
.acct-tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.acct-out { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 10px 0 12px; background: none; border: 0; border-radius: 0; color: var(--muted); font: inherit; font-size: 0.9375rem; cursor: pointer; transition: color 160ms; }
.acct-out:hover { color: var(--ink); }
.acct-out svg { flex: none; }

.acct h1 { font-size: 2rem; line-height: 1.2; font-weight: 650; font-stretch: 100%; letter-spacing: -0.02em; }
.acct-body { margin-top: 24px; }
.acct-body > .panel-notice { margin: 0 0 16px; font-size: 0.875rem; }

/* a setting: one calm panel; title, the value in ink, one dim line, the action below */
.settings { display: flex; flex-direction: column; gap: 16px; }
.set { padding: 24px 28px; background: rgba(255, 255, 255, 0.04); }
.set-title { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }
.set-value { margin-top: 6px; overflow-wrap: anywhere; }
.set-value[hidden] { display: none; }
.set-desc { margin-top: 4px; color: var(--muted); font-size: 0.875rem; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; }
.set-text { min-width: 0; }
.set-actions { display: flex; flex: none; align-items: center; gap: 12px; }
.set-actions .act { font-size: 0.875rem; font-weight: 500; }
.set-after:not(:empty) { margin-top: 20px; }
.set .button, .dialog .button { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.set .button[hidden] { display: none; }
.set .form { max-width: 440px; }
.enroll[hidden] { display: none; }
.set .dim, .set .measure, .tg-out p { font-size: 0.875rem; color: var(--muted); }
.tg-link { overflow-wrap: anywhere; margin-top: 12px; }
.tg-link a { color: var(--ink); }
.tg-out p { margin-top: 8px; }
.qr { width: 180px; height: 180px; margin-top: 16px; background: #fff; }
.secret-label { margin-top: 16px; color: var(--muted); font-size: 0.875rem; }
.secret { margin-top: 2px; letter-spacing: 0.08em; overflow-wrap: anywhere; }

/* passkeys: compact lines, the menu at the right of the line */
.keys { margin: 20px 0 -12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.key { display: flex; align-items: center; gap: 4px 12px; padding: 12px 0; min-height: 60px; }
.key + .key { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.key-icon { flex: none; color: var(--muted); }
.key-name { overflow-wrap: anywhere; }
.key .icon-btn { margin-right: -9px; }
.key-meta { flex: 1; min-width: 0; color: var(--muted); font-size: 0.875rem; }

/* icon buttons: 36px hit area, the colour of the text, no border */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--muted); cursor: pointer; transition: color 150ms, background-color 150ms; }
.icon-btn:not([hidden]) { display: inline-flex; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, 0.07); }
.icon-btn svg { display: block; }
/* the menu of the three dots: the dark surface of the dialogs */
.kmenu { position: fixed; z-index: 1000; min-width: 180px; max-width: calc(100vw - 16px); padding: 4px 0; background: var(--ground-2); border: 1px solid rgba(255,255,255,0.14); }
.kmenu-item { display: block; width: 100%; padding: 10px 16px; background: none; border: 0; color: var(--ink); font: inherit; font-size: 0.9375rem; text-align: left; white-space: nowrap; cursor: pointer; transition: background-color 150ms; }
.kmenu-item:hover, .kmenu-item:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }

/* purchases: the bar that adds a key, then cards */
.addbar { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 24px; background: rgba(255, 255, 255, 0.04); border: 0; border-radius: 0;
  color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 150ms; }
.addbar:hover { background: rgba(255, 255, 255, 0.07); }
.addbar svg { flex: none; color: var(--muted); }
.sub { margin: 32px 0 12px; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.cards { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; align-items: stretch; gap: 20px; padding: 12px; background: rgba(255, 255, 255, 0.04); transition: background-color 150ms; }
.card-main { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.card-name { font-size: 1.125rem; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.card-meta { color: var(--muted); font-size: 0.875rem; }
.card-mid { justify-content: center; }
.card-side { flex: none; display: flex; align-items: center; margin-left: auto; padding-right: 4px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: auto; padding-top: 12px; }
.card-art { flex: none; object-fit: cover; object-position: center; background: rgba(255, 255, 255, 0.06); }
.card-art-l { width: 120px; height: 120px; }
.card-art-w { width: 280px; aspect-ratio: 8 / 3; align-self: center; object-position: center bottom; }
.card-art-s { width: 64px; height: 64px; }
.card-art-xs { width: 36px; height: 36px; }
.card-letter { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.5rem; font-weight: 600; }
.card-art-xs.card-letter { font-size: 1rem; }
.card-state { color: var(--muted); font-size: 0.875rem; }
.card-state.bad { color: #e0867a; }
/* a text action: violet, no underline until hover */
.link-act { padding: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.link-act:hover { text-decoration: underline; text-underline-offset: 3px; }

/* dialogs: one style. Title and the close icon on top; confirmations end with Отмена and the verb on the right */
.dialog { width: min(520px, calc(100vw - 32px)); padding: 28px; border: 1px solid rgba(255,255,255,0.14); border-radius: 0; background: var(--ground-2); color: var(--ink); font-size: 1rem; }
.dialog::backdrop { background: rgba(5, 4, 8, 0.7); }
.dialog-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dialog-head .icon-btn { margin: -6px -10px -6px auto; }
.dialog-title { min-width: 0; font-size: 1.25rem; line-height: 1.3; font-weight: 650; overflow-wrap: anywhere; }
.dialog > .dialog-title { margin-bottom: 12px; }
.dialog p { color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.dialog p + p { margin-top: 10px; }
.dialog .dialog-meta { margin-bottom: 20px; }
.dialog .dialog-check { margin: 0 0 20px; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.dialog .dialog-check[hidden] { display: none; }
.dialog .button:disabled { opacity: 0.45; cursor: not-allowed; }
.dialog p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.dialog p a:hover { text-decoration-color: currentColor; }
.dialog .button.block { display: flex; width: 100%; justify-content: center; }
.dialog .link-act { display: inline-block; margin-top: 16px; }
.dialog .field { margin: 20px 0 0; }
.dialog .panel-notice { margin-top: 12px; }
.dialog .buttons { display: flex; justify-content: flex-end; margin-top: 24px; }
.dialog .legal-preview { margin-top: 20px; color: var(--ink); font-size: 0.9375rem; overflow-wrap: anywhere; }
.dialog .legal-preview[hidden] { display: none; }
.dialog .legal-note { margin-top: 12px; }
.dialog-more { margin-top: 16px; }
/* the computers of a licence */
.machines { margin-top: 4px; }
.mrow { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.mrow + .mrow { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.mrow-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.mrow-name { overflow-wrap: anywhere; }
.quiet-act { flex: none; min-height: 36px; padding: 0 0 0 8px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.9375rem; cursor: pointer; transition: color 150ms; }
.quiet-act:hover { color: var(--ink); }
.check { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 20px; font-size: var(--step-small); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); color-scheme: dark; cursor: pointer; }
.form > .check { margin: 4px 0 24px; color: var(--muted); line-height: 1.5; }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.check a:hover { text-decoration-color: currentColor; }

@media (max-width: 760px) {
  .acct-page { width: calc(100% - 32px); padding-top: 104px; }
  .acct-tabs ul { gap: 20px; }
  .acct-out svg { display: none; }
  .set { padding: 20px; }
  .card-art-l { width: 88px; height: 88px; }
  .card-plugin { flex-wrap: wrap; }
  .card-art-w { width: 100%; }
  .card { gap: 16px; }
  .key { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 12px; }
  .key-icon { grid-row: 1 / span 2; align-self: center; }
  .key-name, .key-meta { grid-column: 2; }
  .key-meta { flex: none; }
  .key .icon-btn { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 560px) {
  .set-head { flex-wrap: wrap; }
  .set-text { flex: 1 1 140px; }
  .set-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .dialog { padding: 24px 20px; }
  .dialog .buttons .button { flex: 1; justify-content: center; }
}
