/* Institutional page editor restored from the stable branch for Ed2. */
/* ===== Institutional page editor ===== */
.si-app-workspace.si-app-workspace--partner-editor {
  height: calc(100dvh - var(--si-platform-topbar-height) - var(--si-platform-bottom-height));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px 12px;
}

.si-app-workspace--partner-editor .si-app-page-head {
  min-height: 42px;
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.si-app-workspace--partner-editor .si-app-page-head p {
  font-size: .74rem;
}

.si-app-workspace--partner-editor .si-app-page-head h1 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.si-app-workspace--partner-editor .si-app-page-home {
  min-height: 34px;
  padding-inline: 11px;
  font-size: .8rem;
}

.partner-editor-host {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.partner-editor-back {
  display: inline-flex;
  align-self: flex-start;
  flex: 0 0 auto;
  margin: 0;
  color: var(--si-platform-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.partner-visual-editor {
  --editor-red: #dc3545;
  --editor-red-dark: #bd2534;
  --editor-text: #20242b;
  --editor-muted: #69717d;
  --editor-line: #dfe3e8;
  --editor-canvas: #f3f4f6;
  --editor-surface: #fff;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--editor-line);
  border-radius: 10px;
  color: var(--editor-text);
  background: var(--editor-surface);
  box-shadow: 0 8px 28px rgba(23, 31, 44, 0.06);
}

.si-institution-page-panel .partner-visual-editor {
  height: clamp(620px, calc(100dvh - 120px), 820px);
  min-height: 620px;
}

.partner-editor-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.partner-editor-toolbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--editor-line);
  background: #fff;
}

.partner-editor-institution {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-editor-institution > div {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--editor-line);
  border-radius: 8px;
  color: #fff;
  background: #29314f;
  font-weight: 850;
}

.partner-editor-institution img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  background: #fff;
}

.partner-editor-institution span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.partner-editor-institution strong {
  overflow: hidden;
  color: var(--editor-text);
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-editor-institution a {
  overflow: hidden;
  color: #3367c1;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-editor-save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #267a45;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.partner-editor-save-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.partner-editor-save-status.dirty {
  color: #d98b00;
}

.partner-editor-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.partner-editor-plan-badge.premium {
  color: #684400;
  background: #fff0bf;
}

.partner-editor-plan-badge.free {
  color: #405061;
  background: #e9edf2;
}

.partner-editor-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.si-app-shell .partner-editor-toolbar-actions button,
.partner-editor-toolbar-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--editor-line);
  border-radius: 6px;
  color: var(--editor-text);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: none;
}

.si-app-shell .partner-editor-toolbar-actions button:hover,
.partner-editor-toolbar-actions a:hover {
  color: var(--editor-text);
  background: #f6f7f8;
}

.si-app-shell .partner-editor-toolbar-actions .quiet {
  border-color: transparent;
  color: var(--editor-muted);
  background: transparent;
}

.si-app-shell .partner-editor-toolbar-actions .primary {
  border-color: var(--editor-red);
  color: #fff;
  background: var(--editor-red);
}

.si-app-shell .partner-editor-toolbar-actions .primary:hover {
  background: var(--editor-red-dark);
}

.si-app-shell .partner-editor-toolbar-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.partner-editor-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--editor-line);
  font-size: .8rem;
}

.partner-editor-message strong {
  flex: 0 0 auto;
  font-weight: 800;
}

.partner-editor-message span {
  font-weight: 650;
}

