/* ==========================================================================
   AI Assessment Scale (AIAS v2.1) — Institutional SaaS App Stylesheet
   Owner: Learning Innovation Practice Limited (Company No. 17325051)
   ========================================================================== */

:root {
  --aias-blue: #0c6368;
  --aias-blue-dark: #073f43;
  --aias-blue-light: #eceef0;
  --aias-teal: #2b7a78;
  --aias-teal-dark: #1f5c5a;
  --lip-teal: #073f43;
  --lip-coral: #526468;
  --ink-900: #14282d;
  --ink-800: #2b2e31;
  --ink-600: #575c63;
  --ink-400: #828891;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --border-light: #dadcde;
  --level-1: #64DEFF;
  --level-1-ink: #173e48;
  --level-2: #C1FFD2;
  --level-2-ink: #1e4a2c;
  --level-3: #C1CFFF;
  --level-3-ink: #1f2a52;
  --level-4: #FFF1C1;
  --level-4-ink: #5c4a10;
  --level-5: #FFC1EE;
  --level-5-ink: #5a1c4a;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success: #1f5c3a;
  --success-bg: #edf7f1;
  --warn: #7a5a00;
  --warn-bg: #fffaf0;
}

input::placeholder,
textarea::placeholder {
  color: #8f949b;
  font-weight: 400;
  opacity: 1;
}

/* Top 5-Level Rainbow Strip */
.aias-rainbow-bar {
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--level-1) 0%, var(--level-1) 20%,
    var(--level-2) 20%, var(--level-2) 40%,
    var(--level-3) 40%, var(--level-3) 60%,
    var(--level-4) 60%, var(--level-4) 80%,
    var(--level-5) 80%, var(--level-5) 100%
  );
}

