/* AIForSRE v69 — Enterprise Workbench portrait-flow hotfix; v68 layout preserved */
#aiforsre-enterprise-workbench {
  --ew-bg: #090f17;
  --ew-panel: #0d151f;
  --ew-panel-2: #101a27;
  --ew-line: #26394e;
  --ew-line-soft: rgba(74,104,137,.32);
  --ew-text: #f6f8fc;
  --ew-muted: #9db0ca;
  --ew-mint: #6ef3c5;
  --ew-cyan: #53c7ff;
  --ew-purple: #a784ff;
  width: min(1200px, calc(100% - 40px));
  max-width: 1200px;
  margin: 28px auto 72px;
  color: var(--ew-text);
  clear: both;
  position: relative;
}
#aiforsre-enterprise-workbench * { box-sizing: border-box; }
.enterprise-workbench__topline {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid #263443;
}
.enterprise-workbench__eyebrow,
.enterprise-workbench__kicker {
  margin: 0 0 10px;
  color: var(--ew-mint);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.enterprise-workbench__topline h2 {
  max-width: 1040px;
  margin: 0;
  color: var(--ew-text);
  font-size: clamp(34px,4.2vw,56px);
  line-height: 1.02;
  letter-spacing: -.043em;
  text-wrap: balance;
}
.enterprise-workbench__lede {
  max-width: 1020px;
  margin: 17px 0 0;
  color: var(--ew-muted);
  font-size: 17px;
  line-height: 1.58;
}
.enterprise-workbench__privacy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  padding: 9px 12px;
  border: 1px solid rgba(110,243,197,.28);
  border-radius: 999px;
  color: #a9c9bf;
  background: rgba(110,243,197,.035);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
}
.enterprise-workbench__privacy-dot { width:7px; height:7px; border-radius:50%; background:var(--ew-mint); box-shadow:0 0 14px rgba(110,243,197,.72); }

