/* REPLACED ENTIRE FILE WITH NEW CONTENT */
:root {
  --bg: #eef3f8;
  --bg-2: #f8fbfd;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(245, 248, 251, 0.9);
  --surface-tint: rgba(237, 243, 248, 0.92);
  --line: rgba(20, 40, 64, 0.12);
  --line-strong: rgba(20, 40, 64, 0.22);
  --text: #132235;
  --text-soft: #617487;
  --navy-950: #0a1a29;
  --navy-900: #0f2337;
  --navy-800: #18314a;
  --navy-700: #244560;
  --teal-700: #2e7f87;
  --teal-600: #3d9498;
  --blue-600: #386ea6;
  --danger: #b42318;
  --success: #177a52;
  --warning: #9a6700;
  --shadow-xs: 0 4px 10px rgba(19, 34, 53, 0.04);
  --shadow-sm: 0 12px 26px rgba(19, 34, 53, 0.06);
  --shadow-md: 0 22px 50px rgba(19, 34, 53, 0.1);
  --shadow-lg: 0 30px 76px rgba(19, 34, 53, 0.16);
  --glass-shadow: 0 18px 40px rgba(15, 35, 55, 0.18);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --content-width: 1540px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 110, 166, 0.11), transparent 24%),
    radial-gradient(circle at top right, rgba(61, 148, 152, 0.07), transparent 24%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

.glass-panel,
.glass-panel-soft {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.28) 100%);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 20px 44px rgba(19, 34, 53, 0.12);
}

.glass-panel::before,
.glass-panel-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 38%, rgba(255, 255, 255, 0.06));
}

.glass-panel-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.38) 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 18px 10px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 22%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 42%, var(--navy-800) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(15, 35, 55, 0.18);
  transition: padding 0.22s ease, box-shadow 0.22s ease, backdrop-filter 0.22s ease, background 0.22s ease;
}

.topbar.topbar-condensed {
  padding: 8px 18px 6px;
  box-shadow: 0 10px 22px rgba(15, 35, 55, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: stretch;
}

.brand-panel,
.toolbar-panel {
  border-radius: 22px;
  overflow: hidden;
}

.brand-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 14px 16px;
}

.brand-logo-wrap {
  position: relative;
  width: 150px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 18px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 48%);
  pointer-events: none;
}

.brand-logo-img {
  position: relative;
  z-index: 2;
  width: calc(100% - 18px);
  height: calc(100% - 14px);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.1));
}

.brand-logo-fallback {
  position: absolute;
  inset: 8px;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
  border-radius: 12px;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0 0 4px;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 0.98;
  color: #ffffff;
  letter-spacing: -0.045em;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13.5px;
  line-height: 1.38;
  max-width: 560px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toggle-card-script {
  min-width: 0;
  justify-content: center;
}

.toggle-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
  min-height: 38px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-600);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented-control-strong {
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.seg-btn,
.interval-btn,
.mini-btn,
#copyBtn,
#copyOpenBtn,
#openGptBtn,
#clearBtn,
.select-shell {
  appearance: none;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.seg-btn {
  border-radius: 999px;
  border-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
  color: var(--navy-900);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.seg-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.topbar .seg-btn {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.topbar .seg-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.seg-btn.active,
.seg-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #ffffff 0%, #e8f3ff 100%);
  color: var(--navy-900);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 16px rgba(56, 110, 166, 0.16);
  transform: translateY(-1px);
}

.segmented-control-form .seg-btn.active,
.segmented-control-form .seg-btn[aria-pressed="true"] {
  border-color: rgba(56, 110, 166, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 3px rgba(56, 110, 166, 0.1),
    0 10px 20px rgba(56, 110, 166, 0.12);
}

.app-shell {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 14px 16px 28px;
}

.practice-mode-banner {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 49, 74, 0.05), rgba(61, 148, 152, 0.05));
  border: 1px solid rgba(24, 49, 74, 0.05);
}

.practice-mode-kicker {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-800);
}

.practice-mode-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.42;
}

.workflow-ribbon,
.completion-dashboard {
  position: relative;
  border-radius: 20px;
  padding: 12px 14px;
  margin-bottom: 12px;
  overflow: hidden;
}

.workflow-ribbon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.workflow-ribbon-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-ribbon-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- PRACTICE MODE HEADER ELEMENTS ---------- */

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.14);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ---------- PRACTICE CONTEXT PANEL ---------- */

.practice-context-panel {
  margin-bottom: 12px;
}

.practice-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.practice-context-card {
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg,#ffffff 0%,#f6f9fc 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.practice-context-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin-bottom: 4px;
}