/* ==========================================================================
   LOGON PAGE (login.html)
   ========================================================================== */

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9em;
  color: var(--ink-800);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #d4d6d8;
  border-radius: 7px;
  font: inherit;
  font-size: 0.95em;
  color: var(--ink-900);
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: var(--aias-blue);
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--aias-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.95em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover {
  background: var(--aias-blue-dark);
}
.btn-teal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--aias-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.95em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.btn-teal:hover {
  background: var(--aias-teal-dark);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  color: var(--aias-blue);
  font-weight: 600;
  font-size: 0.92em;
  border: 1px solid var(--aias-blue);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover {
  background: var(--aias-blue-light);
}

/* ==========================================================================
   FULL APP SHELL (app.html)
   ========================================================================== */
.app-topbar {
  background: var(--ink-800);
  color: #fff;
  padding: 10px 20px;
  font-size: 0.88em;
}
.app-topbar__inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.tenant-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.seat-badge {
  background: rgba(59, 179, 163, 0.25);
  border: 1px solid #3BB3A3;
  color: #c1ffd2;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 700;
}

.app-subnav {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}
.app-subnav__inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.app-tab-btn {
  padding: 14px 18px;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.93em;
  color: var(--ink-600);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.app-tab-btn:hover {
  color: var(--ink-800);
  background: #f8fafc;
}
.app-tab-btn.active {
  color: var(--aias-blue);
  border-bottom-color: var(--aias-blue);
}

.app-workspace {
  max-width: 1360px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

/* Studio Layout */
.studio-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.step-sidebar {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 18px;
  position: sticky;
  top: 90px;
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 6px;
  border: 1px solid transparent;
}
.step-item:hover {
  background: #f3f4f6;
}
.step-item.active {
  background: var(--aias-blue-light);
  border-color: #c9ccd0;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #eaebed;
  color: var(--ink-800);
  font-weight: 700;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-item.active .step-num {
  background: var(--aias-blue);
  color: #fff;
}
.step-item.done .step-num {
  background: var(--aias-teal);
  color: #fff;
}

.panel-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(20, 40, 45, 0.03);
  margin-bottom: 20px;
}

/* AIAS Level Selector Cards */
.level-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 16px 0;
}
@media (max-width: 1100px) {
  .level-selector-grid {
    grid-template-columns: 1fr;
  }
}
.level-option {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
  display: flex;
  flex-direction: column;
}
.level-option:hover {
  border-color: var(--aias-blue);
}
.level-option.selected {
  border: 2px solid var(--ink-900);
  box-shadow: 0 0 0 2px rgba(12, 99, 104, 0.14);
}
.level-option__head {
  padding: 12px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.level-option__body {
  padding: 12px;
  font-size: 0.85em;
  color: var(--ink-800);
  line-height: 1.5;
  flex: 1;
}
.lvl-bg-1 { background: var(--level-1); color: var(--level-1-ink); }
.lvl-bg-2 { background: var(--level-2); color: var(--level-2-ink); }
.lvl-bg-3 { background: var(--level-3); color: var(--level-3-ink); }
.lvl-bg-4 { background: var(--level-4); color: var(--level-4-ink); }
.lvl-bg-5 { background: var(--level-5); color: var(--level-5-ink); }

/* University Formatted Brief Document Output */
.uni-brief-doc {
  border: 1px solid #cbced1;
  border-radius: 6px;
  background: #fff;
  padding: 36px;
  box-shadow: 0 2px 10px rgba(20, 40, 45, 0.04);
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86em;
  margin-top: 12px;
}
.rubric-table th,
.rubric-table td {
  border: 1px solid #d4d6d8;
  padding: 10px;
  vertical-align: top;
}
.rubric-table th {
  background: var(--ink-800);
  color: #fff;
  font-weight: 700;
}

/* Modal for Online Published View & Invoice Preview */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open {
  display: flex;
}
.modal-window {
  background: #fff;
  border-radius: 8px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.modal-body {
  padding: 28px;
}

@media print {
  .site-header, .app-navigation, .app-topbar, .app-subnav, .step-sidebar, .no-print, .site-foot {
    display: none !important;
  }
  .studio-grid {
    display: block !important;
  }
  .uni-brief-doc {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* Single-entry account flow. This is a UI gate, not a security boundary. */
.account-locked .app-navigation,.account-locked .app-topbar,.account-locked .app-subnav,.account-locked .app-workspace {display:none!important}
.account-gate[hidden]{display:none}
.account-card{max-width:520px;width:100%;box-sizing:border-box;padding:32px;background:white;border:1px solid var(--border-light);border-radius:6px;box-shadow:0 4px 16px rgba(20,40,45,.05)}
.account-modes{display:flex;gap:10px;margin:20px 0}
.account-note{font-size:.84rem;color:var(--ink-600);line-height:1.55;margin-top:20px}
#account-status{color:#a32020}
#account-status.is-info{color:var(--ink-600)}
#account-code-form[hidden],#account-link-confirm[hidden],#account-form[hidden],.account-modes[hidden]{display:none}
#account-code{font-size:1.4rem;letter-spacing:.3em;text-align:center;font-variant-numeric:tabular-nums}
.account-code-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
@media print {body>aside,.account-gate,.site-foot{display:none!important}}

/* Preserve native hidden semantics when button styles set display. */
[hidden] { display: none !important; }

/* Education setting selector and school mode */
.setting-row{display:grid;grid-template-columns:minmax(220px,2fr) minmax(180px,1fr);gap:12px;background:#f5f5f6;border:1px solid var(--border-light);border-radius:6px;padding:14px 16px;margin-bottom:18px}
.setting-row .form-group{margin:0}
.setting-row label{font-weight:700;color:var(--ink-900)}
.setting-note{grid-column:1/-1;margin:0;font-size:.85em;color:var(--ink-600)}
@media (max-width:640px){.setting-row{grid-template-columns:1fr}}

.uni-brief-doc [dir=rtl] th,.uni-brief-doc [dir=rtl] td{text-align:right}
.uni-brief-doc .isolate{unicode-bidi:isolate}

/* ---- Pilot redesign (8 Nov 2026): Learning Innovation Practice editorial style ---- */
[dir=rtl] body, [dir=rtl] .form-control, [dir=rtl] button, [dir=rtl] select, [lang=ar], .uni-brief-doc [lang=ar] {
  font-family: 'IBM Plex Sans Arabic', Tahoma, -apple-system, 'Segoe UI', sans-serif;
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lang-switch { display: inline-flex; align-items: center; gap: 8px; font-size: .88em; color: var(--ink-600); }
.lang-switch select { padding: 6px 10px; border: 1px solid var(--border-light); border-radius: 6px; background: #fff; font: inherit; color: var(--ink-900); }
.site-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.eyebrow-small { margin: 0 0 10px; font-size: .74em; font-weight: 800; letter-spacing: normal; text-transform: none; color: var(--ink-600); }
[dir=rtl] .eyebrow-small, [dir=rtl] .step-tag { letter-spacing: 0; text-transform: none; }
.sample-box { display: grid; gap: 6px; font-size: .85em; color: var(--ink-600); }
.sample-box label { font-weight: 700; color: var(--ink-800); }

.step-tag { display: inline-block; font-size: .75em; font-weight: 700; letter-spacing: normal; text-transform: none; color: var(--lip-coral); padding: 0; background: none; border-radius: 0; }
.step-title { margin: 6px 0 12px; font-size: 1.4em; font-weight: 700; letter-spacing: -0.015em; color: var(--ink-900); }
.step-intro { margin: 0 0 16px; color: var(--ink-600); line-height: 1.6; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.step-nav--end { justify-content: flex-end; }

.dropzone { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; border: 1px dashed #a4a9af; border-radius: 6px; background: #fbfbfb; cursor: pointer; }
.dropzone strong { display: block; color: var(--ink-900); }
.dropzone span { display: block; font-size: .85em; color: var(--ink-600); margin-top: 2px; }
.dropzone.dragover, .dropzone:hover { border-color: var(--aias-blue); background: var(--aias-blue-light); }
.dropzone-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--aias-blue-light); color: var(--aias-blue); font-weight: 700; }
.parsed-banner { margin: -4px 0 14px; padding: 10px 14px; border-radius: 6px; background: var(--success-bg); color: var(--success); font-size: .88em; line-height: 1.55; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.field-hint { display: block; margin-top: 4px; font-size: .82em; color: var(--ink-600); }
body:not(.school-mode) .school-only { display: none !important; }

.rubric-card { margin: 18px 0 14px; padding: 16px; border: 1px solid var(--border-light); border-radius: 6px; background: #fbfbfb; }
.rubric-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rubric-card__head h3 { margin: 6px 0 2px; font-size: 1.05em; color: var(--ink-900); }

.small-btn { padding: 7px 12px !important; font-size: .82em !important; }
.pastezone { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border: 1px dashed #b7babf; border-radius: 6px; background: #fff; font-size: .86em; cursor: text; }
.pastezone:focus { outline: 2px solid var(--aias-blue); outline-offset: 2px; }
.pastezone strong { display: block; color: var(--ink-800); }
.pastezone span { display: block; color: var(--ink-600); margin-top: 2px; }
.inner-card { margin-top: 12px; padding: 12px; border: 1px solid var(--border-light); border-radius: 6px; background: #fff; }
.rubric-table-wrap { margin-top: 12px; overflow-x: auto; }
.rubric-edit-table { font-size: .84em; margin: 0; }
.rubric-edit-table .form-control { padding: 5px 8px; font-size: .95em; }
.rubric-edit-table tfoot tr { background: #f3f4f6; }
.row-remove { background: none; border: none; color: #b91c1c; cursor: pointer; font-weight: 800; font-size: 1.2em; padding: 2px 8px; }
[dir=rtl] .rubric-table th, [dir=rtl] .rubric-table td { text-align: right; }

.audit-box { margin-top: 14px; padding: 12px 16px; border: 1px solid #e7d39a; border-radius: 6px; background: var(--warn-bg); color: #4a3b00; font-size: .9em; }
.audit-badge { font-size: .74em; font-weight: 700; padding: 3px 10px; border-radius: 4px; }
.audit-badge--ok { background: #dcfce7; color: #166534; }
.audit-badge--warn { background: #fef3c7; color: #92400e; }

.level-option:focus-visible { outline: 2px solid var(--aias-blue); outline-offset: 2px; }
.level-selected-pill { font-size: .74em; background: rgba(20, 40, 45, 0.16); color: #fff; padding: 2px 8px; border-radius: 4px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.option-card { padding: 16px; border: 1px solid var(--border-light); border-radius: 6px; background: #fff; }
.option-card h3 { margin: 0 0 6px; font-size: 1.02em; color: var(--ink-900); }
.option-card p { margin: 0 0 10px; font-size: .88em; color: var(--ink-600); line-height: 1.55; }

/* Consistent, properly aligned checkboxes across forms, cards, and toolbars */
.check-row,
.form-group label.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  line-height: 1.45;
  font-weight: 400;
  font-size: 0.92em;
  color: var(--ink-800);
  cursor: pointer;
}
.check-row--compact {
  margin: 0;
  font-size: 0.85em;
  color: var(--ink-600);
}
.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0 0 !important;
  flex: 0 0 16px;
  accent-color: var(--aias-blue);
  cursor: pointer;
}

.warn-box { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: var(--danger-bg); color: var(--danger); font-size: .86em; font-weight: 600; }

/* Consent stack & inline Terms/Privacy link in Create Account */
.consent-stack {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}
.inline-policy-link {
  color: var(--aias-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.92em;
  font-weight: 600;
  cursor: pointer;
}
.inline-policy-link:hover {
  color: var(--aias-blue-dark);
}

/* Draft bar at top of Studio */
.draft-bar {
  max-width: 1360px;
  margin: 14px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.draft-bar__check {
  margin: 0 !important;
  font-size: 0.86em !important;
  color: var(--ink-600) !important;
}

.draft-bar__status {
  font-size: 0.85em;
  color: var(--ink-800);
  font-weight: 600;
}

/* Student worksheet preview: an A4-like page, directly editable */
.worksheet-doc { margin-top: 16px; max-width: 800px; }
.worksheet-doc[contenteditable="true"]:focus {
  outline: 2px solid var(--aias-blue);
  outline-offset: 2px;
}
.worksheet-doc h1 { font-size: 1.4em; }
.worksheet-doc ol li::marker { font-weight: 800; color: var(--aias-blue); }
.uni-brief-doc [dir=rtl], .worksheet-doc [dir=rtl] { text-align: right; }
.uni-brief-doc [dir=rtl] ul, .uni-brief-doc [dir=rtl] ol { padding-right: 22px; padding-left: 0; }

/* Print only the part asked for (printSection in app.js). */
@media print {
  body { background: #fff !important; }
  .aias-rainbow-bar, #draft-status, main > section.no-print { display: none !important; }
  .studio-step-pane { display: none !important; }
  #studio-step-4 { display: block !important; }
  .worksheet-doc { max-width: none; margin: 0; }
  body.printing-brief .print-worksheet { display: none !important; }
  body.printing-worksheet .print-brief { display: none !important; }
  .print-brief, .print-worksheet { break-inside: auto; }
  .worksheet-doc li, .ws-box, .aias-level-box { break-inside: avoid; }
  .aias-level-box, .ws-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}
@media (max-width: 640px) {
  .dropzone { align-items: flex-start; }
  .step-nav { flex-direction: column-reverse; }
  .step-nav .btn-primary, .step-nav .btn-outline { width: 100%; }
}
.step-item strong { display: block; color: var(--ink-900); font-size: .92em; }
.step-item span { display: block; font-size: .8em; color: var(--ink-600); margin-top: 2px; line-height: 1.4; }
.step-item { border: 1px solid transparent; }
.uni-brief-doc [lang=ar] ol, .worksheet-doc [lang=ar] ol { list-style-type: arabic-indic; }
.isolate { unicode-bidi: isolate; }

/* Assessment workbench — screen only; student documents retain their print layout. */
@media screen {
  body.studio-app { background: #eff0f2; color: #2a2c2f; font-size: 15px; }
  .studio-app .aias-rainbow-bar { height: 3px; }
  .studio-app .site-header { position: relative; box-shadow: none; background: #f7f8f9; border-color: #d9dbdd; }
  .studio-app .site-header__inner { max-width: 1440px; padding: 12px 40px; }
  .studio-app .brand img { height: 43px; }
  .studio-app .brand__title { font-size: 16px; font-weight: 650; color: #2d2f32; }
  .studio-app .brand__tag { font-size: 12px; margin-top: 5px; color: #656a71; }
  .studio-app .lang-switch { font-size: 12px; }
  .studio-app .lang-switch select { background: transparent; border-color: #d2d4d7; }
  .studio-app .app-topbar { background: #f7f8f9; color: #5a5f66; padding: 0; }
  .studio-app .app-topbar__inner { max-width: 1360px; }
  .studio-app .tenant-pill { border-radius: 0; background: none; padding: 0; font-size: 12px; gap: 12px; font-weight: 400; }
  .studio-app .tenant-pill strong { font-weight: 500; }
  .studio-app .seat-badge { background: none; border: 0; border-inline-start: 1px solid #cccfd2; border-radius: 0; color: #53585e; font-size: 12px; font-weight: 500; }
  .studio-app .app-subnav { background: #f7f8f9; }
  .studio-app .app-subnav__inner { max-width: 1440px; padding: 0 40px; gap: 26px; }
  .studio-app .app-tab-btn { padding: 10px 0; font-size: 13px; font-weight: 600; border-bottom-width: 2px; }
  .studio-app .app-tab-btn:hover { background: transparent; }
  .studio-app .app-workspace { max-width: 1440px; padding: 0 40px 72px; }
  .studio-app .draft-bar { max-width: none; margin: 0; padding: 10px 0; border-bottom: 1px solid #d9dbdd; gap: 10px; }
  .studio-app .draft-bar__status { flex: 1 1 240px; font-size: 12px; font-weight: 400; }
  .studio-app .draft-bar__check { margin-inline-start: 4px !important; font-size: 12px !important; }
  .studio-app .draft-bar button:first-child { color: #fff; background: #14282d; border-color: #14282d; }
  .workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0; }
  .workspace-kicker { display: none; font-size: 11px; letter-spacing: normal; text-transform: none; color: #5d6269; margin: 0 0 10px; }
  .workspace-heading h1 { font-weight:700; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.15; letter-spacing:-.01em; color: #14282d; margin: 0 0 6px; }
  .workspace-heading p:last-child { font-size: 14px; color: #61666d; margin: 0; }
  .workspace-edition { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #727880; letter-spacing: normal; }
  .workspace-edition span { font-size: 34px; letter-spacing:-.01em; color: #a2a7ad; }
  .studio-app .studio-grid { grid-template-columns: 232px minmax(0, 1fr); gap: 36px; }
  .studio-app .studio-grid > div { min-width: 0; }
  .studio-app .step-sidebar { background: none; border: 0; padding: 12px 0; border-radius: 0; top: 24px; }
  .studio-app .eyebrow-small { font-size: 10px; font-weight: 600; color: #747a83; margin: 0 0 20px 12px; }
  .studio-app .step-item { border-radius: 8px; padding: 15px 12px; gap: 12px; margin-bottom: 6px; min-height: 80px; }
  .studio-app .step-item.active { background: #e2e4e6; border-color: transparent; }
  .studio-app .step-item:hover { background: #e6e8ea; }
  .studio-app .step-item strong { font-weight: 600; font-size: 13px; }
  .studio-app .step-item span { font-size: 12px; line-height: 1.5; margin-top: 6px; color: #696e76; }
  .studio-app .step-num { border-radius: 50%; background: transparent; border: 1px solid #bcbfc4; width: 24px; height: 24px; font-size: 11px; }
  .studio-app .step-item.active .step-num { background: #14282d; border-color: #14282d; }
  .studio-app .sample-box { padding: 10px 12px; gap: 10px; font-size: 12px; }
  .studio-app .sample-box label { font-weight: 500; }
  .studio-app .sample-box select { font-size: 12px; padding: 9px; }
  .studio-app .sample-box span { line-height: 1.6; }
  .studio-app .panel-card { padding: 32px 36px; border-color: #dadcde; border-radius: 12px; box-shadow: 0 3px 14px #233c3304; }
  .studio-app .step-tag { color: #62676e; font-size: 10px; font-weight: 600; letter-spacing: normal; }
  .studio-app .step-title { font-size: 26px; line-height: 1.3; letter-spacing: -.03em; font-weight: 550; margin: 10px 0; }
  .studio-app .step-intro { font-size: 14px; max-width: 68ch; margin-bottom: 28px; color: #646970; }
  .studio-app .form-section-title { margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid #e0e2e4; font-size: 15px; font-weight: 600; }
  .studio-app .setting-row { background: #f3f4f6; border: 0; border-radius: 8px; padding: 20px; gap: 16px; margin-bottom: 22px; }
  .studio-app .setting-note { font-size: 12px; line-height: 1.65; }
  .studio-app .form-control { border: 1px solid #ced1d4; border-radius: 6px; padding: 11px 12px; background: #fff; color: #2f3236; font-size: 14px; line-height: 1.5; box-shadow: none; }
  .studio-app .form-control:focus { border-color: #60656c; outline: 3px solid #dddee0; outline-offset: 1px; box-shadow: none; }
  .studio-app .form-group { margin-bottom: 20px; }
  .studio-app .form-group label { font-size: 12px; color: #494d53; font-weight: 600; margin-bottom: 7px; }
  .studio-app .field-grid { gap: 0 20px; }
  .studio-app .field-hint { font-size: 12px; line-height: 1.6; color: #6a7078; }
  .studio-app textarea.form-control { min-height: 110px; line-height: 1.7; }
  .studio-app .dropzone { padding: 23px; background: #fffdfa; border-color: #b4b8bd; border-radius: 8px; }
  .studio-app .dropzone strong { font-size: 14px; font-weight: 600; }
  .studio-app .dropzone span { font-size: 12px; max-width: 46ch; }
  .studio-app .dropzone-icon { background: #e4e6e9; color: #61666e; border-radius: 50%; width: 38px; height: 38px; font-size: 20px; font-weight: 400; }
  .studio-app .btn-primary, .studio-app .btn-teal { background: #14282d; border: 1px solid #14282d; color: white; box-shadow: none; border-radius: 6px; padding: 11px 18px; font-size: 13px; font-weight: 600; }
  .studio-app .btn-primary:hover, .studio-app .btn-teal:hover { background: #193e32; }
  .studio-app .btn-outline { border-color: #caccd0; border-radius: 6px; color: #45494e; background: transparent; font-size: 13px; font-weight: 500; padding: 10px 16px; }
  .studio-app .btn-outline:hover { background: #eaecee; }
  .studio-app button:focus-visible, .studio-app .step-item:focus-visible { outline: 3px solid #8b9098; outline-offset: 3px; }
  .studio-app .rubric-card { background: #f6f7f8; border-color: #dedfe1; border-radius: 8px; padding: 24px; margin-top: 30px; }
  .studio-app .rubric-edit-table .form-control { font-size: 13px; }
  .studio-app .option-card { background: #f5f5f6; border: 1px solid #dfe1e3; border-radius: 8px; padding: 22px; }
  .studio-app .level-selector-grid { grid-template-columns: 1fr; gap: 10px; margin: 26px 0; }
  .studio-app .level-option { display: grid; grid-template-columns: 190px minmax(0,1fr); border-radius: 8px; }
  .studio-app .level-option__head { padding: 18px; font-size: 13px; gap: 8px; }
  .studio-app .level-option__body { padding: 18px 22px; font-size: 13px; line-height: 1.7; }
  .studio-app .level-option.selected { border: 1px solid #14282d; box-shadow: 0 0 0 2px #254f4220; }
  .studio-app .audit-box { box-shadow: none; border-radius: 8px; }
  .studio-app .inner-card { border-radius: 8px; padding: 20px; }
  .studio-app .site-foot { background: transparent; border-color: #d9dbdd; }
  .studio-app .site-foot__inner { font-size: 11px; color: #777d86; padding: 28px 20px; }
  .studio-app .account-card { max-width: 540px; padding: 40px; border-radius: 12px; box-shadow: 0 8px 40px #273e3206; }
  .studio-app .account-card h1 { font-size: 36px; font-weight:700; letter-spacing:-.01em; margin: 12px 0; color: #14282d; }
  .studio-app .account-card > p { color: #636870; font-size: 14px; }
  [dir=rtl] .workspace-heading h1, [dir=rtl] .account-card h1 { font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif; letter-spacing: 0; }
  [dir=rtl] .workspace-kicker, [dir=rtl] .step-tag { letter-spacing: 0; }
  @media (max-width: 1000px) {
    .studio-app .studio-grid { grid-template-columns: 190px minmax(0,1fr); gap: 20px; }
    .studio-app .panel-card { padding: 26px; }
    .studio-app .level-option { grid-template-columns: 145px minmax(0,1fr); }
  }
  @media (max-width: 760px) {
    .studio-app .site-header__inner { padding: 16px 20px; }
    .studio-app .app-topbar { padding-inline: 20px; }
    .studio-app .app-subnav__inner { padding-inline: 20px; }
    .studio-app .app-workspace { padding-inline: 18px; }
    .studio-app .studio-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
    .studio-app .step-sidebar { position: static; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; padding: 0; }
    .studio-app .step-sidebar > .eyebrow-small, .studio-app .step-sidebar > hr, .studio-app .sample-box { grid-column: 1/-1; }
    .studio-app .step-sidebar > .eyebrow-small { margin: 0 0 6px; }
    .studio-app .step-item { padding: 10px 6px; gap: 6px; min-height: 0; align-items: center; }
    .studio-app .step-item strong { font-size: 11px; }
    .studio-app .step-item span { display: none; }
    .studio-app .step-sidebar > hr { display: none; }
    .studio-app .sample-box { padding: 10px 0 20px; }
    .workspace-heading { padding: 28px 0; }
    .workspace-edition { display: none; }
    .studio-app .panel-card { padding: 22px 18px; }
    .studio-app .field-grid, .studio-app .setting-row, .studio-app .two-col { grid-template-columns: minmax(0,1fr); }
    .studio-app .level-option { grid-template-columns: minmax(0,1fr); }
    .studio-app .level-option__head { padding: 12px 18px; }
    .studio-app .draft-bar__check { margin-inline-start: 0 !important; }
    .studio-app .rubric-card { padding: 16px; }
    .studio-app .account-card { padding: 28px; }
  }
  @media (prefers-reduced-motion: reduce) { .studio-app *, .studio-app *::before, .studio-app *::after { transition: none !important; scroll-behavior: auto !important; } }
}
@media print { .workspace-heading { display: none !important; } }
@media screen and (max-width:760px) {
  .studio-app .site-header__inner { flex-direction: row; flex-wrap: nowrap; padding: 10px 16px; gap: 8px; }
  .studio-app .brand { gap: 8px; min-width: 0; }
  .studio-app .brand img { height: 32px; }
  .studio-app .brand__title { font-size: 12px; }
  .studio-app .brand__tag { display: none; }
  .studio-app .lang-switch > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .studio-app .lang-switch select { max-width: 82px; padding: 6px; font-size: 11px; }
  .studio-app .site-nav { gap: 6px; justify-content: flex-end; }
  .studio-app .app-topbar { padding: 0; min-width: 0; }
  .studio-app .tenant-pill { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .studio-app #topbar-uni-meta { display: none; }
  .studio-app .seat-badge { font-size: 10px; }
  .workspace-heading { padding: 12px 0; }
  .workspace-kicker { display: none; }
  .workspace-heading h1 { font-size: 24px; margin-bottom: 4px; }
  .workspace-heading p:last-child { font-size: 12px; }
  .studio-app .sample-box span { display: none; }
  .studio-app .sample-box { gap: 6px; padding-bottom: 12px; }
  .studio-app .sample-box label { font-size: 11px; }
}

/* Keep account context and tabs in one compact strip on larger screens. */
@media screen {
  .studio-app .app-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px; max-width: 1440px; margin: auto; background: #f7f8f9; border-bottom: 1px solid #d9dbdd; }
  .studio-app .app-subnav { border: 0; flex-shrink: 0; }
  .studio-app .app-subnav__inner { padding: 0; }
  .studio-app .studio-help { margin: 0 0 10px; font-size: 13px; }
  .studio-app .studio-guidance { max-width: 85ch; margin: 0 auto 16px; line-height: 1.6; font-size: 12px; color: #54595f; }
}
@media screen and (max-width: 1000px) {
  .studio-app .app-navigation { flex-wrap: wrap; gap: 0; }
  .studio-app .app-topbar { flex-basis: 100%; padding-top: 4px; }
}
@media screen and (max-width: 760px) {
  .studio-app .app-navigation { padding: 0 16px; }
  .studio-app .app-topbar { padding-top: 0; }
  .studio-app .seat-badge { display: none; }
  .studio-app .tenant-pill { max-width: none; white-space: normal; }
  .studio-app .app-tab-btn { padding: 7px 0; }
  .studio-app .draft-bar { gap: 6px 10px; }
  .studio-app .draft-bar__check { flex: 1 1 160px; }
  .studio-app .draft-bar__status { flex-basis: 100%; line-height: 1.4; }
  .studio-app .site-nav { flex-wrap: nowrap; align-items: center; }
  .studio-app .site-nav .btn-outline { padding: 7px 9px; font-size: 11px; white-space: nowrap; }
  .studio-app .brand__title { max-width: 150px; }
  .studio-app .app-workspace { padding-inline: 16px; }
  .studio-app .step-sidebar > .eyebrow-small { display: none; }
  .studio-app .sample-box { padding: 0; }
  .studio-app .sample-box label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Homepage (signed-out) */
.account-gate{display:block;min-height:0;padding:0 0 72px}
/* Sign-in page: the headline and the form sit side by side so the whole form shows on a 1280x800 screen; narrow screens stack them. */
.gate-top,.gate-more{padding-inline:20px}
.gate-top{max-width:1180px;margin:0 auto;padding-top:32px;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:40px;align-items:start}
.gate-intro{padding-top:8px}
.gate-intro h1{font-weight:700;font-size:clamp(28px,3.4vw,42px);line-height:1.15;color:#14282d;margin:10px 0 16px}
.gate-lead{font-size:17px;line-height:1.6;color:#45494e;max-width:560px;margin:0 0 18px}
.gate-ticks{list-style:none;padding:0;margin:0 0 24px;display:grid;gap:8px;color:#45494e;font-size:14px}
.gate-ticks li{padding-inline-start:26px;position:relative}
.gate-ticks li::before{content:'';position:absolute;inset-inline-start:0;top:.35em;width:14px;height:8px;border-inline-start:2px solid #2b7a78;border-bottom:2px solid #2b7a78;transform:rotate(-45deg)}
[dir=rtl] .gate-ticks li::before{transform:rotate(45deg)}
.gate-top .account-card{max-width:none;margin:0}
.studio-app .gate-top .account-card{padding:28px 32px}
.account-card h2{font-weight:700;font-size:28px;color:#14282d;margin:0 0 8px}
.account-card .account-submit{margin-top:18px}
.account-note{margin:0 0 12px}
.gate-more{max-width:1180px;margin:56px auto 0}
.gate-more h2{font-weight:700;font-size:28px;color:#14282d;margin:0 0 20px}
.gate-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:40px;align-items:start}
.gate-steps{margin:0 0 18px;padding-inline-start:22px;display:grid;gap:12px;font-size:15px;line-height:1.6;color:#45494e}
.gate-who,.gate-privacy{font-size:14px;color:#50555b;margin:0 0 8px}
.gate-privacy{color:#0c6368}
.gate-example{margin:0}
.gate-example__img{display:block;width:100%;height:auto;border:1px solid #dfe1e3;border-radius:8px}
.gate-example figcaption{font-size:12px;color:#6a7078;margin-top:8px}
.gate-scale{margin:48px 0 0}
.gate-scale img{width:100%;height:auto;display:block;border-radius:8px;border:1px solid #dfe1e3}
.gate-scale figcaption{font-size:12px;color:#6a7078;margin-top:8px}
[dir=rtl] .gate-intro h1,[dir=rtl] .gate-more h2,[dir=rtl] .account-card h2{font-family:'IBM Plex Sans Arabic',Tahoma,sans-serif;letter-spacing:0}
@media (max-width:900px){
 .gate-top,.gate-split{grid-template-columns:minmax(0,1fr);gap:24px}
 .gate-top{padding-top:20px}
 .account-gate{padding:0 0 48px}
 .gate-top,.gate-more{padding-inline:16px}
 .studio-app .gate-top .account-card{padding:22px 18px}
}

/* Step 1: context first, brief details optional */
.field-grid--two{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.optional-details{margin-top:28px;border:1px solid #dfe1e3;border-radius:8px;padding:14px 18px;background:#f9f9fa}
.optional-details>summary{cursor:pointer;list-style:none;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
.optional-details>summary .field-hint{margin:0}
.optional-details>summary::-webkit-details-marker{display:none}
.optional-details>summary::before{content:'+';font-weight:700;color:#0c6368;width:1em}
.optional-details[open]>summary::before{content:'\2212'}
.optional-details[open]>summary{margin-bottom:14px}

/* AI step: plain-language summary of what is sent, and the idea cards */
.ai-send-summary { margin-top: 10px; padding: 12px 14px; background: #f7f8f9; border: 1px solid #d9dbdd; border-radius: 8px; color: #2a2c2f; font-size: 14px; }
.ai-send-summary dl { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 6px 16px; margin: 0; }
.ai-send-summary dt { font-weight: 600; color: #4e5257; }
.ai-send-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-send-summary ul { margin: 0; padding-inline-start: 18px; white-space: normal; }
.ai-send-never { margin: 10px 0 0; font-size: 13px; color: #656a71; }
.ai-ideas { display: grid; gap: 10px; margin-bottom: 14px; }
.ai-idea { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #d2d4d7; border-radius: 8px; background: #fff; cursor: pointer; }
.ai-idea:hover { border-color: #91969e; }
.ai-idea:has(input:checked) { border-color: #14282d; box-shadow: 0 0 0 1px #14282d; background: #f4f5f6; }
.ai-idea input { margin-top: 4px; flex: none; accent-color: #14282d; }
.ai-idea__body { display: grid; gap: 4px; }
.ai-idea__title { font-size: 15px; color: #14282d; }
.ai-idea__summary { color: #2a2c2f; }
.ai-idea__meta { font-size: 13px; color: #4e5257; }
.ai-notes-label { display: block; font-weight: 600; margin: 4px 0 6px; }
@media (max-width: 640px) {
  .ai-send-summary dl { grid-template-columns: 1fr; gap: 2px; }
  .ai-send-summary dd { margin-bottom: 8px; }
}

@media screen and (max-width: 360px) {
  .studio-app .brand__title { font-size: 11px; }
  .studio-app .site-nav { gap: 4px; }
  .studio-app .site-nav .btn-outline { padding-inline: 6px; }
  .studio-app .step-item { flex-direction: column; text-align: center; padding: 8px 4px; gap: 4px; }
  .studio-app .step-item strong { font-size: 10px; }
  .workspace-heading h1 { font-size: 22px; }
}

/* Step 3: the task editor and the formatted brief side by side from 1000px; the editor comes first on narrower screens. */
.brief-workbench{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-top:16px;align-items:start}
.brief-workbench__editor h2,.brief-workbench__heading,#draft-export-heading{margin:0 0 6px;font-size:1.15em}
.brief-workbench__textarea{min-height:16em;resize:vertical}
.brief-workbench__preview{min-width:0}
#toolbar-format-title{scroll-margin-top:100px}
#toolbar-format-title:focus-visible{outline:2px solid var(--aias-blue);outline-offset:5px}
@media screen and (min-width:1000px){
 .brief-workbench{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:24px}
 .brief-workbench__editor{position:sticky;top:16px}
 .brief-workbench__textarea{min-height:24em}
}
.export-status:empty{display:none}
.export-status{margin:10px 0 0;font-weight:600}
@media screen and (max-width: 600px) {
  #rendered-uni-brief table { display: block; max-width: 100%; overflow-x: auto; }
}
body.privacy-pending .app-workspace > :not(#privacy-entry), body.privacy-pending .draft-bar { display: none !important; }
body:not(.privacy-pending) #privacy-entry { display: none; }
#privacy-entry { max-width: 760px; margin: 24px auto; }

/* Starting point: redesign an existing task or design a new one */
.start-choice { border: 1px solid var(--border-light); border-radius: 10px; margin: 0 0 18px; padding: 12px 16px 10px; min-inline-size: 0; }
.start-choice legend { font-weight: 700; color: var(--ink-900); padding: 0 6px; }
.start-choice__options { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.start-choice__option { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--ink-900); }
.start-choice__option input { inline-size: 18px; block-size: 18px; accent-color: var(--aias-blue); }
.start-choice__option input:focus-visible { outline: 3px solid var(--aias-blue); outline-offset: 2px; }
.start-choice__hint { margin: 6px 0 0; }
/* Designing a new task: no existing brief to import and no samples to load */
body[data-start="new"] .start-existing-only { display: none !important; }

/* Step 1: marking criteria are optional and folded away until used. */
.rubric-details .rubric-card{margin-top:0}
.studio-app .rubric-details .rubric-card{margin-top:0}
.rubric-empty{margin:8px 0 0}
.sample-slot:empty{display:none}
.sample-slot{margin:0 0 18px}
/* Below 640px each criterion is a stacked card with visible labels (the label text comes from data-label on each cell). */
@media screen and (max-width:639px){
 .workspace-heading{display:none}
 .rubric-edit-table,.rubric-edit-table tbody,.rubric-edit-table tr,.rubric-edit-table td,.rubric-edit-table tfoot{display:block;width:100%}
 .rubric-edit-table thead{display:none}
 .rubric-edit-table th,.rubric-edit-table td{width:auto !important}
 .rubric-edit-table tbody tr{position:relative;border:1px solid #dadcde;border-radius:8px;padding:10px 12px 4px;margin:0 0 12px;background:#fff}
 .rubric-edit-table tbody td{border:0;padding:0 0 8px}
 .rubric-edit-table tbody td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:600;margin:0 0 4px}
 .rubric-edit-table tbody td.rubric-row-remove{position:absolute;top:4px;inset-inline-end:4px;width:auto;padding:0}
 .rubric-edit-table tbody tr td:first-child{padding-inline-end:36px}
 .rubric-edit-table tfoot tr{display:flex;flex-wrap:wrap;gap:4px 12px}
 .rubric-edit-table tfoot td{width:auto;border:0;padding:0}
}

/* Step 2: none of the six options is selected for a new task; the sixth leaves the level open. */
.level-option--open .level-option__head{background:#fff;border-bottom:1px dashed #b9bcc0}
.level-option--open{border-style:dashed}
.level-option--open.selected{border-style:solid}
.step-nav__next{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 12px}
.level-required-note{margin:0}
.level-required-note:empty,.level-required-note[hidden]{display:none}
.level-required-note--alert{font-weight:600}

/* Step 3: each AI idea shows the level it proposes when the level was left open. */
.ai-idea__level{justify-self:start;display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:600}
.ai-idea-level-note{margin:0 0 12px;font-weight:600}

/* ==========================================================================
   Look built from the AI Assessment Scale (design review, 11 Nov 2026):
   white page, one sans-serif typeface, neutral greys, and the five level
   colours as the visual identity. Green is kept for buttons and links only.
   ========================================================================== */
:root{--aias-band:linear-gradient(90deg,var(--level-1) 0 20%,var(--level-2) 20% 40%,var(--level-3) 40% 60%,var(--level-4) 60% 80%,var(--level-5) 80% 100%)}
body.studio-app{background:#ffffff}
.aias-rainbow-bar{height:8px}
/* The sign-in card and the main step card carry the five-colour band along their top edge. */
.account-card{position:relative;overflow:hidden}
.account-card::before{content:"";position:absolute;inset-block-start:0;inset-inline:0;height:6px;background:var(--aias-band)}
[dir=rtl] .account-card::before,[dir=rtl] .aias-rainbow-bar{transform:scaleX(-1)}
.gate-example__img{border-color:#d5dae0}
.studio-app .step-item.active .step-num,.step-item.active .step-num{background:#14282d;border-color:#14282d;color:#fff}
.step-tag{color:var(--ink-600)}
.level-selected-pill{text-transform:none;letter-spacing:0}
.level-option--open .level-option__head{background:#fff;font-weight:700}
.ai-idea__level{color:#14282d}

/* AI requests: a spinner in the clicked button and beside the status message; disabled buttons are visibly greyed. */
.studio-app button:disabled{opacity:.45;cursor:not-allowed}
.studio-app button.is-busy{opacity:.75;cursor:progress}
.ai-status{min-height:1.4em}
.ai-status.is-busy{color:#14282d;font-weight:600}
.ai-status.is-busy::before,button.is-busy::before{content:'';display:inline-block;box-sizing:border-box;width:13px;height:13px;margin-inline-end:8px;vertical-align:-2px;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:ai-spin .8s linear infinite}
@keyframes ai-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ai-status.is-busy::before,button.is-busy::before{animation:none}}
.ai-ideas.is-waiting,#ai-idea-notes.is-waiting{opacity:.55}
#ai-ideas-panel,#ai-review-notes-card,#ai-proposal,#draft-export-heading,#brief-workbench{scroll-margin-top:16px}
.ai-ideas-buttons{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
#ai-write-status{margin:10px 0 0}
.brief-workbench__next{display:inline-block;margin-top:12px;font-weight:600}
.brief-workbench__next::after{content:' ↓'}
/* Desktop: the ideas are listed on the left; the notes, the buttons and the status stay in view on the right. */
@media screen and (min-width:1100px){
 .ai-ideas-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
 .ai-ideas-layout .ai-ideas{margin-bottom:0}
 .ai-ideas-actions{position:sticky;top:16px}
 .ai-ideas-buttons{flex-direction:column;align-items:stretch}
 .ai-ideas-actions .ai-notes-label{margin-top:0}
 .studio-app textarea.brief-workbench__textarea{height:calc(100vh - 270px);min-height:16em}
}

/* Steps 1 and 2 on desktop: fields side by side instead of one stacked column. Narrower screens keep the single column. */
@media screen and (min-width:1200px){
 .studio-app .step1-setup{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:stretch;margin-bottom:22px}
 .studio-app .step1-setup .start-choice,.studio-app .step1-setup .setting-row{margin:0}
 .studio-app .step1-setup .start-choice{display:flex;flex-direction:column;justify-content:center}
 .studio-app .step1-setup .setting-row{grid-template-columns:minmax(0,2.4fr) minmax(120px,1fr);align-content:center;align-items:end}
 .studio-app .step1-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 32px;align-items:start;border-top:1px solid #e0e2e4;padding-top:24px}
 .studio-app .step1-columns .form-section-title{margin-top:0;padding-top:0;border-top:0}
 .studio-app .step1-columns .field-grid--two{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}
 .studio-app .step1-columns .dropzone{padding:16px 18px}
 .studio-app #inp-context{min-height:190px}
 .studio-app #inp-original-brief{min-height:190px}
 .studio-app .optional-details{margin-top:16px}
}
/* Step 2 already uses the full width; on desktop it is tightened so more of it fits in one window. */
@media screen and (min-width:1100px){
 .studio-app #studio-step-2 .step-intro{margin-bottom:16px}
 .studio-app #studio-step-2 .level-selector-grid{margin:16px 0;gap:8px}
 .studio-app #studio-step-2 .level-option__head{padding:13px 18px}
 .studio-app #studio-step-2 .level-option__body{padding:13px 22px;line-height:1.6}
 .studio-app #studio-step-2 .two-col{margin-top:14px}
 .studio-app #studio-step-2 .option-card{padding:16px 20px}
 /* Back and Continue stay at the bottom of the window while the step is longer than the window. */
 .studio-app #studio-step-1 .step-nav,.studio-app #studio-step-2 .step-nav{position:sticky;bottom:0;z-index:2;margin:22px -36px -32px;padding:14px 36px;background:#fff;border-top:1px solid #dadcde;border-radius:0 0 12px 12px}
}
/* Laptop-height windows: a smaller page title leaves more room for the step itself. */
@media screen and (min-width:1100px) and (max-height:900px){
 .workspace-heading{padding:10px 0}
 .workspace-heading h1{font-size:24px;margin:0}
 .workspace-heading p:last-child{display:none}
}

/* AI draft: the two choices side by side, and the box for requested changes. */
.ai-proposal-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.ai-revise-panel{margin-top:12px;padding:12px 14px;border:1px solid #dadcde;border-radius:8px;background:#f7f8f8}
.studio-app .ai-revise-panel textarea.form-control{min-height:84px}
.ai-outgoing{margin:10px 0 8px}
body:not(.school-mode) .school-only{display:none}
