/* Desktop extension of Brclio's app template and tabs.
 * Design foundation: https://github.com/Brclio/brclio-design-system
 * © 2026 Brclio · CC BY-NC-SA 4.0. Existing project brand variables are reused. */

.desktop-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 25px;
  border-bottom: 1px solid var(--line-strong);
}

.desktop-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.desktop-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 17px;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: var(--ink-light);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
}

.desktop-tab[aria-selected="true"] {
  border-bottom-color: var(--blue);
  color: var(--blue-deep);
  font-weight: 700;
}

.desktop-tab:hover,
.profile-show-more:hover {
  background: var(--cream-deep);
}

.desktop-tab-badge {
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.65rem;
  line-height: 1.8;
}

.desktop-version {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.desktop-update-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.desktop-check-updates {
  min-height: 40px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--blue-deep);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
}

.desktop-check-updates:hover {
  background: var(--cream-deep);
}

.desktop-check-updates:disabled {
  color: var(--ink-faint);
  cursor: default;
}

.desktop-update-panel {
  margin-top: 20px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
}

.desktop-update-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.desktop-update-copy {
  min-width: 0;
}

.desktop-update-copy strong {
  color: var(--blue-deep);
  font-family: var(--font-serif);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.desktop-update-copy p {
  margin-top: 5px;
  color: var(--ink-light);
  font-size: 0.76rem;
  line-height: 1.8;
}

.desktop-update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.desktop-update-actions .button {
  min-height: 42px;
  padding: 9px 15px;
  font-size: 0.75rem;
}

.desktop-update-progress-wrap {
  margin-top: 18px;
}

.desktop-update-progress-wrap progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--cream-deep);
  color: var(--blue);
  accent-color: var(--blue);
}

.desktop-update-progress-wrap progress::-webkit-progress-bar {
  border-radius: 4px;
  background: rgba(43, 127, 216, 0.1);
}

.desktop-update-progress-wrap progress::-webkit-progress-value {
  border-radius: 4px;
  background: var(--blue);
}

.desktop-update-progress-wrap progress::-moz-progress-bar {
  border-radius: 4px;
  background: var(--blue);
}

.desktop-update-progress-wrap p,
.desktop-update-installation-hint {
  margin-top: 8px;
  color: var(--ink-light);
  font-size: 0.73rem;
  line-height: 1.85;
}

.desktop-update-progress-wrap p {
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.desktop-update-check-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--cream-deep);
  color: var(--blue-deep);
  font-size: 0.78rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.desktop-update-error {
  margin-top: 12px;
  color: var(--red-deep);
  font-size: 0.78rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.desktop-update-notes-details {
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.desktop-update-notes-details summary {
  min-height: 32px;
  padding: 4px 0;
  color: var(--ink-light);
  cursor: pointer;
  font-size: 0.75rem;
}

.desktop-update-notes-details summary::marker {
  color: var(--blue-deep);
}

.desktop-update-notes-details summary:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
}

.desktop-update-notes-details p {
  max-height: 230px;
  overflow-y: auto;
  margin-top: 7px;
  color: var(--ink-light);
  font-size: 0.76rem;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-panel {
  padding: clamp(30px, 4vw, 48px) 0 28px;
}

.profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.profile-heading h1 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.5;
}

.profile-heading p {
  margin-top: 7px;
  color: var(--ink-light);
  font-size: 0.83rem;
}

.profile-heading > .button {
  flex-shrink: 0;
}

#profile-login {
  min-width: 0;
  max-width: min(100%, 360px);
}

.profile-login-label {
  display: block;
  min-width: 0;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-login-icon {
  flex-shrink: 0;
}

#profile-login[data-login-status="logged-in"] {
  color: var(--blue-deep);
  border-color: var(--blue-deep);
  background: rgba(43, 127, 216, 0.05);
}

.profile-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
}

.profile-form {
  display: grid;
  gap: 23px;
  min-width: 0;
  padding: clamp(22px, 2.8vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: 16px 16px 20px 16px;
  background: var(--paper);
}

.profile-field {
  min-width: 0;
}

.profile-field > label,
.profile-timing legend {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--cream);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.6;
}

.profile-field input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.profile-field input:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
}

.profile-field input:disabled {
  color: var(--ink-faint);
  background: var(--cream-deep);
  cursor: not-allowed;
}

.profile-hint {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 0.73rem;
  line-height: 1.85;
}

.profile-directory-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
}

.profile-directory-row > .button {
  flex-shrink: 0;
  min-height: 46px;
  padding-right: 13px;
  padding-left: 13px;
}

