/* Practice workspace follows the desktop 025 layout, with viewport-sized scroll regions. */
.desktop-workspace {
  --bg: #030a12; --bg-2: #04101b; --panel: rgba(7,22,35,.94);
  --panel-solid: #04111c; --panel-soft: rgba(9,38,55,.72);
  --line: rgba(93,188,235,.26); --text: #f2f8ff; --muted: #9bb1c4;
  --cyan: #33dbff; --violet: #a46cff;
  height: 100vh; height: 100dvh; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;background:var(--panel-soft);
  container: practice / inline-size;
}
.desktop-workspace .practice-topbar { position: relative; flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; min-height: 68px; padding: 10px 18px;background:var(--panel-soft); }
.desktop-workspace .brand { min-width: 0; }
.desktop-workspace .brand > span { display: flex; align-items: baseline; gap: 12px; }
.desktop-workspace .brand small { font-size: .9rem; letter-spacing: 0; text-transform: none; }
.desktop-workspace .top-actions { flex-wrap: wrap; }
.desktop-workspace .secondary-button { border-radius: 8px; font-weight: 500;color:var(--text);background:var(--panel-soft); }
.desktop-workspace .primary-button { border-radius: 8px; color: white;background:var(--panel-soft); font-size: .85rem; letter-spacing: .02em; }
.practice-layout { display: grid; grid-template-columns: clamp(200px,18%,280px) minmax(0,1fr); flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.desktop-workspace .phase-rail { position: static; display: flex; flex-direction: column; gap: 0; min-height: 0; margin: 0; padding: 24px 12px; overflow-y: auto; overflow-x: hidden; border: 0; border-right: 1px solid var(--line); border-radius: 0;background:var(--panel-soft); }
.desktop-workspace .phase-rail > * { flex-shrink: 0; }
.practice-label { padding: 0 10px 20px; margin-bottom: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.practice-label b, .practice-label small { display: block; }
.practice-label b { font-size: 1rem; text-transform: uppercase; }
.practice-label small { margin-top: 6px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.desktop-workspace .phase-button { grid-template-columns: 24px minmax(0,1fr); min-height: 56px; width: 100%; min-width: 0; border-radius: 0; padding: 12px 4px; border: 0; }
.desktop-workspace .phase-number { width: auto; height: auto; background: transparent; font-size: .65rem; color: var(--muted); font-weight: 400; }
.desktop-workspace .phase-button small { font-size: .75rem; }
.desktop-workspace .phase-button.done small {color:var(--text); }
.desktop-workspace .phase-button.active {background:var(--panel-soft); }
.sidebar-signature { margin-top: auto; padding: 24px 10px 4px; color: var(--violet); font-size: .72rem; }
.practice-scroll { min-width: 0; min-height: 0; overflow-y: auto; padding: 24px clamp(18px,4vw,74px); scroll-padding-block: 18px; }
.practice-heading { margin-bottom: 20px; }
.practice-heading h1 { font-size: 1.4rem; margin: 0 0 5px; }
.practice-heading p { color: var(--muted); font-size: .8rem; margin: 0; }
.practice-columns { display: grid; grid-template-columns: minmax(0,1fr) clamp(200px,20%,280px); gap: 24px; }
.desktop-workspace .phase-card, .practice-core { min-width: 0; min-height: 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px;background:var(--panel-soft); box-shadow: none; }
.desktop-workspace .form-subsection { padding: 0; border: 0; border-radius: 0; background: transparent; }
.desktop-workspace .form-subsection h3 { font-size: .7rem; color: var(--muted); }
.desktop-workspace .form-grid { gap: 12px 18px; }
.desktop-workspace .field { min-width: 0; }
.desktop-workspace .field label { font-size: .75rem; font-weight: 400; }
.desktop-workspace .control { min-width: 0; max-width: 100%; border-radius: 8px;background:var(--panel-soft); font-size: .78rem; min-height: 42px; }
.practice-core { text-align: center; }
.web-progress-orbit { display: grid; align-content: center; width: 154px; height: 154px; margin: 0 auto 18px;border:1px solid var(--line); border-right-color: #a46cff; border-radius: 50%;background:var(--panel-soft); }
.web-progress-orbit strong { font-size: 2.2rem; line-height: 1.1; }
.web-progress-orbit strong small { font-size: .85rem; color: var(--muted); }
.web-progress-orbit > span { font-size: .6rem;color:var(--text); font-weight: 700; letter-spacing: .09em; }
.online-label { display: inline-block;border:1px solid var(--line); padding: 7px 10px; border-radius: 999px; font-size: .62rem;color:var(--text); }
.core-stat { display: flex; justify-content: space-between; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); font-size: .72rem; }
.core-stat span { color: var(--muted); }
.practice-footer { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; margin-top: 16px; padding-bottom: env(safe-area-inset-bottom); }
.practice-footer .save-state { justify-content: center; font-size: .68rem; }
.practice-footer button { min-height: 44px; }
.practice-notes { display: grid; gap: 10px; margin-top: 16px; }
.regulatory-note { border: 1px solid var(--line); border-radius: 9px;background:var(--panel-soft); overflow-wrap: anywhere; }
.regulatory-note summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; font-size: .72rem; }
.regulatory-note summary b { white-space: nowrap; color: var(--cyan); }
.note-icon { display: grid; place-items: center; width: 19px; height: 19px; flex-shrink: 0; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 50%; }
.regulatory-note p { padding: 0 14px 12px; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.drop-zone { display: block; text-align: left; min-width: 0; }
.attachment-heading small, .drop-help { display: block; color: var(--muted); line-height: 1.5; font-size: .7rem; }
.attachment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.file-picker { position: relative; display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; overflow: hidden; font-size: .72rem; }
.file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-picker:focus-within { outline: 2px solid var(--cyan); outline-offset: 3px; }
.attachment-list { padding: 0; list-style: none; }
.attachment-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.attachment-list button { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.attachment-preview img { display: block; max-width: 100%; max-height: 60dvh; margin: auto; object-fit: contain; }
.attachment-preview iframe { width: 100%; height: 60dvh; border: 0; background: white; }
.photo-editor { width: min(1000px,96vw); max-height: 94dvh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--text); background: var(--panel-solid); }
.photo-editor::backdrop {background:var(--panel-soft); }
.photo-editor header, .photo-editor footer, .photo-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.photo-editor h2 { margin: 0; font-size: 1.1rem; }
.photo-editor p { color: var(--muted); font-size: .8rem; }
.photo-canvas-wrap { display: grid; place-items: center;background:var(--panel-soft); margin: 12px 0; }
.photo-editor canvas { max-width: 100%; max-height: 52dvh; width: auto; height: auto; touch-action: none; }
.photo-editor button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-soft); cursor: pointer; }
.photo-tools label { display: grid; gap: 4px; font-size: .75rem; max-width: 100%; }
.photo-tools input { max-width: 100%; }
.photo-editor footer { justify-content: flex-end; margin-top: 14px; }
.modal, .drawer { max-height: 92dvh; }
.drawer { height: 100dvh; max-height: 100dvh; }
.top-actions, .head-actions, .phase-actions, .modal-actions { flex-wrap: wrap; }
.field, .radio-card, .signature-item > *, .setting-row > * { min-width: 0; }
.phase-card, .panel, .detail-item { overflow-wrap: anywhere; }
.control { min-width: 0; }
@container practice (max-width: 1200px) {
  .practice-columns { grid-template-columns: minmax(0,1fr); }
  .practice-core, .master-control-badge, .desktop-workspace .brand small { display: none; }
}
@container practice (max-width: 900px) {
  .practice-layout { grid-template-columns: 64px minmax(0,1fr); }
  .desktop-workspace .phase-rail { padding: 12px 6px; }
  .practice-label, .sidebar-signature, .desktop-workspace .phase-button small { display: none; }
  .desktop-workspace .phase-button { grid-template-columns: 1fr; min-height: 44px; border-radius: 8px; }
  .desktop-workspace .phase-button.active { background: var(--panel-soft); }
  .practice-scroll { padding: 18px 12px 24px; }
  .desktop-workspace .phase-card { padding: 16px; }
  .desktop-workspace .form-grid, .desktop-workspace .drop-grid, .desktop-workspace .radio-grid, .desktop-workspace .signature-item { grid-template-columns: minmax(0,1fr); }
  .desktop-workspace .signature-item .drop-zone { width: 100%; }
}
@container practice (max-width: 600px) {
  .desktop-workspace .practice-topbar { padding: 8px; gap: 8px; }
  .desktop-workspace .top-actions { width: 100%; gap: 6px; }
  .desktop-workspace .top-actions button { font-size: .65rem; padding: 8px; min-height: 44px; }
  .desktop-workspace .phase-card { padding: 12px; }
  .practice-footer { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .practice-footer .save-state { order: 3; }
  .desktop-workspace button { white-space: normal; overflow-wrap: anywhere; }
  .desktop-workspace .generation-card { padding: 10px; }
  .file-picker { width: 100%; justify-content: center; }
  .desktop-workspace .control { font-size: max(16px,.85rem); min-height: 44px; }
}
@media(max-width: 860px) {
  .layout { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .mobile-nav { overflow-x: auto; gap: 4px; padding-bottom: max(.45rem,env(safe-area-inset-bottom)); }
  .mobile-nav .nav-button { flex-shrink: 0; min-height: 44px; }
}
@media(max-width: 640px) {
  .signature-item { grid-template-columns: minmax(0,1fr); }
  .topbar { gap: 8px; }
  .role-card { gap: .6rem; }
}
:root[data-theme="light"] .desktop-workspace { --bg:#edf5fb; --panel-solid:#fff; --panel-soft:#e7f2f8; --line:rgba(33,85,124,.24); --text:#10273a; --muted:#587087; --cyan:#007f9b;background:var(--panel-soft); }
:root[data-theme="light"] .desktop-workspace :is(.practice-topbar,.phase-rail,.phase-card,.practice-core) {background:var(--panel-soft); }
:root[data-theme="light"] .desktop-workspace :is(.control,.secondary-button,.regulatory-note) {background:var(--panel-soft); color:var(--text); }
