/* Shared VIZIT ONE interface. Card artwork has its own palette. */
:root {
  --stone-background: var(--stone);
  --portal-field: #f5f1e9;
  --portal-rule: #6f756b;
  --portal-selected: #dce5da;
  --portal-on-accent: #fffdf6;
}

body,
body.admin-body {
  background: var(--stone-background);
  color: var(--stone-ink);
}

body :is(.site-header, .public-nav) .language-switch span {
  border-color: var(--portal-rule);
}

body .button:not(.button--quiet):not(:is(.top-premium-stage, .card-style-preview, .voice-studio) *) {
  background: var(--stone-accent);
  border-color: var(--stone-accent);
  color: var(--portal-on-accent);
}

body .button--quiet:not(:is(.top-premium-stage, .card-style-preview, .voice-studio) *),
body .profile-list__actions a {
  background: var(--stone-panel);
  border-color: var(--portal-rule);
  color: var(--stone-ink);
}

body :is(.button--quiet, .profile-list__actions a):hover:not(:is(.top-premium-stage, .card-style-preview, .voice-studio) *) {
  background: var(--portal-selected);
  color: var(--stone-accent);
}

body :is(a, button, input, select, textarea, summary):focus-visible:not(:is(.top-premium-stage, .card-style-preview, .voice-studio) *) {
  outline: 2px solid var(--stone-accent);
  outline-offset: 3px;
}

/* Home, account, dashboard and footer. */
body :is(.form-card, .analytics-card, .analytics-breakdown, .tester-callout) {
  background: var(--stone-panel);
  border-color: var(--stone-line);
}

body .form-card {
  box-shadow: 0 18px 48px rgba(49, 40, 27, .14);
}

body :is(.analytics-card dl div, .analytics-table th) {
  background: var(--stone);
  color: var(--stone-muted);
}

body :is(.analytics-table-wrap, .analytics-table, .analytics-table td, .analytics-table th) {
  border-color: var(--stone-line);
}

body .analytics-table {
  background: var(--portal-field);
  color: var(--stone-ink);
}

body :is(.analytics-breakdown__head, .tester-callout) p {
  color: var(--stone-muted);
}

body :is(.principles span, .analytics-breakdown__head .eyebrow, .profile-badge) {
  color: var(--stone-accent);
}

body .form-grid :is(input, textarea, select):not([type="hidden"]):not(.voice-studio *),
body .pzs-club-panel select {
  background: var(--portal-field);
  border-color: var(--portal-rule);
  color: var(--stone-ink);
  accent-color: var(--stone-accent);
}

body :is(.form-grid, .tester-form, .admin-form, .admin-auth-form) :is(input, textarea)::placeholder {
  color: var(--stone-muted);
}

body .vo-client-dock {
  background: var(--stone-panel);
  border-color: var(--stone-line);
  color: var(--stone-ink);
}

body .vo-client-dock a,
body .legal-footer :is(a:hover, span, small) {
  color: var(--stone-accent);
}

/* Club controls in the dashboard. The metallic pass keeps its own finish. */
body .pzs-club-panel {
  background: var(--stone-panel);
  border-color: var(--stone-line);
  color: var(--stone-ink);
}

body .pzs-club-panel :is(h2, .pzs-club-form label) {
  color: var(--stone-ink);
}

body .pzs-club-panel :is(.pzs-club-content > .pzs-club-kicker, .pzs-club-text) {
  color: var(--stone-accent);
}

body .pzs-club-panel .pzs-club-note {
  color: var(--stone-muted);
}

body .pzs-club-panel .pzs-club-form {
  background: var(--stone-light);
  border-color: var(--stone-line);
}

body .pzs-club-panel .pzs-club-btn {
  background: var(--stone-accent);
  border-color: var(--stone-accent);
  color: var(--portal-on-accent);
}

body .pzs-club-panel .pzs-club-btn--light,
body .pzs-club-panel .pzs-club-btn:hover {
  background: var(--portal-selected);
  border-color: var(--portal-rule);
  color: var(--stone-accent);
}

/* Plan picker and legal notices. */
body :is(.choice-section legend, .choice-card b) {
  color: var(--stone-ink);
}

body .choice-card > span {
  background: var(--stone-panel);
  border-color: var(--portal-rule);
}

body .choice-card :is(input:checked, input:focus-visible) + span {
  background: var(--portal-selected);
  border-color: var(--stone-accent);
  box-shadow: 0 0 0 2px var(--stone-accent);
}

body :is(.legal-check, .selection-summary, .legal-draft-note) {
  background: var(--stone-panel);
  border-color: var(--stone-line);
}

body :is(.choice-card em, .choice-card strong, .choice-legal-note strong, .legal-draft-note strong,
         .selection-summary strong, .selection-summary a, .choice-links a, .legal-check a,
         .plan-lock small a, .smart-en-panel strong, .smart-en-panel [data-smart-en-status]) {
  color: var(--stone-accent);
}

body .choice-card--signature :is(em, strong) {
  color: #6b4d1b;
}