.profile-timing {
  min-width: 0;
  margin: 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.profile-timing legend {
  padding-right: 12px;
  margin-bottom: 0;
}

.profile-timing-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.profile-timing-fields label {
  color: var(--ink-light);
  font-size: 0.74rem;
  font-weight: 500;
}

.profile-number-input {
  position: relative;
}

.profile-number-input input {
  padding-right: 60px;
}

.profile-number-input span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--ink-faint);
  font-size: 0.72rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.profile-start {
  width: 100%;
  justify-content: space-between;
}

.profile-scope-note {
  margin-top: -9px;
  color: var(--ink-light);
  font-size: 0.72rem;
  line-height: 1.9;
}

.profile-error {
  padding: 12px 14px;
  border: 1px solid var(--red-deep);
  border-radius: 8px;
  color: var(--red-deep);
  background: rgba(232, 74, 95, 0.04);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.profile-job {
  min-width: 0;
  padding-top: 4px;
}

.profile-job-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-job-heading h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.profile-status {
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--blue-deep);
  background: rgba(43, 127, 216, 0.09);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.profile-status[data-status="paused"],
.profile-status[data-status="cancelled"] {
  color: var(--ink);
  background: rgba(244, 215, 88, 0.4);
}

.profile-status[data-status="error"],
.profile-status[data-status="partial"] {
  color: var(--red-deep);
  background: rgba(232, 74, 95, 0.08);
}

.profile-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 28px 0 22px;
}

.profile-counts div {
  min-width: 0;
}

.profile-counts dt {
  color: var(--ink-light);
  font-size: 0.72rem;
}

.profile-counts dd {
  margin: 2px 0 0;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.7vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#profile-failed[data-has-failures="true"] {
  color: var(--red-deep);
}

.profile-progress-wrap progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--cream-deep);
  color: var(--blue);
  accent-color: var(--blue);
}

.profile-progress-wrap progress::-webkit-progress-bar {
  border-radius: 4px;
  background: rgba(43, 127, 216, 0.1);
}

.profile-progress-wrap progress::-webkit-progress-value {
  border-radius: 4px;
  background: var(--blue);
}

.profile-progress-wrap progress::-moz-progress-bar {
  border-radius: 4px;
  background: var(--blue);
}

.profile-job-message {
  margin-top: 23px;
  overflow-wrap: anywhere;
}

.profile-job-message strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.9;
}

.profile-job-message p,
.profile-countdown {
  margin-top: 8px;
  color: var(--ink-light);
  font-size: 0.75rem;
  line-height: 1.8;
}

.profile-countdown {
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}

.profile-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.profile-controls .button {
  min-height: 42px;
  padding: 9px 13px;
  font-size: 0.74rem;
}

.profile-items-details {
  margin-top: 26px;
  padding-top: 17px;
  border-top: 1px solid var(--line-strong);
}

.profile-items-details summary {
  padding: 5px 0;
  color: var(--ink-light);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.profile-items-details summary:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
}

.profile-items-details summary::marker {
  color: var(--blue-deep);
}

.profile-items-details summary span {
  margin-left: 7px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.profile-item-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-item-filter {
  min-height: 35px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-light);
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.73rem;
}

.profile-item-filter:hover {
  background: var(--cream-deep);
}

.profile-item-filter[aria-pressed="true"] {
  border-color: var(--blue-deep);
  color: var(--blue-deep);
  background: rgba(43, 127, 216, 0.06);
}

.profile-items {
  display: grid;
  gap: 0;
  max-height: 370px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.profile-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 12px;
  padding: 12px 3px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  line-height: 1.7;
}

.profile-item-title {
  overflow-wrap: anywhere;
}

.profile-item-status {
  color: var(--blue-deep);
  font-size: 0.68rem;
  white-space: nowrap;
}

.profile-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.profile-item-retry {
  min-width: 46px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--blue-deep);
  border-radius: 5px;
  color: var(--blue-deep);
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.73rem;
}

.profile-item-retry:hover:not(:disabled) {
  background: rgba(43, 127, 216, 0.06);
}