.practice-context-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* ---------- SECTION MINI BADGES ---------- */

.section-mini-badge {
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(180deg,#f7fafc 0%,#eef4f8 100%);
  border: 1px solid var(--line);
  color: var(--navy-800);
  box-shadow: var(--shadow-xs);
}

.section-chip {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9fbfd 0%, #eef4f8 100%);
  color: var(--navy-900);
  border: 1px solid var(--line);
  box-shadow: 0 8px 16px rgba(19, 34, 53, 0.05);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-chip-hero {
  background: linear-gradient(135deg, rgba(56, 110, 166, 0.12), rgba(61, 148, 152, 0.12));
}

.completion-dashboard-header {
  display: none;
}

.completion-grid {
  display: none;
}

#completionDashboard {
  display: none;
}

.completion-kicker,
.completion-title,
.completion-total,
.completion-card,
.completion-card-top,
.completion-card-label,
.completion-card-copy,
.completion-status,
.completion-status-pending,
.completion-status-complete {
  /* intentionally retained for app compatibility */
}

.main-column {
  min-width: 0;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(250, 252, 253, 0.965) 100%);
  border: 1px solid rgba(216, 225, 234, 0.82);
  border-radius: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 38px rgba(19, 34, 53, 0.07),
    0 6px 12px rgba(19, 34, 53, 0.03);
  padding: 20px 20px 18px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(56, 110, 166, 0.14), rgba(255, 255, 255, 0.82));
  pointer-events: none;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 22px 44px rgba(19, 34, 53, 0.09),
    0 8px 16px rgba(19, 34, 53, 0.04);
}

.card-hero {
  background:
    radial-gradient(circle at top right, rgba(56, 110, 166, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 24px 48px rgba(19, 34, 53, 0.1),
    0 8px 16px rgba(19, 34, 53, 0.05);
}

.card[data-section] {
  scroll-margin-top: 96px;
}

.card[data-section]::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(154, 103, 0, 0.2);
  box-shadow: 0 0 0 5px rgba(154, 103, 0, 0.06);
}

.card[data-section].is-complete {
  border-color: rgba(23, 122, 82, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 20px 40px rgba(23, 122, 82, 0.07),
    0 6px 14px rgba(19, 34, 53, 0.03);
}

.card[data-section].is-complete::after {
  background: rgba(23, 122, 82, 0.9);
  box-shadow: 0 0 0 5px rgba(23, 122, 82, 0.12);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0 0 6px;
  color: var(--navy-900);
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 780px;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--teal-600) 100%);
  box-shadow: 0 6px 14px rgba(56, 110, 166, 0.14);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-setup-primary {
  align-items: end;
}

.grid-setup-secondary {
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.2;
}

.required {
  color: var(--danger);
}

.helper-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.select-shell {
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 251, 253, 0.93) 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--shadow-xs);
  padding: 1px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  color: var(--text);
  padding: 11px 12px;
  box-shadow: inset 0 1px 2px rgba(19, 34, 53, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.select-shell select {
  border: 0;
  box-shadow: none;
  background: transparent;
}

input:focus,
textarea:focus,
select:focus,
.select-shell:focus-within {
  outline: none;
  border-color: var(--blue-600);
  background: #ffffff;
  box-shadow:
    inset 0 1px 2px rgba(19, 34, 53, 0.02),
    0 0 0 4px rgba(56, 110, 166, 0.12),
    0 10px 18px rgba(56, 110, 166, 0.08);
}

input:not(:placeholder-shown),
textarea:not(:placeholder-shown),
select:valid {
  border-color: rgba(56, 110, 166, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: #8c99a9;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

#notes {
  min-height: 380px;
  height: calc(100vh - 330px);
}

#previousPlan,
#testDump,
#exportBox {
  min-height: 150px;
}

.top-gap {
  margin-top: 16px;
}

.inline-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-input-row input {
  flex: 1;
}

.mini-btn {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f4f8fb 0%, #eaf1f6 100%);
  color: var(--navy-900);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  cursor: pointer;
}

.mini-btn:hover {
  background: #e5edf5;
  transform: translateY(-1px);
}

.quick-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interval-btn {
  border-radius: 999px;
  padding: 9px 13px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  color: var(--navy-900);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.interval-btn:hover,
.interval-btn.active {
  background: #e8f0fa;
  border-color: #b8cae0;
  transform: translateY(-1px);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.workspace-grid .card {
  margin-bottom: 0;
}

.script-workspace {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.script-workspace::before {
  content: "";
  display: block;
  height: 4px;
  margin: -20px -20px 16px;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--teal-600) 100%);
}

.script-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
  border: 1px solid var(--line);
}

.script-progress-label,
.script-progress-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy-800);
}