body .registration-test-note {
  color: var(--stone-muted);
}

/* Tester and administration screens share the portal surfaces. */
body .admin-auth-shell {
  background: var(--stone-background);
  color: var(--stone-ink);
}

body :is(.admin-auth-card, .admin-card, .admin-metric, .tester-card) {
  background: var(--stone-panel);
  border-color: var(--stone-line);
  box-shadow: 0 12px 36px rgba(49, 40, 27, .10);
}

body :is(.admin-mini-grid .admin-metric, .admin-daily div, .admin-diagnostics div,
         .admin-profile-list article, .admin-check, .admin-password-note, .admin-setup-note,
         .admin-table-wrap th, .tester-access-card > div, .tester-message, .tester-ticket-list article,
         .tester-checklist-summary > div, .tester-check-item, .tester-progress) {
  background: var(--stone-light);
  border-color: var(--stone-line);
}

body :is(.admin-auth-form fieldset, .admin-table-wrap, .admin-table-wrap td,
         .admin-health-pills b, .tester-empty) {
  border-color: var(--stone-line);
}

body :is(.admin-auth-form legend, .admin-auth-form label, .admin-client-id strong,
         .admin-card-head > b, .admin-metric strong, .admin-table-wrap td, .admin-password-note strong,
         .admin-client-hero > div:last-child strong, .tester-center-head strong,
         .tester-access-card strong, .tester-message header strong, .tester-message p) {
  color: var(--stone-ink);
}

body :is(.admin-kicker, .admin-card-head span, .admin-client-hero > div:first-child > span,
         .admin-card-head > a, .admin-auth-back, .admin-auth-recovery, .admin-setup-note a,
         .admin-table-wrap td a, .admin-profile-list a, .admin-profile-list span,
         .tester-access-card span, .tester-ticket-list span:not(.tester-ticket-status), .tester-checklist-summary span,
         .tester-check-copy span) {
  color: var(--stone-accent);
}

body :is(.admin-topbar small, .admin-identity p, .admin-client-id small, .admin-metric small,
         .admin-metric span, .admin-card-head p, .admin-daily span, .admin-table-wrap th,
         .admin-table-wrap td small, .admin-table-wrap td p, .admin-form label, .admin-client-hero p,
         .admin-client-hero > div:last-child small, .admin-diagnostics dt, .admin-profile-list p,
         .admin-health-pills b, .admin-auth-card > p, .admin-auth-form small, .admin-password-form small,
         .admin-password-note, .admin-form-note, .admin-empty-note, .tester-access-card small,
         .tester-card-head p, .tester-message header time, .tester-form label, .tester-ticket-list small,
         .tester-empty, .tester-ticket-note, .tester-checklist-summary small, .tester-check-copy p,
         .tester-check-status, .tester-check-note) {
  color: var(--stone-muted);
}

body :is(.admin-search, .admin-form, .admin-inline-form, .admin-auth-form, .tester-form,
         .tester-check-status, .tester-check-note) :is(input, select, textarea) {
  background: var(--portal-field);
  border-color: var(--portal-rule);
  color: var(--stone-ink);
}

body :is(.admin-search button, .admin-form button, .admin-inline-form button,
         .admin-auth-form button, .admin-logout-form button) {
  background: var(--stone-accent);
  border-color: var(--stone-accent);
  color: var(--portal-on-accent);
}

body :is(.admin-topbar nav a, .admin-card-actions a, .admin-role) {
  background: var(--stone-panel);
  border-color: var(--portal-rule);
  color: var(--stone-accent);
}

body .admin-topbar nav a:is(.is-active, :hover) {
  background: var(--portal-selected);
  border-color: var(--stone-accent);
}

body .tester-progress span {
  background: var(--stone-accent);
}

body :is(.admin-status, .tester-ticket-status) {
  background: var(--portal-selected);
  color: var(--stone-ink);
}

body :is(.admin-status--issue, .admin-status--check-no) {
  background: #f3ded9;
  color: #802f2d;
}

body :is(.admin-status--priority, .admin-status--check-note, .admin-status--premium,
         .tester-ticket-status--waiting_client) {
  background: #f1e3bd;
  color: #624a16;
}

body :is(.admin-status--check-yes, .admin-status--full_test,
         .tester-ticket-status--resolved, .tester-ticket-status--closed) {
  background: var(--portal-selected);
  color: var(--success);
}


/* VIZIT ONE | editor contrast R1 */
.profile-form[data-profile-form] [data-voice-studio] {
  --voice-editor-ink: #263630;
  --voice-editor-muted: #43564d;
  --voice-editor-accent: #17584d;
  --voice-editor-line: #687970;
  --voice-editor-field: #faf6ed;
  color: var(--voice-editor-ink);
}

.profile-form[data-profile-form] [data-voice-studio] :is(.voice-studio__head p, .voice-timer, .voice-suggestion, .voice-playback, label),
.profile-form[data-profile-form] [data-voice-studio] > small {
  color: var(--voice-editor-muted);
}