.profile-item-retry:disabled {
  border-color: var(--line-strong);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.profile-item-directory {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.profile-item-error {
  grid-column: 1 / -1;
  color: var(--red-deep);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.profile-item[data-status="failed"] .profile-item-status {
  color: var(--red-deep);
}

.profile-show-more {
  min-height: 38px;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue-deep);
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
}

body.is-desktop .hero {
  min-height: 0;
  padding-top: 50px;
  padding-bottom: 55px;
}

body.is-desktop .hero-copy h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

body.is-desktop .site-visits {
  display: none;
}

@media (max-width: 900px) {
  .profile-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .profile-heading {
    align-items: flex-start;
  }

  .profile-job {
    padding: 0 3px;
  }
}

@media (max-width: 600px) {
  .desktop-navigation {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
  }

  .desktop-tabs {
    order: 2;
    width: 100%;
  }

  .desktop-tab {
    flex: 1;
    padding-right: 9px;
    padding-left: 9px;
    font-size: 0.8rem;
  }

  .desktop-update-tools {
    width: 100%;
  }

  .desktop-update-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .desktop-update-actions {
    width: 100%;
  }

  .desktop-update-actions .button {
    flex-grow: 1;
  }

  .profile-heading {
    flex-direction: column;
    gap: 16px;
  }

  .profile-heading > .button {
    width: 100%;
  }

  .profile-directory-row {
    flex-wrap: wrap;
  }

  .profile-directory-row > .button {
    width: 100%;
  }

  .profile-timing-fields {
    gap: 10px;
  }
}

/* Dedicated desktop workspace. Based on Brclio template-app: fixed navigation,
   warm paper, compact type, and separate scroll areas. Web styles stay intact. */
html:has(body.is-desktop) { height: 100%; overflow: hidden; scroll-behavior: auto; }
body.is-desktop { height: 100vh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--cream); background-image: none; }
body.is-desktop .app-header { position: relative; height: 66px; flex: 0 0 66px; background: var(--paper); }
body.is-desktop .app-header-inner { width: 100%; max-width: none; height: 100%; margin: 0; padding: 0 25px; }
body.is-desktop .app-header .app-navigation { display: none; }
body.is-desktop .app-header .brand-logo { width: 34px; height: 34px; box-shadow: none; transform: none; }
body.is-desktop .app-header .brand:hover .brand-logo { box-shadow: none; transform: none; }
body.is-desktop .app-header .brand-copy strong { font-size: .86rem; }
body.is-desktop .app-header .brand-copy small { margin-top: 3px; font-size: .55rem; }
body.is-desktop .header-status { font-size: .7rem; }
body.is-desktop .page-shell { display: flex; flex: 1; width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; }
body.is-desktop .page-shell::before { display: none; }
body.is-desktop .page-shell > main { display: grid; grid-template-columns: 212px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); width: 100%; min-height: 0; }
body.is-desktop .page-shell > footer, body.is-desktop #support, body.is-desktop .site-visits, body.is-desktop .design-system-signature { display: none; }
body.is-desktop .desktop-navigation { grid-column: 1; grid-row: 1; min-height: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 22px; padding: 27px 15px 18px; border: 0; border-right: 1px solid var(--line); background: #faf7ef; overflow: auto; }
body.is-desktop .desktop-nav-heading { padding: 0 12px 4px; }
body.is-desktop .desktop-nav-heading .section-label { font-size: .57rem; letter-spacing: .12em; }
body.is-desktop .desktop-nav-heading strong { display: block; margin-top: 6px; font-family: var(--font-serif); font-size: 1.05rem; }
body.is-desktop .desktop-tabs { flex-direction: column; gap: 7px; }
body.is-desktop .desktop-tab { justify-content: flex-start; gap: 10px; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 7px; margin: 0; font-size: .81rem; text-align: left; }
body.is-desktop .desktop-tab[aria-selected="true"] { background: #e5eef9; color: var(--blue-deep); border-color: #c9daf0; }
body.is-desktop .desktop-tab:hover { background: #eee9df; }
body.is-desktop .desktop-tab[aria-selected="true"]:hover { background: #e5eef9; }
body.is-desktop .desktop-nav-icon { display: grid; width: 19px; place-items: center; font-size: 1.18rem; line-height: 1; }
body.is-desktop .desktop-nav-count { margin-left: auto; padding: 2px 5px; border-radius: 4px; background: #e9e1c6; color: #6c5f2d; font-size: .58rem; line-height: 1.55; font-weight: 600; white-space: nowrap; }
body.is-desktop .desktop-new-badge { background: var(--yellow); color: var(--ink); }
body.is-desktop .desktop-sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 17px; }
body.is-desktop .desktop-account-shortcut { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; }
body.is-desktop .desktop-account-shortcut > span:last-child { min-width: 0; }
body.is-desktop .desktop-account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 7px; color: var(--blue-deep); background: #e5eaf0; font-family: var(--font-serif); font-weight: 700; }
body.is-desktop .desktop-account-shortcut strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .71rem; font-weight: 600; }
body.is-desktop .desktop-account-shortcut small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: .62rem; }
body.is-desktop .desktop-account-shortcut:hover strong { text-decoration: underline; text-underline-offset: 3px; }
body.is-desktop .desktop-update-tools { justify-content: flex-start; margin-top: 18px; padding-left: 5px; }
body.is-desktop .desktop-version { font-size: .62rem; }
body.is-desktop .desktop-design-credit { display: inline-block; margin: 5px 0 0 5px; color: var(--ink-faint); text-decoration: none; font-size: .59rem; }
body.is-desktop .desktop-design-credit:hover { text-decoration: underline; }
body.is-desktop .desktop-page { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; padding: clamp(22px, 3vw, 38px); outline-offset: -4px; scrollbar-gutter: stable; }
body.is-desktop .desktop-page-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 28px; }
body.is-desktop .desktop-page-heading h1 { margin: 7px 0; font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.5; }
body.is-desktop .desktop-page-heading p { margin-top: 7px; color: var(--ink-light); font-size: .81rem; line-height: 1.8; }
body.is-desktop .desktop-page .section-label { font-size: .6rem; letter-spacing: .09em; }
body.is-desktop .desktop-page .button { min-height: 40px; padding: 9px 15px; box-shadow: none; font-size: .77rem; border-radius: 7px; }
body.is-desktop .desktop-page .button:hover { box-shadow: none; }
body.is-desktop .desktop-pill { display: inline-block; padding: 4px 9px; border-radius: 5px; color: var(--ink-light); background: #f0ead9; font-size: .68rem; white-space: nowrap; }
body.is-desktop .desktop-field-help { color: var(--ink-faint); font-size: .73rem; line-height: 1.8; }
body.is-desktop .desktop-text-button { min-height: 32px; padding: 5px 0; border: 0; color: var(--blue-deep); background: transparent; text-align: left; font: inherit; font-size: .78rem; cursor: pointer; }
body.is-desktop .desktop-text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
body.is-desktop .desktop-update-announcement { padding: 13px; border: 1px solid #e4d799; border-radius: 7px; background: #faf3d8; }
body.is-desktop .desktop-update-announcement strong { display: block; color: #685627; font-size: .76rem; overflow-wrap: anywhere; }
body.is-desktop .desktop-update-announcement p { margin-top: 6px; color: var(--ink-light); font-size: .68rem; line-height: 1.8; }
body.is-desktop .desktop-update-announcement > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
body.is-desktop .desktop-update-announcement button { min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--blue-deep); font: inherit; font-size: .67rem; cursor: pointer; }
body.is-desktop .desktop-update-announcement button:hover { text-decoration: underline; }
/* Profile: configuration and task records remain visible beside each other. */
body.is-desktop .profile-heading { gap: 18px; margin-bottom: 24px; }
body.is-desktop .profile-heading h1 { margin-top: 7px; font-size: 1.2rem; }
body.is-desktop .profile-heading p { font-size: .78rem; }
body.is-desktop .profile-workspace { grid-template-columns: minmax(270px, .8fr) minmax(0, 1.2fr); gap: 26px; }
body.is-desktop .profile-form { padding: 21px; gap: 18px; border-color: var(--line); border-radius: 9px; box-shadow: none; }
body.is-desktop .profile-field input { min-height: 42px; border-width: 1px; border-radius: 6px; }
body.is-desktop .profile-field > label, body.is-desktop .profile-timing legend { font-size: .76rem; }
body.is-desktop .profile-hint, body.is-desktop .profile-scope-note { font-size: .68rem; line-height: 1.8; }
body.is-desktop .profile-timing { padding-top: 12px; }
body.is-desktop .profile-timing-fields { gap: 12px; }
body.is-desktop .profile-heading #profile-login { max-width: 280px; }
body.is-desktop .profile-heading #profile-login .profile-login-label { font-size: .72rem; }
body.is-desktop .profile-job { padding: 0; }
body.is-desktop .profile-job-heading h2 { font-size: 1.05rem; }
body.is-desktop .profile-stats { margin: 18px 0; padding: 15px 0; }
body.is-desktop .profile-stats dd { font-size: 1.8rem; }
body.is-desktop .profile-job-message { margin-top: 17px; }
body.is-desktop .profile-job-message strong { font-size: .76rem; }
body.is-desktop .profile-controls { margin-top: 15px; gap: 7px; }
body.is-desktop .profile-controls .button { min-height: 35px; padding: 7px 10px; font-size: .67rem; }
body.is-desktop .profile-items-details { margin-top: 20px; padding-top: 12px; }
body.is-desktop .profile-items { max-height: clamp(230px, 36vh, 500px); border-top: 1px solid var(--line); }
body.is-desktop .profile-item { padding: 12px 2px; }
body.is-desktop .profile-item-title { font-size: .73rem; font-weight: 500; }
body.is-desktop .profile-item-filter { min-height: 31px; font-size: .68rem; }
/* Single note: compact workbench with results below, never the web landing page. */
body.is-desktop #single-note-panel .hero { display: block; min-height: 0; padding: 0; }
body.is-desktop #single-note-panel .hero-copy { max-width: none; margin-bottom: 22px; }
body.is-desktop #single-note-panel .hero-copy h1 { margin-top: 6px; font-size: 1.2rem; line-height: 1.5; }
body.is-desktop #single-note-panel .hero-copy p { max-width: none; margin-top: 9px; font-size: .81rem; line-height: 1.8; }
body.is-desktop #single-note-panel .hero-copy .eyebrow { font-size: .61rem; }
body.is-desktop #single-note-panel .hero-index { display: none; }
body.is-desktop #single-note-panel .parse-card { max-width: none; padding: 22px 25px; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; }
body.is-desktop #single-note-panel .parse-card::before, body.is-desktop #single-note-panel .parse-card::after, body.is-desktop #single-note-panel .panel-step { display: none; }
body.is-desktop #single-note-panel .parse-card .panel-heading { margin-bottom: 17px; }
body.is-desktop #single-note-panel .parse-card .panel-heading h2 { font-size: 1rem; }
body.is-desktop #single-note-panel .parse-card .panel-kicker { font-size: .58rem; }
body.is-desktop #single-note-panel textarea { min-height: 115px; padding: 12px; border-width: 1px; border-radius: 6px; font-size: .81rem; }
body.is-desktop #single-note-panel .engine-picker { margin-top: 18px; }
body.is-desktop #single-note-panel .engine-option > span { padding: 11px 13px 11px 39px; border-width: 1px; border-radius: 6px; }
body.is-desktop #single-note-panel .form-actions { margin-top: 17px; }
body.is-desktop #single-note-panel .form-note { margin-top: 17px; padding-top: 14px; }
body.is-desktop #single-note-panel .empty-state { grid-template-columns: 1fr auto; min-height: 0; gap: 20px; margin: 24px 0 0; padding: 24px 0; border: 0; box-shadow: none; background: transparent; }
body.is-desktop #single-note-panel .empty-state h2 { font-size: 1rem; }
body.is-desktop #single-note-panel .empty-state p { margin-top: 9px; max-width: 460px; font-size: .75rem; }
body.is-desktop #single-note-panel .empty-index { font-size: .6rem; }
body.is-desktop #single-note-panel .system-flow { gap: 10px; }
body.is-desktop #single-note-panel .flow-step { min-width: 70px; padding: 10px; }
body.is-desktop #single-note-panel .flow-step > span { font-size: 1rem; }
body.is-desktop #single-note-panel .flow-step strong { font-size: .77rem; }
body.is-desktop #single-note-panel .flow-step small { font-size: .65rem; }
body.is-desktop #single-note-panel .flow-arrow { font-size: .9rem; }
body.is-desktop #single-note-panel .result-section { padding-top: 30px; scroll-margin-top: 15px; }
body.is-desktop #single-note-panel .result-heading h2 { font-size: 1.35rem; }
body.is-desktop #single-note-panel .result-actions { gap: 8px; }
body.is-desktop #single-note-panel .caption-panel { margin: 25px 0; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; }
body.is-desktop #single-note-panel .caption-text { max-height: 180px; overflow: auto; font-size: .81rem; }
body.is-desktop #single-note-panel .video-section { margin: 25px 0; border: 1px solid var(--line); border-radius: 9px; box-shadow: none; }
body.is-desktop #single-note-panel .media-section-heading h3 { font-size: 1.1rem; }
body.is-desktop #single-note-panel .image-grid { gap: 17px; }
body.is-desktop #single-note-panel .image-card { border-width: 1px; border-radius: 9px; box-shadow: none; }
/* Feedback page and diagnostics summary. */
body.is-desktop .desktop-feedback-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(255px, .85fr); gap: 35px; align-items: start; max-width: 1100px; }
body.is-desktop .desktop-feedback-form { display: grid; gap: 18px; min-width: 0; }
body.is-desktop .desktop-feedback-form label { display: grid; gap: 7px; font-size: .79rem; font-weight: 600; }
body.is-desktop .desktop-feedback-form input, body.is-desktop .desktop-feedback-form select, body.is-desktop .desktop-feedback-form textarea { width: 100%; min-width: 0; min-height: 43px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); background: var(--paper); font: inherit; font-size: .84rem; }
body.is-desktop .desktop-feedback-form textarea { min-height: 180px; resize: vertical; line-height: 1.8; }
body.is-desktop .desktop-feedback-form > .desktop-field-help { margin-top: -6px; }
body.is-desktop .desktop-feedback-account-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border: 1px solid #e3d799; border-radius: 6px; background: #faf3d8; font-size: .74rem; }
body.is-desktop .desktop-feedback-account-hint button { padding: 3px 0; border: 0; color: var(--blue-deep); background: transparent; font: inherit; cursor: pointer; }
body.is-desktop .desktop-feedback-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
body.is-desktop .desktop-diagnostics-panel { padding: 24px; border-radius: 9px; background: #f6f1e5; }
body.is-desktop .desktop-diagnostics-panel h2 { margin: 8px 0 12px; font-family: var(--font-serif); font-size: 1.12rem; }
body.is-desktop .desktop-diagnostics-panel > p { color: var(--ink-light); font-size: .76rem; line-height: 1.85; }
body.is-desktop .desktop-diagnostics-facts { margin: 22px 0; border-top: 1px solid var(--line); }
body.is-desktop .desktop-diagnostics-facts > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
body.is-desktop .desktop-diagnostics-facts dt { color: var(--ink-faint); font-size: .7rem; }
body.is-desktop .desktop-diagnostics-facts dd { margin: 4px 0 0; color: var(--ink); font-size: .77rem; line-height: 1.7; overflow-wrap: anywhere; }
body.is-desktop .desktop-diagnostics-actions { display: grid; gap: 10px; margin-top: 19px; }
body.is-desktop .desktop-diagnostics-actions .desktop-text-button { justify-self: start; }
body.is-desktop #desktop-diagnostics-result { margin-top: 14px; overflow-wrap: anywhere; }
body.is-desktop .desktop-feedback-progress-wrap progress { width: 100%; height: 8px; accent-color: var(--blue); }
body.is-desktop .desktop-feedback-progress-wrap p { margin-top: 7px; color: var(--blue-deep); font-size: .75rem; }
body.is-desktop .desktop-feedback-result { padding: 13px 15px; border: 1px solid #c4d7ed; border-radius: 6px; background: #edf4fb; color: var(--blue-deep); font-size: .81rem; line-height: 1.8; overflow-wrap: anywhere; }
body.is-desktop .desktop-feedback-result[data-status="error"] { color: var(--red-deep); background: #fcefeb; border-color: #e7c2c9; }
/* Version dialog: Brclio app-modal structure with a fixed CTA row and a
 * separately scrolling changelog, matching the supplied update-dialog layout. */
.desktop-update-dialog {
  width: min(560px, calc(100vw - 40px));
  height: min(700px, calc(100dvh - 64px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.75 var(--font-sans);
  box-shadow: 0 24px 80px rgba(26, 26, 46, .18);
}
.desktop-update-dialog[open] { display: flex; flex-direction: column; }
.desktop-update-dialog::backdrop { background: rgba(26, 26, 36, .48); }
.desktop-update-dialog-heading {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: clamp(24px, 4vh, 34px) 28px 20px;
  text-align: center;
}
.desktop-update-dialog-heading img { display: block; margin-bottom: 4px; object-fit: contain; }
.desktop-update-dialog-heading h2 { margin: 0; font: 900 1.3rem/1.5 var(--font-serif); }
.desktop-update-dialog-heading p { margin: 0; color: var(--ink-faint); font-size: .91rem; }
.desktop-update-dialog-notes {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 18px 0 28px;
  padding: 0 10px 4px 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 26, 46, .17) transparent;
}
.desktop-update-dialog-notes p { margin: 0 0 16px; white-space: pre-wrap; }
.desktop-update-dialog-notes :is(h3, h4) { margin: 20px 0 10px; font-size: 1rem; line-height: 1.6; }
.desktop-update-dialog-notes > :first-child { margin-top: 0; }
.desktop-update-dialog-notes ul { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 20px; padding: 0; list-style: none; }
.desktop-update-dialog-notes li { position: relative; padding-left: 18px; }
.desktop-update-dialog-notes li::before { position: absolute; top: .68em; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); content: ""; }
.desktop-update-dialog-bottom { flex: 0 0 auto; padding: 18px 28px 26px; }
.desktop-update-dialog-bottom .desktop-update-progress-wrap { margin: 0 0 14px; }
.desktop-update-dialog-bottom .desktop-update-check-note { margin: 0 0 14px; }
.desktop-update-dialog-bottom .desktop-update-error { margin: 0 0 14px; max-height: 74px; overflow-y: auto; font-size: .8rem; }
.desktop-update-dialog-actions { display: flex; gap: 12px; }
.desktop-update-dialog-actions button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 .95rem/1.5 var(--font-sans);
  cursor: pointer;
}
.desktop-update-dialog-secondary { background: var(--paper); color: var(--ink); }
.desktop-update-dialog-secondary:hover { background: var(--cream-deep); }
.desktop-update-dialog-actions .desktop-update-dialog-primary { border-color: var(--ink); background: var(--ink); color: var(--cream); }
.desktop-update-dialog-actions .desktop-update-dialog-primary:hover { border-color: var(--blue-deep); background: var(--blue-deep); }
.desktop-update-dialog-actions button:disabled { cursor: wait; opacity: .55; }
.desktop-update-dialog-actions button:focus-visible,
.desktop-update-dialog-notes:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
@media (max-width: 600px) {
  .desktop-update-dialog { width: calc(100vw - 24px); height: min(700px, calc(100dvh - 32px)); border-radius: 18px; font-size: .9rem; }
  .desktop-update-dialog-heading { padding: 22px 20px 16px; }
  .desktop-update-dialog-heading img { width: 48px; height: 48px; }
  .desktop-update-dialog-notes { margin-left: 20px; margin-right: 12px; padding-right: 8px; }
  .desktop-update-dialog-bottom { padding: 16px 20px 20px; }
  .desktop-update-dialog-actions { gap: 8px; }
  .desktop-update-dialog-actions button { min-height: 46px; padding-inline: 10px; font-size: .88rem; }
}
@media (max-height: 540px) {
  .desktop-update-dialog { height: calc(100dvh - 24px); }
  .desktop-update-dialog-heading { padding: 12px 20px; gap: 2px; }
  .desktop-update-dialog-heading img { width: 32px; height: 32px; }
  .desktop-update-dialog-bottom { padding-top: 10px; padding-bottom: 12px; }
}

/* Installation approval reuses the Brclio modal, with a shorter task summary. */
.desktop-install-dialog { width: min(520px, calc(100vw - 40px)); height: fit-content; max-height: calc(100dvh - 40px); }
.desktop-install-heading { padding: 28px 28px 22px; gap: 7px; }
.desktop-install-heading h2 { font-size: 1.25rem; }
.desktop-install-heading .desktop-install-version { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 3px; font-size: .9rem; }
.desktop-install-version strong { color: var(--blue-deep); font-weight: 700; }
.desktop-install-version-arrow { color: var(--ink-faint); }
.desktop-install-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 2px; scrollbar-width: thin; }
.desktop-install-steps { display: flex; flex-direction: column; gap: 20px; margin: 0; padding: 0; list-style: none; }
.desktop-install-steps li { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.desktop-install-step-number { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; background: #edf4fb; color: var(--blue-deep); font-size: .76rem; font-weight: 700; }
.desktop-install-steps strong { display: block; font-size: .93rem; font-weight: 700; line-height: 1.65; }
.desktop-install-steps p { margin: 3px 0 0; color: var(--ink-faint); font-size: .83rem; line-height: 1.75; overflow-wrap: anywhere; }
.desktop-install-details { margin-top: 24px; border-top: 1px solid var(--line); font-size: .78rem; }
.desktop-install-details summary { display: flex; align-items: center; gap: 8px; padding: 15px 0 5px; color: var(--ink); cursor: pointer; list-style: none; }
.desktop-install-details summary::-webkit-details-marker { display: none; }
.desktop-install-details summary::before { content: "›"; display: inline-block; width: 10px; color: var(--blue-deep); font-size: 1.1rem; line-height: 1; transition: transform .16s ease; }
.desktop-install-details[open] summary::before { transform: rotate(90deg); }
.desktop-install-details summary span { margin-left: auto; color: var(--ink-faint); font-size: .73rem; }
.desktop-install-details summary:hover { color: var(--blue-deep); }
.desktop-install-details summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.desktop-install-details p { margin: 8px 0 0; color: var(--ink-faint); font-size: .76rem; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-wrap; }
.desktop-install-bottom { padding-top: 22px; }
@media (max-width: 600px) {
  .desktop-install-dialog { width: calc(100vw - 24px); height: fit-content; max-height: calc(100dvh - 32px); }
  .desktop-install-heading { padding: 24px 22px 20px; }
  .desktop-install-body { padding-inline: 22px; }
  .desktop-install-steps { gap: 18px; }
  .desktop-install-steps li { gap: 11px; }
  .desktop-install-steps p { font-size: .8rem; }
  .desktop-install-bottom { padding: 20px 22px 22px; }
}
@media (max-height: 540px) {
  .desktop-install-heading { padding: 15px 20px 14px; gap: 3px; }
  .desktop-install-heading img { width: 32px; height: 32px; }
  .desktop-install-body { padding-inline: 20px; }
  .desktop-install-steps { gap: 12px; }
  .desktop-install-details { margin-top: 16px; }
  .desktop-install-bottom { padding: 14px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-install-details summary::before { transition: none; }
}

/* About page retains the existing updater controls and progress IDs. */
body.is-desktop #desktop-about-page { max-width: none; }
body.is-desktop .desktop-about-identity { display: flex; align-items: center; gap: 22px; padding: 25px 0 30px; border-bottom: 1px solid var(--line); }
body.is-desktop .desktop-about-identity img { flex-shrink: 0; width: 70px; height: 70px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
body.is-desktop .desktop-about-identity strong { font-family: var(--font-serif); font-size: 1.15rem; }
body.is-desktop .desktop-about-identity p { margin: 5px 0 9px; color: var(--ink-faint); font-size: .79rem; }
body.is-desktop .desktop-check-updates { min-height: 40px; padding: 8px 15px; border: 1px solid var(--blue-deep); border-radius: 7px; background: var(--blue-deep); color: var(--cream); font-size: .77rem; }
body.is-desktop .desktop-check-updates:hover { background: var(--blue); }
body.is-desktop .desktop-check-updates:disabled { color: var(--cream); opacity: .55; }
body.is-desktop .desktop-update-panel { margin: 26px 0; border-color: var(--line); border-radius: 8px; }
body.is-desktop .desktop-about-details { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; margin-top: 31px; padding-bottom: 20px; }
body.is-desktop .desktop-about-details h2 { margin-bottom: 12px; font-family: var(--font-serif); font-size: 1.03rem; }
body.is-desktop .desktop-about-details p { margin-top: 10px; color: var(--ink-light); font-size: .8rem; line-height: 1.85; }
body.is-desktop .desktop-about-links { display: flex; flex-direction: column; align-items: start; gap: 8px; margin-top: 18px; }
body.is-desktop .desktop-about-links a { color: var(--blue-deep); font-size: .75rem; text-decoration: none; }
body.is-desktop .desktop-about-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
body.is-desktop .toast { z-index: 300; max-width: min(460px, calc(100vw - 30px)); }
@media (max-width: 1100px) {
  body.is-desktop .page-shell > main { grid-template-columns: 190px minmax(0, 1fr); }
  body.is-desktop .desktop-navigation { padding-inline: 11px; }
  body.is-desktop .desktop-page { padding: 24px; }
  body.is-desktop .profile-workspace { grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr); gap: 20px; }
  body.is-desktop .profile-form { padding: 17px; }
  body.is-desktop .profile-heading { align-items: flex-start; }
  body.is-desktop .profile-heading p { max-width: 330px; }
  body.is-desktop .desktop-feedback-layout { grid-template-columns: minmax(0, 1fr) minmax(230px, .8fr); gap: 22px; }
}
@media (max-width: 900px) {
  body.is-desktop .profile-workspace, body.is-desktop .desktop-feedback-layout { grid-template-columns: minmax(0, 1fr); }
  body.is-desktop .profile-form { max-width: none; }
  body.is-desktop .profile-heading { flex-direction: column; gap: 15px; }
  body.is-desktop .profile-heading > .button { align-self: flex-start; }
  body.is-desktop .profile-job { padding-top: 10px; }
  body.is-desktop .desktop-about-details { grid-template-columns: 1fr; gap: 28px; }
  body.is-desktop #single-note-panel .empty-state { grid-template-columns: 1fr; }
  body.is-desktop #single-note-panel .system-flow { justify-content: flex-start; }
}
@media (max-width: 600px) {
  body.is-desktop .app-header { height: 58px; flex-basis: 58px; }
  body.is-desktop .app-header-inner { padding: 0 15px; }
  body.is-desktop .app-header .brand-copy strong { font-size: .76rem; }
  body.is-desktop .app-header .brand-logo { width: 29px; height: 29px; }
  body.is-desktop .header-status { font-size: .58rem; gap: 5px; }
  body.is-desktop .page-shell > main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  body.is-desktop .desktop-navigation { grid-column: 1; grid-row: 1; display: block; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  body.is-desktop .desktop-nav-heading, body.is-desktop .desktop-sidebar-bottom { display: none; }
  body.is-desktop .desktop-tabs { display: flex; flex-direction: row; width: 100%; gap: 3px; overflow-x: auto; }
  body.is-desktop .desktop-tab { flex: 0 0 auto; min-height: 41px; padding: 8px 10px; gap: 6px; font-size: .72rem; }
  body.is-desktop .desktop-nav-icon { width: 15px; font-size: .95rem; }
  body.is-desktop .desktop-nav-count { font-size: .55rem; }
  body.is-desktop .desktop-page { grid-column: 1; grid-row: 2; padding: 22px 17px; }
  body.is-desktop .desktop-page-heading { flex-wrap: wrap; gap: 13px; }
  body.is-desktop .desktop-page-heading p { font-size: .76rem; }
  body.is-desktop .desktop-update-announcement { margin-top: 8px; padding: 10px 12px; }
  body.is-desktop .desktop-update-announcement p { display: inline; }
  body.is-desktop .desktop-update-announcement > div { display: inline-flex; gap: 15px; margin-left: 10px; }
  body.is-desktop .desktop-about-identity { gap: 16px; }
  body.is-desktop .desktop-about-identity img { width: 57px; height: 57px; border-radius: 12px; }
  body.is-desktop .desktop-about-identity strong { font-size: 1.02rem; }
  body.is-desktop .profile-heading #profile-login { width: auto; }
  body.is-desktop .profile-directory-row { flex-wrap: nowrap; }
  body.is-desktop .profile-directory-row > .button { width: auto; padding-inline: 10px; }
  body.is-desktop #single-note-panel .parse-card { padding: 18px; }
  body.is-desktop #single-note-panel .form-actions .button-primary { width: auto; flex: 1; }
  body.is-desktop #single-note-panel .form-actions .button-secondary { width: auto; }
  body.is-desktop .desktop-diagnostics-panel { padding: 20px; }
}