.script-source-banner {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 18px;
}

.script-source-banner strong {
  color: var(--navy-900);
  font-size: 12.5px;
}

.script-source-banner span {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.script-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  box-shadow: var(--shadow-xs);
  margin-bottom: 8px;
  overflow: hidden;
}

.script-group summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--navy-900);
}

.script-group summary::-webkit-details-marker {
  display: none;
}

.script-group-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.script-check {
  width: 16px;
  height: 16px;
  accent-color: var(--teal-600);
}

.script-group-title {
  font-size: 13px;
}

.script-group-body {
  padding: 0 14px 14px 38px;
}

.script-group-body p {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.script-group-body p:last-child {
  margin-bottom: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-helper {
  margin-top: 10px;
}

#copyBtn,
#copyOpenBtn,
#openGptBtn,
#clearBtn {
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#copyBtn {
  background: linear-gradient(135deg, var(--teal-600) 0%, var(--teal-700) 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(46, 127, 135, 0.2);
}

#copyBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(46, 127, 135, 0.24);
}

#copyOpenBtn {
  background: linear-gradient(135deg, var(--blue-600) 0%, #295b8f 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(56, 110, 166, 0.2);
}

#copyOpenBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(56, 110, 166, 0.24);
}

#openGptBtn {
  background: linear-gradient(180deg, #fbfdff 0%, #f2f6fb 100%);
  color: var(--navy-900);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

#openGptBtn:hover {
  background: #e9f1f8;
  transform: translateY(-1px);
}

#clearBtn {
  background: linear-gradient(180deg, #f6f9fc 0%, #edf3f8 100%);
  color: var(--navy-900);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

#clearBtn:hover {
  background: #e8eef5;
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

body[data-practice="astra"] .practice-card-ebh,
body[data-practice="ebh"] .practice-card-astra {
  display: none !important;
}


body[data-practice="astra"] .topbar {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 22%),
    linear-gradient(135deg, #0b1e31 0%, #14304a 48%, #1d3e5d 100%);
}

body[data-practice="astra"] .practice-mode-banner,
body[data-practice="astra"] .workflow-ribbon,
body[data-practice="astra"] .completion-dashboard {
  background: linear-gradient(135deg, rgba(20, 48, 74, 0.08), rgba(56, 110, 166, 0.08));
}

body[data-practice="ebh"] .topbar {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 22%),
    linear-gradient(135deg, #10313c 0%, #174a58 48%, #1f6570 100%);
}

body[data-practice="ebh"] .practice-mode-banner,
body[data-practice="ebh"] .workflow-ribbon,
body[data-practice="ebh"] .completion-dashboard {
  background: linear-gradient(135deg, rgba(22, 74, 88, 0.08), rgba(61, 148, 152, 0.1));
}

/* ---------- PRACTICE-SPECIFIC ACCENTS ---------- */

body[data-practice="astra"] .section-mini-badge {
  background: linear-gradient(135deg, rgba(56,110,166,0.14), rgba(61,148,152,0.14));
  border-color: rgba(56,110,166,0.22);
}

body[data-practice="ebh"] .section-mini-badge {
  background: linear-gradient(135deg, rgba(61,148,152,0.18), rgba(46,127,135,0.18));
  border-color: rgba(61,148,152,0.26);
}

body[data-practice="astra"] .practice-context-card {
  border-color: rgba(56,110,166,0.18);
}

body[data-practice="ebh"] .practice-context-card {
  border-color: rgba(61,148,152,0.22);
}

@media (max-width: 1180px) {
  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .workflow-ribbon,
  .completion-dashboard-header,
  .completion-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .script-workspace {
    position: static;
    max-height: none;
  }

  #notes {
    height: auto;
    min-height: 320px;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 12px 14px 8px;
  }

  .topbar.topbar-condensed {
    padding: 8px 14px 6px;
  }

  .brand-shell {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .toolbar,
  .grid,
  .grid-3,
  .grid-4,
  .completion-grid,
  .workflow-ribbon {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 14px;
  }

  .card,
  .script-workspace,
  .workflow-ribbon,
  .completion-dashboard,
  .brand-panel,
  .toolbar-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .script-workspace::before {
    margin: -16px -16px 14px;
  }

  .inline-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .section-heading,
  .completion-dashboard-header {
    grid-template-columns: 1fr;
  }

  .brand-logo-wrap {
    width: 138px;
    height: 54px;
  }
}