.profile-form[data-profile-form] [data-voice-studio] :is(.voice-studio__head .eyebrow, [data-voice-status]) {
  color: var(--voice-editor-accent);
}

.profile-form[data-profile-form] [data-voice-studio] [data-voice-status]:is([data-state="error"], [data-state="recording"]) {
  color: #862e2b;
}

.profile-form[data-profile-form] [data-voice-studio] [data-voice-status][data-state="paused"] {
  color: #6c4716;
}

.profile-form[data-profile-form] [data-voice-studio] textarea[data-voice-brief] {
  background: var(--voice-editor-field);
  border-color: var(--voice-editor-line);
  color: var(--voice-editor-ink);
  caret-color: var(--voice-editor-ink);
}

.profile-form[data-profile-form] [data-voice-studio] textarea[data-voice-brief]::placeholder {
  color: var(--voice-editor-muted);
  opacity: 1;
}

.profile-form[data-profile-form] [data-voice-studio] .button--quiet {
  background: #e4ebe1;
  border-color: var(--voice-editor-line);
  color: var(--voice-editor-ink);
  text-shadow: none;
}

.profile-form[data-profile-form] [data-voice-studio] .button--quiet:hover:enabled {
  background: #d4e4d7;
  color: var(--voice-editor-accent);
}

.profile-form[data-profile-form] [data-voice-studio] .button--quiet:disabled {
  background: #e8e5dc;
  color: var(--voice-editor-muted);
  opacity: 1;
}

.profile-form[data-profile-form] [data-voice-studio] .voice-record {
  background: linear-gradient(145deg, #775111, #4d3516);
  color: #fffdf6;
}

.profile-form[data-profile-form] [data-voice-studio] .voice-record.is-recording:not(.is-paused) {
  background: #862e2b;
}

.profile-form[data-profile-form] [data-voice-studio] :is(button, textarea):focus-visible {
  outline: 2px solid var(--voice-editor-accent);
  outline-offset: 3px;
}

.profile-form[data-profile-form] [data-voice-studio] .voice-visual-preview {
  background: #e4ebe1;
  border-color: var(--voice-editor-line);
}

.profile-form[data-profile-form] [data-voice-studio] .voice-visual-preview__copy :is(strong, span, p, small) {
  color: var(--voice-editor-ink);
}

.profile-form[data-profile-form] [data-voice-studio] [data-voice-accept] {
  background: var(--voice-editor-accent);
  border-color: var(--voice-editor-accent);
  color: #fffdf6;
}

.profile-form[data-profile-form] [data-smart-en-location-preview] {
  color: #17584d;
}

.profile-form[data-profile-form] [data-card-preview][data-style="gold"] > :is(strong, small) {
  width: fit-content;
  padding-inline: .4em;
  border-radius: .25em;
  background: #4d3516;
  color: #fffdf6;
}

/* Strategic partner links are shown in the compact mobile navigation only. */
.site-header nav > .vo-strategic-link {
  display: none;
}

/* VIZIT ONE | mobile header R4 */
@media (max-width: 760px) {
  .site-header {
    padding: 16px 14px;
  }

  .site-header__inner {
    display: block;
    position: relative;
  }

  .site-header .brand {
    padding-right: 64px;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-top: 14px;
    gap: 10px;
  }

  .site-header nav > a:not(.button):not(.language-switch) {
    display: inline-flex;
    align-items: center;
  }

  .site-header nav > .language-switch {
    position: absolute;
    top: 0;
    right: 0;
  }

  .site-header nav > a[href^="/konto/logowanie"] {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .site-header nav > .button {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    white-space: nowrap;
  }

  .site-header nav > a[href="/pozalekcyjnie.php"] {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .site-header nav > .vo-strategic-link--movement {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }

  .site-header nav > .vo-strategic-link--pzs {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
  }

  .site-header nav > a[href^="/konto/logowanie"],
  .site-header nav > a[href="/pozalekcyjnie.php"],
  .site-header nav > .vo-strategic-link {
    min-height: 40px;
    padding: 9px 16px;
    justify-content: center;
    border: 1px solid var(--stone-accent);
    border-radius: 999px;
    background: var(--stone-accent);
    color: var(--portal-on-accent);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .site-header nav > .vo-strategic-link {
    display: inline-flex;
    min-height: 52px;
    padding: 9px 10px;
    font-size: 12px;
    white-space: normal;
  }

  body .site-header nav > a[href^="/konto/logowanie"]:not(.button):not(.language-switch),
  body .site-header nav > a[href="/pozalekcyjnie.php"]:not(.button):not(.language-switch),
  body .site-header nav > .vo-strategic-link:not(.button):not(.language-switch) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 9px 10px !important;
    border: 1px solid var(--stone-accent, #176c5e) !important;
    border-radius: 999px !important;
    background: var(--stone-accent, #176c5e) !important;
    color: #fffdf6;
    -webkit-text-fill-color: #fffdf6;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  }
}