.partner-editor-message.error { color: #9e2631; background: #fff2f3; }
.partner-editor-message.success { color: #176b36; background: #effaf3; }

.partner-editor-premium-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #eadba9;
  color: #654600;
  background: #fff9e6;
  font-size: .78rem;
}

.partner-editor-premium-notice strong { white-space: nowrap; }

.partner-editor-layout {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: clamp(220px, 15vw, 252px) minmax(620px, 1fr);
  background: var(--editor-canvas);
}

.partner-editor-sections,
.partner-editor-inspector {
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.partner-editor-sections {
  border-right: 1px solid var(--editor-line);
  padding: 14px 10px 24px;
}

.partner-editor-section-group {
  padding: 4px 0;
  border-bottom: 1px solid #edf0f2;
}

.partner-editor-section-group:last-child { border-bottom: 0; }

.partner-editor-section-group h3 {
  margin: 0;
}

.si-app-shell .partner-editor-group-toggle {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: #505863;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.si-app-shell .partner-editor-group-toggle:hover {
  color: var(--editor-text);
  background: #f4f6f8;
}

.si-app-shell .partner-editor-group-toggle[aria-expanded="true"] {
  color: #9f1f2b;
  background: #fff5f6;
}

.partner-editor-group-toggle > span {
  overflow: hidden;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-overflow: ellipsis;
}

.partner-editor-group-toggle > small {
  min-width: 21px;
  min-height: 21px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: var(--editor-muted);
  background: #e9edf1;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 0;
}

.partner-editor-group-toggle[aria-expanded="true"] > small {
  color: #9f1f2b;
  background: #ffe1e4;
}

.partner-editor-group-toggle .partner-editor-icon {
  width: 14px;
  height: 14px;
}

.partner-editor-group-content {
  display: grid;
  gap: 2px;
  padding: 4px 0 8px;
}

.partner-editor-group-content[hidden] { display: none; }

.partner-editor-section-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background .15s ease;
}

.partner-editor-section-row:hover { background: #f7f8f9; }
.partner-editor-section-row.active { background: #fff0f1; box-shadow: inset 3px 0 0 var(--editor-red); }
.partner-editor-section-row.locked { color: #818b96; background: #fafbfc; }
.partner-editor-section-row.locked.active { box-shadow: inset 3px 0 0 #d4b14d; }

.si-app-shell .partner-editor-section-select,
.si-app-shell .partner-editor-order-actions button,
.si-app-shell .partner-editor-switch {
  min-height: auto;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.si-app-shell .partner-editor-section-select:hover,
.si-app-shell .partner-editor-order-actions button:hover,
.si-app-shell .partner-editor-switch:hover { color: inherit; background: transparent; }

.partner-editor-section-select {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.partner-editor-section-select span {
  overflow: hidden;
  font-size: .78rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-editor-section-select small {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #765000;
  background: #fff0bf;
  font-size: .58rem;
  font-weight: 800;
}

.partner-editor-section-row.active .partner-editor-section-select { color: #a81f2c; }
.partner-editor-drag { display: grid; color: #98a0aa; }
.partner-editor-drag .partner-editor-icon { width: 12px; }

.partner-editor-order-actions {
  display: none;
  align-items: center;
}

.partner-editor-section-row:hover .partner-editor-order-actions { display: flex; }
.partner-editor-order-actions button { width: 17px; height: 22px; display: grid; place-items: center; }
.partner-editor-order-actions .partner-editor-icon { width: 11px; height: 11px; }
.partner-editor-order-actions button:disabled { opacity: .2; }

.partner-editor-switch {
  width: 31px;
  height: 18px;
  position: relative;
  border-radius: 99px !important;
  background: #c8ced5 !important;
}

.partner-editor-switch span {
  width: 14px;
  height: 14px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
  transition: transform .16s ease;
}

.partner-editor-switch.on { background: #35404c !important; }
.partner-editor-switch.on span { transform: translateX(13px); }
.partner-editor-dirty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--editor-red); }

.partner-editor-canvas {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  overflow: hidden;
  padding: 0 22px 22px;
  background: var(--editor-canvas);
}

.partner-preview-devices {
  display: flex;
  align-items: center;
  justify-content: center;
}

.si-app-shell .partner-preview-devices button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  border: 1px solid var(--editor-line);
  border-right-width: 0;
  border-radius: 0;
  color: var(--editor-muted);
  background: #fff;
  font-size: .72rem;
  box-shadow: none;
}

.si-app-shell .partner-preview-devices button:first-child { border-radius: 6px 0 0 6px; }
.si-app-shell .partner-preview-devices button:last-child { border-right-width: 1px; border-radius: 0 6px 6px 0; }
.si-app-shell .partner-preview-devices button:hover { color: var(--editor-text); background: #fff; }
.si-app-shell .partner-preview-devices button.active { color: var(--editor-text); background: #f7f8f9; box-shadow: inset 0 0 0 1px #88919b; }
.partner-preview-devices .partner-editor-icon { width: 15px; height: 15px; }

.partner-preview-frame {
  width: 100%;
  min-height: 0;
  align-self: stretch;
  justify-self: center;
  overflow: hidden;
  border: 1px solid #cfd5db;
  border-radius: 10px 10px 4px 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(27, 38, 54, .12);
  transition: width .2s ease;
}

.partner-preview-frame.device-tablet { width: min(720px, 80%); }
.partner-preview-frame.device-mobile { width: min(390px, 65%); }

.partner-preview-browserbar {
  height: 34px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #e4e7ea;
  background: #fafbfc;
}

.partner-preview-browserbar > div {
  overflow: hidden;
  padding: 5px 12px;
  border: 1px solid #e3e6e9;
  border-radius: 99px;
  color: #89919a;
  font-size: .62rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-preview-browserdots { display: flex; gap: 4px; }
.partner-preview-browserdots i { width: 7px; height: 7px; border-radius: 50%; background: #ef4d55; }
.partner-preview-browserdots i:nth-child(2) { background: #f1b837; }
.partner-preview-browserdots i:nth-child(3) { background: #2fb66b; }

.partner-live-page {
  container-type: inline-size;
  height: calc(100% - 34px);
  overflow: auto;
  color: var(--preview-text);
  background: var(--preview-background);
  font-family: Arial, Helvetica, sans-serif;
  overflow-wrap: anywhere;
}

.partner-published-page { height: auto; min-height: 100vh; overflow: visible; }
.partner-live-page a { text-decoration: none; }
.partner-live-page :focus-visible { outline: 2px solid var(--preview-accent); outline-offset: 3px; }
.partner-live-page section { scroll-margin-top: 16px; }

.partner-live-section { position: relative; outline: 0 solid transparent; outline-offset: -2px; cursor: pointer; transition: outline .12s ease; }
.partner-live-section:hover { outline: 1px dashed color-mix(in srgb, var(--editor-red) 55%, transparent); }
.partner-live-section.selected { outline: 2px solid var(--editor-red); z-index: 1; }

.partner-live-navbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px clamp(20px, 6%, 58px);
  background: #fff;
}

.partner-live-brand { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--preview-primary); }
.partner-live-brand img { width: 64px; height: 34px; object-fit: contain; }
.partner-live-brand strong { max-width: 180px; overflow: hidden; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.partner-live-navbar nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: clamp(12px, 3cqw, 34px); }
.partner-live-navbar a { color: var(--preview-primary); font-size: .67rem; font-weight: 750; }
.partner-live-page .partner-live-navbar button,
.partner-live-page .partner-live-hero button,
.partner-live-page .partner-live-cta button,
.partner-live-page .partner-live-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; max-width: 100%; padding: 8px 18px; border: 0; border-radius: 4px; color: #fff; background: var(--preview-accent); font: 800 .875rem/1.4 Arial, Helvetica, sans-serif; text-align: center; box-shadow: none; }

.partner-live-hero > div {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(34px, 7cqw, 72px) clamp(28px, 8%, 78px);
  color: #fff;
  background: linear-gradient(135deg, var(--preview-primary), var(--preview-secondary));
  background-position: center;
  background-size: cover;
}

.partner-live-hero.align-center > div { align-items: center; text-align: center; }
.partner-live-hero.align-left > div { align-items: flex-start; text-align: left; }
.partner-live-hero.align-right > div { align-items: flex-end; text-align: right; }
.partner-live-hero h1 { max-width: min(560px, 100%); margin: 0 0 16px; color: #fff; font-size: clamp(1.8rem, 4.5cqw, 3.25rem); line-height: 1.02; }
.partner-live-hero p { max-width: min(500px, 100%); margin: 0 0 20px; color: rgba(255,255,255,.9); font-size: clamp(.9rem, 1.4cqw, 1rem); line-height: 1.55; }

.partner-live-about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 32px; align-items: center; padding: 46px clamp(28px, 8%, 78px); background: #fff; }
.partner-live-about h2,
.partner-live-steps h2,
.partner-live-cta h2,
.partner-live-contact h2 { margin: 0 0 10px; color: var(--preview-primary); font-size: clamp(1.35rem, 2.6cqw, 2rem); }
.partner-live-about p,
.partner-live-steps > p,
.partner-live-cta p,
.partner-live-contact p { margin: 6px 0; color: #56606c; font-size: .95rem; line-height: 1.6; }
.partner-live-about-visual { min-height: 110px; display: grid; align-content: center; justify-items: center; border-left: 3px solid var(--preview-accent); color: var(--preview-primary); background: #f4f6f9; }
.partner-live-about-visual span { font-size: .65rem; font-weight: 850; letter-spacing: .15em; }
.partner-live-about-visual strong { font-size: 1.15rem; }

.partner-live-steps { padding: 46px clamp(28px, 8%, 78px); text-align: center; background: #f7f8fa; }
.partner-live-steps > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.partner-live-steps article { padding: 16px 12px; }
.partner-live-steps article > span { width: 40px; height: 40px; display: grid; place-items: center; margin: 0 auto 12px; border: 1px solid var(--preview-primary); border-radius: 50%; color: var(--preview-primary); font-size: .7rem; font-weight: 850; }
.partner-live-steps h3 { margin: 0 0 6px; color: var(--preview-primary); font-size: .86rem; }
.partner-live-steps article p { margin: 0; color: #65707c; font-size: .9rem; line-height: 1.45; }

.partner-live-highlight { display: grid; gap: 4px; padding: 22px clamp(28px, 8%, 78px); border-left: 5px solid var(--preview-accent); color: #fff; background: var(--preview-primary); }
.partner-live-highlight strong { font-size: 1.05rem; }
.partner-live-highlight span { color: rgba(255,255,255,.84); font-size: .95rem; }
.partner-live-cta,
.partner-live-contact { padding: 46px clamp(28px, 8%, 78px); text-align: center; background: #fff; }
.partner-live-cta button, .partner-live-cta .partner-live-button { margin-top: 17px; }
.partner-live-contact { background: #f7f8fa; }
.partner-live-contact a { display: inline-block; margin-top: 14px; color: var(--preview-primary); font-size: .75rem; font-weight: 800; }
.partner-basic-icon,
.partner-site-basic-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: .45em;
  color: var(--preview-accent, var(--partner-accent));
  font-size: .85em;
  font-weight: 900;
  letter-spacing: -.12em;
}
.partner-highlight .partner-site-basic-icon,
.partner-live-highlight .partner-basic-icon { color: #fff; }
.partner-live-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px clamp(28px, 8%, 78px); color: #fff; background: #20242b; }
.partner-live-footer > div { min-width: 0; display: grid; grid-template-columns: 1fr; align-items: center; gap: 3px 12px; }
.partner-live-footer > div:has(img) { grid-template-columns: auto minmax(0, 1fr); }
.partner-live-footer img { width: 58px; height: 34px; grid-row: span 2; object-fit: contain; filter: brightness(0) invert(1); }
.partner-live-footer p { margin: 0; font-size: .7rem; font-weight: 750; }
.partner-live-footer small,
.partner-live-footer span { color: rgba(255,255,255,.66); font-size: .6rem; }

/* The editor frame and the public page respond to their own available width. */
@container (max-width: 760px) {
  .partner-live-navbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 28px; }
  .partner-live-navbar nav { width: 100%; justify-content: flex-start; gap: 12px 18px; }
  .partner-live-navbar nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .partner-live-about { grid-template-columns: 1fr; }
  .partner-live-about-visual { display: none; }
  .partner-live-steps > div { grid-template-columns: 1fr; }
  .partner-live-footer { align-items: flex-start; flex-direction: column; }
}

.partner-editor-inspector { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; border-left: 1px solid var(--editor-line); }
.partner-editor-inspector > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--editor-line); }
.partner-editor-inspector h2 { margin: 0 0 2px; color: var(--editor-text); font-size: .98rem; }
.partner-editor-inspector header small { color: var(--editor-muted); font-size: .68rem; }
.partner-inspector-header-actions { display: flex; align-items: center; gap: 12px; }
.si-app-shell .partner-inspector-close { width: 34px; height: 34px; min-height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--editor-line); border-radius: 50%; color: var(--editor-muted); background: #fff; box-shadow: none; }
.si-app-shell .partner-inspector-close:hover { color: var(--editor-text); background: #f4f6f8; }
.partner-inspector-close span { font-size: 1.35rem; font-weight: 400; line-height: 1; }
.partner-inspector-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--editor-line); }
.si-app-shell .partner-inspector-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--editor-muted); background: #fff; font-size: .75rem; box-shadow: none; }
.si-app-shell .partner-inspector-tabs button:hover { color: var(--editor-text); background: #fff; }
.si-app-shell .partner-inspector-tabs button.active { border-bottom-color: var(--editor-red); color: var(--editor-text); }
.partner-inspector-fields { overflow: auto; display: grid; align-content: start; gap: 14px; padding: 15px; }
.partner-inspector-basic-icons { display: grid; gap: 10px; padding-top: 4px; border-top: 1px solid var(--editor-line); }
.partner-inspector-basic-icons > strong { color: var(--editor-text); font-size: .78rem; }
.partner-inspector-premium-lock { display: grid; gap: 8px; padding: 18px; border: 1px solid #eadba9; border-radius: 8px; color: #654600; background: #fff9e6; }
.partner-inspector-premium-lock strong { font-size: .9rem; }
.partner-inspector-premium-lock p { margin: 0; font-size: .76rem; line-height: 1.55; }
.partner-inspector-field { position: relative; display: grid; gap: 6px; color: var(--editor-text); font-size: .72rem; font-weight: 750; }
.partner-inspector-field input:not([type="color"]):not([type="range"]):not([type="file"]),
.partner-inspector-field textarea,
.partner-inspector-field select,
.partner-inspector-step-list input,
.partner-inspector-step-list textarea { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #ccd2d8; border-radius: 5px; color: var(--editor-text); background: #fff; font: 500 .78rem/1.4 Arial, sans-serif; resize: vertical; }
.partner-inspector-field input:focus,
.partner-inspector-field textarea:focus,
.partner-inspector-field select:focus,
.partner-inspector-step-list input:focus,
.partner-inspector-step-list textarea:focus { outline: 2px solid rgba(220,53,69,.2); border-color: var(--editor-red); }
.partner-inspector-field input[type="file"] { width: 100%; padding: 9px; border: 1px dashed #cbd1d7; border-radius: 5px; color: var(--editor-muted); background: #fafbfc; font-size: .68rem; }
.partner-inspector-field em { position: absolute; right: 8px; bottom: 8px; color: #9199a2; font-size: .62rem; font-style: normal; }
.partner-inspector-field small { color: var(--editor-muted); font-size: .64rem; font-weight: 500; }
.partner-inspector-field .partner-inspector-field-error { color: #b42318; }
.partner-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.partner-upload-row img { width: 100%; height: 58px; margin-top: 3px; padding: 5px; border: 1px solid var(--editor-line); object-fit: contain; }
.partner-upload-row img.favicon { object-fit: contain; }
.partner-inspector-image-preview { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.partner-inspector-image-preview img { width: 100%; height: 70px; border-radius: 4px; object-fit: cover; }
.si-app-shell .partner-inspector-image-preview button,
.si-app-shell .partner-inspector-add,
.si-app-shell .partner-inspector-empty button { min-height: 32px; padding: 0 10px; border: 1px solid var(--editor-line); color: var(--editor-text); background: #fff; font-size: .68rem; box-shadow: none; }
.partner-inspector-note { margin: 0; padding: 10px; border-left: 3px solid #a9b1bb; color: var(--editor-muted); background: #f7f8f9; font-size: .7rem; line-height: 1.5; }
.partner-inspector-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--editor-text); font-size: .74rem; font-weight: 700; }
.partner-inspector-color { display: grid; grid-template-columns: 38px 1fr 14px; gap: 7px; align-items: center; }
.partner-inspector-color input[type="color"] { width: 38px; height: 38px; padding: 2px; border: 1px solid #ccd2d8; border-radius: 5px; background: #fff; }
.partner-inspector-color i { width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; }
.partner-inspector-palette { display: grid; grid-template-columns: repeat(5, 1fr); height: 34px; overflow: hidden; border: 1px solid var(--editor-line); border-radius: 5px; }
.partner-inspector-segment { display: grid; grid-template-columns: 1fr 1fr; }
.si-app-shell .partner-inspector-segment button { min-height: 34px; border: 1px solid var(--editor-line); border-radius: 0; color: var(--editor-muted); background: #fff; font-size: .7rem; box-shadow: none; }
.si-app-shell .partner-inspector-segment button:first-child { border-radius: 5px 0 0 5px; }
.si-app-shell .partner-inspector-segment button:last-child { border-left: 0; border-radius: 0 5px 5px 0; }
.si-app-shell .partner-inspector-segment button.active { color: #a51e2b; background: #fff1f2; border-color: #eea7ae; }
.partner-inspector-step-list { display: grid; gap: 10px; }
.partner-inspector-step-list article { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--editor-line); border-radius: 6px; background: #fafbfc; }
.partner-inspector-step-list header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.partner-inspector-step-list strong { font-size: .7rem; }
.partner-inspector-step-list header span { display: flex; align-items: center; }
.si-app-shell .partner-inspector-step-list button { min-height: 26px; padding: 0 5px; border: 0; color: var(--editor-muted); background: transparent; font-size: .62rem; box-shadow: none; }
.partner-inspector-step-list .partner-editor-icon { width: 12px; height: 12px; }
.partner-inspector-empty { display: grid; justify-items: start; gap: 10px; color: var(--editor-muted); font-size: .74rem; line-height: 1.5; }
.partner-editor-inspector > footer { padding: 11px 14px; border-top: 1px solid var(--editor-line); background: #fff; }
.partner-editor-inspector > footer span { display: flex; align-items: center; gap: 7px; color: #287a48; font-size: .68rem; font-weight: 700; }
.partner-editor-inspector > footer .partner-editor-icon { width: 15px; height: 15px; }
.partner-editor-mobile-tabs { display: none; }

.partner-editor-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 26, 34, .48);
  backdrop-filter: blur(4px);
}

.partner-editor-inspector-modal {
  width: min(460px, calc(100vw - 40px));
  height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(17, 24, 39, .28), 0 8px 24px rgba(17, 24, 39, .18);
}

.partner-editor-inspector-modal:focus { outline: none; }
.partner-editor-inspector-modal .partner-editor-inspector { width: 100%; height: 100%; position: static; overflow: hidden; border-left: 0; box-shadow: none; }

.partner-footer .partner-container { display: grid; gap: 5px; justify-items: center; }
.partner-footer img { width: auto; height: 34px; margin-bottom: 4px; object-fit: contain; filter: brightness(0) invert(1); }
.partner-footer small,
.partner-footer span { color: rgba(255,255,255,.64); font-size: .72rem; }

@media (max-width: 1320px) {
  .partner-editor-layout { grid-template-columns: 200px minmax(520px, 1fr); }
  .partner-editor-canvas { padding: 0 16px 16px; }
  .partner-editor-toolbar { grid-template-columns: minmax(190px, 1fr) auto auto; }
  .partner-editor-save-status { display: none; }
  .si-app-shell .partner-editor-toolbar-actions .quiet { font-size: 0; width: 36px; padding: 0; }
}

@media (max-width: 1050px) {
  .partner-editor-layout { grid-template-columns: 190px minmax(360px, 1fr); }
  .partner-editor-toolbar-actions a,
  .si-app-shell .partner-editor-toolbar-actions .secondary { display: none; }
}

@media (max-width: 760px) {
  .si-app-workspace { padding: 14px; }
  .si-app-workspace.si-app-workspace--partner-editor {
    height: auto;
    min-height: calc(100dvh - var(--si-platform-topbar-height) - var(--si-platform-bottom-height));
    overflow: visible;
  }
  .si-app-workspace--partner-editor .si-app-page-head { min-height: auto; }
  .partner-editor-host { display: block; }
  .partner-editor-host .partner-editor-back { margin-top: 0; }
  .partner-visual-editor { display: block; margin-top: 8px; }
  .si-institution-page-panel .partner-visual-editor { height: auto; min-height: 0; }
  .partner-editor-toolbar { grid-template-columns: 1fr auto auto; min-height: 64px; padding: 9px 10px; }
  .partner-editor-institution > div { width: 36px; height: 36px; flex-basis: 36px; }
  .partner-editor-institution a { max-width: 170px; }
  .si-app-shell .partner-editor-toolbar-actions .quiet,
  .partner-editor-toolbar-actions a,
  .si-app-shell .partner-editor-toolbar-actions .secondary { display: none; }
  .si-app-shell .partner-editor-toolbar-actions .primary { min-height: 36px; padding: 0 10px; font-size: .7rem; }
  .partner-editor-mobile-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--editor-line); }
  .si-app-shell .partner-editor-mobile-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--editor-muted); background: #fff; font-size: .74rem; box-shadow: none; }
  .si-app-shell .partner-editor-mobile-tabs button.active { border-bottom-color: var(--editor-red); color: var(--editor-text); }
  .partner-editor-layout { height: calc(100vh - 294px); min-height: 560px; display: block; }
  .partner-editor-sections,
  .partner-editor-canvas { display: none; width: 100%; height: 100%; position: static; box-shadow: none; }
  .partner-editor-layout.mobile-sections .partner-editor-sections { display: block; }
  .partner-editor-layout.mobile-sections .partner-editor-sections {
    padding-bottom: 96px;
    scroll-padding-bottom: 96px;
  }
  .partner-editor-layout.mobile-preview .partner-editor-canvas { display: grid; padding: 0 10px 10px; }
  .partner-editor-modal-backdrop { padding: 12px; }
  .partner-editor-inspector-modal { width: min(440px, calc(100vw - 24px)); height: calc(100dvh - 24px); }
  .partner-preview-devices button span { display: none; }
  .si-app-shell .partner-preview-devices button { padding: 0 16px; }
  .partner-preview-frame.device-tablet,
  .partner-preview-frame.device-mobile { width: min(390px, 100%); }

  .si-app-bottom-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 54px;
    gap: 2px;
    padding: 5px;
  }

  .si-app-bottom-nav button,
  .si-app-bottom-nav a {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    gap: 0;
  }

  .si-app-bottom-nav span {
    display: none;
  }

  .si-app-bottom-nav .si-app-icon {
    width: 1.2rem;
    height: 1.2rem;
  }

  .si-app-bottom-nav .featured .si-app-icon {
    width: 1.45rem;
    height: 1.45rem;
  }
}