.enterprise-workbench__artifact-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid #284159;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(135deg,rgba(83,199,255,.07),rgba(110,243,197,.035)),#0c141e;
}
.enterprise-workbench__artifact-bar > div:first-child { min-width:0; }
.enterprise-workbench__artifact-label { display:block; margin-bottom:5px; color:var(--ew-cyan); font-size:10px; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.enterprise-workbench__artifact-bar strong { font-size:14px; line-height:1.4; }
.enterprise-workbench__actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.enterprise-workbench__actions button,
.enterprise-workbench__intake-footer button {
  appearance:none;
  border:1px solid #35516d;
  border-radius:10px;
  padding:9px 12px;
  color:#c8e7ff;
  background:#101a25;
  cursor:pointer;
  font:inherit;
  font-size:11px;
  font-weight:800;
  transition:border-color .18s ease, background .18s ease, transform .18s ease;
}
.enterprise-workbench__actions button:hover,
.enterprise-workbench__actions button:focus-visible,
.enterprise-workbench__intake-footer button:hover,
.enterprise-workbench__intake-footer button:focus-visible { outline:none; border-color:var(--ew-cyan); background:#122233; transform:translateY(-1px); }

.enterprise-workbench__tabs {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-right:1px solid #263b50;
  border-left:1px solid #263b50;
  background:#09111a;
}
.enterprise-workbench__tabs button {
  appearance:none;
  position:relative;
  padding:15px 12px;
  border:0;
  border-right:1px solid #263b50;
  color:#8094af;
  background:transparent;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  font-weight:800;
  letter-spacing:.025em;
}
.enterprise-workbench__tabs button:last-child { border-right:0; }
.enterprise-workbench__tabs button[aria-selected="true"] { color:#f4f8ff; background:linear-gradient(180deg,rgba(83,199,255,.08),rgba(83,199,255,.025)); }
.enterprise-workbench__tabs button[aria-selected="true"]::after { content:""; position:absolute; left:18px; right:18px; bottom:0; height:2px; background:linear-gradient(90deg,var(--ew-cyan),var(--ew-mint)); box-shadow:0 0 13px rgba(83,199,255,.45); }

.enterprise-workbench__panels {
  border:1px solid #263b50;
  border-radius:0 0 24px 24px;
  overflow:hidden;
  background:
    linear-gradient(rgba(31,48,68,.11) 1px,transparent 1px),
    linear-gradient(90deg,rgba(31,48,68,.11) 1px,transparent 1px),
    linear-gradient(180deg,#0d151f,#091018);
  background-size:32px 32px,32px 32px,auto;
}
.enterprise-workbench__panel { padding:30px; }
.enterprise-workbench__panel[hidden] { display:none; }
.enterprise-workbench__panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:22px; margin-bottom:24px; }
.enterprise-workbench__panel-head h3 { margin:0; max-width:780px; font-size:clamp(24px,3vw,36px); line-height:1.08; letter-spacing:-.03em; }
.enterprise-workbench__badge { display:inline-flex; padding:7px 9px; border:1px solid rgba(83,199,255,.3); border-radius:999px; color:#80d8ff; background:rgba(83,199,255,.04); font-size:9px; font-weight:850; letter-spacing:.09em; white-space:nowrap; }

.enterprise-workbench__owner-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.enterprise-workbench__owner-grid article { min-width:0; padding:18px; border:1px solid #26394e; border-radius:16px; background:rgba(11,19,29,.82); }
.enterprise-workbench__owner-grid b { display:block; color:#f4f7fc; font-size:15px; }
.enterprise-workbench__owner-grid span { display:block; margin-top:8px; color:var(--ew-muted); font-size:13px; line-height:1.5; }
.enterprise-workbench__definition { display:grid; grid-template-columns:180px minmax(0,1fr); gap:20px; align-items:start; margin-top:16px; padding:17px 18px; border:1px solid rgba(110,243,197,.25); border-radius:14px; background:rgba(110,243,197,.035); }
.enterprise-workbench__definition span { color:var(--ew-mint); font-size:11px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.enterprise-workbench__definition p { margin:0; color:#bed0e4; font-size:13px; line-height:1.55; }

.enterprise-workbench__table-wrap { overflow-x:auto; border:1px solid #26394e; border-radius:15px; background:rgba(8,14,22,.82); }
.enterprise-workbench__table { width:100%; min-width:780px; border-collapse:collapse; font-size:12px; }
.enterprise-workbench__table th { padding:12px 14px; border-bottom:1px solid #2b4158; color:#84d9ff; background:#101a26; text-align:left; font-size:10px; letter-spacing:.09em; text-transform:uppercase; }
.enterprise-workbench__table td { padding:13px 14px; border-bottom:1px solid #1f3042; color:#b8c8db; vertical-align:top; line-height:1.45; }
.enterprise-workbench__table td:first-child { color:#edf4fc; font-weight:700; }
.enterprise-workbench__table tr:last-child td { border-bottom:0; }
.enterprise-workbench__note { margin:16px 0 0; padding:14px 16px; border-left:3px solid var(--ew-purple); color:var(--ew-muted); background:rgba(167,132,255,.035); font-size:13px; line-height:1.55; }
.enterprise-workbench__note strong { color:#ddd1ff; }

.enterprise-workbench__panel-head--intake { align-items:center; }
.enterprise-workbench__score { display:grid; place-items:center; min-width:128px; padding:13px 18px; border:1px solid rgba(110,243,197,.3); border-radius:15px; background:rgba(110,243,197,.04); text-align:center; }
.enterprise-workbench__score strong { color:var(--ew-mint); font-size:24px; line-height:1; }
.enterprise-workbench__score span { margin-top:6px; color:#9cc7ba; font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.enterprise-workbench__checklist { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.enterprise-workbench__check { position:relative; display:grid; grid-template-columns:22px minmax(0,1fr); gap:10px; align-items:center; min-height:52px; padding:11px 13px; border:1px solid #26394e; border-radius:13px; color:#b9c9dc; background:#0b131d; cursor:pointer; font-size:12px; line-height:1.4; }
.enterprise-workbench__check input { position:absolute; opacity:0; pointer-events:none; }
.enterprise-workbench__checkmark { display:grid; place-items:center; width:22px; height:22px; border:1px solid #3a536f; border-radius:7px; color:transparent; background:#0e1823; font-size:12px; }
.enterprise-workbench__check:has(input:checked) { border-color:rgba(110,243,197,.37); background:rgba(110,243,197,.035); color:#e1f1eb; }
.enterprise-workbench__check input:checked + .enterprise-workbench__checkmark { color:#06110d; border-color:var(--ew-mint); background:var(--ew-mint); }
.enterprise-workbench__check:focus-within { outline:2px solid rgba(83,199,255,.45); outline-offset:2px; }
.enterprise-workbench__progress { height:5px; margin-top:16px; border-radius:999px; overflow:hidden; background:#172434; }
.enterprise-workbench__progress span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--ew-cyan),var(--ew-mint)); transition:width .2s ease; }
.enterprise-workbench__intake-footer { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-top:14px; }
.enterprise-workbench__intake-footer p { margin:0; color:#8296af; font-size:12px; line-height:1.5; }
.enterprise-workbench__intake-footer strong { color:#d9e6f4; }

.enterprise-workbench__timeline { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.enterprise-workbench__timeline article { position:relative; min-width:0; padding:20px; border:1px solid #26394e; border-radius:16px; background:rgba(11,19,29,.84); }
.enterprise-workbench__timeline article::before { content:""; position:absolute; top:-1px; left:18px; right:18px; height:2px; background:linear-gradient(90deg,var(--ew-cyan),var(--ew-mint)); opacity:.7; }
.enterprise-workbench__timeline span { color:var(--ew-cyan); font-size:10px; font-weight:850; letter-spacing:.12em; }
.enterprise-workbench__timeline h4 { margin:8px 0 14px; font-size:17px; }
.enterprise-workbench__timeline ul { margin:0; padding-left:18px; color:#9eb0c7; font-size:12px; line-height:1.55; }
.enterprise-workbench__timeline li + li { margin-top:6px; }
.enterprise-workbench__anti-pattern { display:grid; grid-template-columns:180px 1fr; gap:18px; margin-top:16px; padding:15px 17px; border:1px solid rgba(255,187,92,.24); border-radius:14px; background:rgba(255,187,92,.025); }
.enterprise-workbench__anti-pattern b { color:#ffca80; font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.enterprise-workbench__anti-pattern span { color:#b8a991; font-size:12px; line-height:1.5; }

.enterprise-workbench__executive { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr); gap:24px; margin-top:18px; padding:20px 22px; border:1px solid rgba(110,243,197,.26); border-radius:17px; background:linear-gradient(120deg,rgba(110,243,197,.045),rgba(83,199,255,.025)); }
.enterprise-workbench__executive p { margin:0 0 7px; color:var(--ew-mint); font-size:10px; font-weight:850; letter-spacing:.12em; }
.enterprise-workbench__executive strong { display:block; max-width:850px; font-size:16px; line-height:1.45; }
.enterprise-workbench__executive > span { align-self:center; color:#9db0ca; font-size:12px; line-height:1.5; }

@media (max-width:900px) {
  .enterprise-workbench__topline { grid-template-columns:1fr; gap:18px; }
  .enterprise-workbench__privacy { justify-self:start; }
  .enterprise-workbench__owner-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .enterprise-workbench__timeline { grid-template-columns:1fr; }
  .enterprise-workbench__executive { grid-template-columns:1fr; }
}
@media (max-width:680px) {
  #aiforsre-enterprise-workbench { width:min(100% - 24px,1200px); margin:30px auto 64px; }
  .enterprise-workbench__topline h2 { font-size:clamp(32px,10vw,44px); }
  .enterprise-workbench__artifact-bar { align-items:flex-start; flex-direction:column; }
  .enterprise-workbench__actions { justify-content:flex-start; }
  .enterprise-workbench__tabs { grid-template-columns:repeat(2,1fr); }
  .enterprise-workbench__tabs button:nth-child(2) { border-right:0; }
  .enterprise-workbench__tabs button:nth-child(-n+2) { border-bottom:1px solid #263b50; }
  .enterprise-workbench__panel { padding:20px 15px; }
  .enterprise-workbench__panel-head { flex-direction:column; }
  .enterprise-workbench__owner-grid,
  .enterprise-workbench__checklist { grid-template-columns:1fr; }
  .enterprise-workbench__definition,
  .enterprise-workbench__anti-pattern { grid-template-columns:1fr; gap:8px; }
  .enterprise-workbench__intake-footer { align-items:flex-start; flex-direction:column; }
}


/* v69: portrait/tablet flow guard.
   The JS only applies a negative margin when it detects a genuinely unused
   vertical gap between the lesson's last visible content and the Workbench. */
#aiforsre-enterprise-workbench[data-ew-portrait-compacted="true"] {
  position: relative;
  z-index: 2;
}
@media (orientation: portrait) {
  #aiforsre-enterprise-workbench {
    scroll-margin-top: 84px;
  }
}
