/* =========================================================
   Learning Rewired Lab
   Performance Objective Workbench
   File: /products/performance-objective-workbench/style.css
   ========================================================= */

:root {
  --pos-navy: #0b1020;
  --pos-panel: #11182e;
  --pos-panel-raised: #151d38;
  --pos-line: rgba(255, 255, 255, 0.1);
  --pos-line-strong: rgba(255, 255, 255, 0.18);
  --pos-cyan: #16b8d9;
  --pos-teal: #20d6a3;
  --pos-gold: #f5b84b;
  --pos-ink: #eef2fb;
  --pos-muted: #96a2c2;
  --pos-strong: #20d6a3;
  --pos-clarify: #f5b84b;
  --pos-missing: #f0876a;
}

* { box-sizing: border-box; }

html { background: var(--pos-navy); scroll-behavior: smooth; }

body,
button,
input,
textarea,
select {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  color: var(--pos-ink);
  background: var(--pos-navy);
  min-height: 100vh;
}

h1, h2, h3, p { margin-top: 0; }

.pos-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pos-cyan);
  color: #051019;
  padding: 12px 18px;
  font-weight: 800;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.pos-skip-link:focus {
  left: 0;
}

.pos-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 88px) clamp(20px, 5vw, 40px);
}

.pos-kicker,
.pos-panel-label {
  margin: 0 0 12px;
  color: var(--pos-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

a { color: var(--pos-cyan); }
a:hover { color: var(--pos-teal); }

:focus-visible {
  outline: 2px solid var(--pos-cyan);
  outline-offset: 3px;
}

/* ---------- HERO ---------- */
.pos-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding-bottom: clamp(48px, 8vw, 96px);
  border-bottom: 1px solid var(--pos-line);
}

.pos-hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 900;
  text-wrap: balance;
}

.pos-deck {
  margin-top: 22px;
  max-width: 640px;
  color: var(--pos-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.65;
}

.pos-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.pos-credibility {
  margin-top: 20px;
  max-width: 560px;
  color: var(--pos-muted);
  font-size: 0.92rem;
  font-style: italic;
}

.pos-hero-visual {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--pos-line-strong);
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}

.pos-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

/* ---------- BUTTONS ---------- */
.pos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

.pos-btn:hover { transform: translateY(-1px); }

.pos-btn-primary {
  background: linear-gradient(135deg, var(--pos-cyan), var(--pos-teal));
  color: #051019;
  box-shadow: 0 16px 34px rgba(22, 184, 217, 0.28);
}

.pos-btn-secondary {
  background: transparent;
  color: var(--pos-ink);
  border-color: var(--pos-line-strong);
}
.pos-btn-secondary:hover { border-color: var(--pos-cyan); }

/* ---------- THESIS BANNER ---------- */
.pos-thesis {
  padding: clamp(40px, 6vw, 72px) 0;
  border-bottom: 1px solid var(--pos-line);
}
.pos-thesis-text {
  max-width: 820px;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pos-ink);
}
.pos-thesis-text em {
  color: var(--pos-cyan);
  font-style: normal;
}

/* ---------- BEFORE / AFTER ---------- */
.pos-before-after {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--pos-line);
}

.pos-before-after h2 {
  max-width: 820px;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 900;
  text-wrap: balance;
}

.pos-section-note {
  margin-top: 14px;
  max-width: 680px;
  color: var(--pos-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.pos-ba-grid {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pos-ba-card {
  padding: 22px;
  background: var(--pos-panel);
  border: 1px solid var(--pos-line);
  border-radius: 16px;
}

.pos-ba-card-strong {
  border-color: rgba(32, 214, 163, 0.4);
  background: rgba(32, 214, 163, 0.06);
}

.pos-ba-label {
  color: var(--pos-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pos-ba-card-strong .pos-ba-label { color: var(--pos-teal); }

.pos-ba-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--pos-ink);
}

.pos-ba-note {
  margin-top: 14px;
  color: var(--pos-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.pos-ba-why {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.pos-ba-why li {
  padding-left: 26px;
  position: relative;
  color: var(--pos-ink);
  font-size: 1rem;
  line-height: 1.5;
}
.pos-ba-why li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--pos-teal);
  font-weight: 800;
}

/* ---------- WORKBENCH ---------- */
.pos-studio {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--pos-line);
}

.pos-studio-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  letter-spacing: -0.025em;
  font-weight: 900;
}

.pos-studio-head p {
  color: var(--pos-muted);
  margin-top: 10px;
  font-size: 1.05rem;
}

.pos-workbench {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 240px;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

/* progress rail */
.pos-rail {
  display: grid;
  gap: 4px;
  position: sticky;
  top: 24px;
}

.pos-rail-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  background: none;
  border: 0;
  border-left: 2px solid var(--pos-line);
  color: var(--pos-muted);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.pos-rail-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--pos-line-strong);
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.pos-rail-step.is-active {
  color: var(--pos-ink);
  border-left-color: var(--pos-cyan);
}
.pos-rail-step.is-active .pos-rail-num {
  background: var(--pos-cyan);
  border-color: var(--pos-cyan);
  color: #051019;
}
.pos-rail-step.is-done .pos-rail-num {
  background: var(--pos-teal);
  border-color: var(--pos-teal);
  color: #051019;
}

/* workspace */
.pos-workspace {
  min-width: 0;
  border-left: 1px solid var(--pos-line);
  border-right: 1px solid var(--pos-line);
  padding: 0 clamp(20px, 3vw, 36px);
}

.pos-stage h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 10px;
}

.pos-stage-note {
  color: var(--pos-muted);
  font-size: 0.94rem;
  margin-bottom: 22px;
  line-height: 1.5;
}

.pos-field {
  display: block;
  margin-bottom: 24px;
}

.pos-field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.98rem;
}

.pos-optional {
  color: var(--pos-muted);
  font-weight: 500;
  font-style: normal;
}

.pos-field textarea {
  width: 100%;
  resize: vertical;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--pos-line-strong);
  background: transparent;
  color: var(--pos-ink);
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
}
.pos-field textarea:focus { border-bottom-color: var(--pos-cyan); }

.pos-inline-flag {
  margin: -14px 0 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(245, 184, 75, 0.1);
  border: 1px solid rgba(245, 184, 75, 0.35);
  color: var(--pos-gold);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pos-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
}

.pos-fieldset legend {
  padding: 0;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 0.98rem;
}

.pos-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-chip-group button {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--pos-line-strong);
  background: transparent;
  color: var(--pos-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.pos-chip-group button.is-selected {
  border-color: var(--pos-cyan);
  color: var(--pos-navy);
  background: var(--pos-cyan);
}

.pos-chip-group-verbs button.is-selected {
  border-color: var(--pos-teal);
  background: var(--pos-teal);
}

.pos-check-list {
  display: grid;
  gap: 4px;
}

.pos-check-list label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pos-line);
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1.4;
}

.pos-check-list input {
  margin-top: 0.2rem;
  accent-color: var(--pos-teal);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.pos-checkpoint-callout {
  margin: 8px 0 24px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(240, 135, 106, 0.1);
  border: 1px solid rgba(240, 135, 106, 0.4);
  color: #f7b39f;
  font-size: 0.96rem;
  line-height: 1.55;
  font-weight: 600;
}

.pos-checkpoint-callout-result {
  margin: 0 0 32px;
}

.pos-workspace-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--pos-line);
}

.pos-btn-ghost {
  background: transparent;
  color: var(--pos-muted);
  border-color: transparent;
  font-size: 0.9rem;
  min-height: 40px;
}
.pos-btn-ghost:hover {
  color: var(--pos-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pos-generate { margin-top: 8px; }

/* status rail */
.pos-status {
  position: sticky;
  top: 24px;
  padding-left: clamp(0px, 1vw, 8px);
}

.pos-status-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--pos-line-strong);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pos-muted);
}
.pos-status-badge.is-warn { border-color: var(--pos-gold); color: var(--pos-gold); }
.pos-status-badge.is-good { border-color: var(--pos-teal); color: var(--pos-teal); }

.pos-status-flags {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pos-status-flags li {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--pos-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pos-line);
}

/* ---------- RESULTS / INTEGRITY CHECK ---------- */
.pos-results {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--pos-line);
}

.pos-results-status {
  display: inline-flex;
  margin-top: 4px;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(32, 214, 163, 0.12);
  border: 1px solid rgba(32, 214, 163, 0.4);
  color: var(--pos-teal);
  font-weight: 800;
  font-size: 1.05rem;
}
.pos-results-status.is-warn {
  background: rgba(245, 184, 75, 0.12);
  border-color: rgba(245, 184, 75, 0.4);
  color: var(--pos-gold);
}
.pos-results-status.is-missing {
  background: rgba(240, 135, 106, 0.12);
  border-color: rgba(240, 135, 106, 0.4);
  color: var(--pos-missing);
}

.pos-integrity-grid {
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pos-integrity-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--pos-panel);
  border: 1px solid var(--pos-line);
}

.pos-integrity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pos-integrity-dim {
  font-weight: 800;
  font-size: 0.98rem;
}

.pos-integrity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pos-integrity-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pos-integrity-pill-strong { color: var(--pos-strong); background: rgba(32, 214, 163, 0.12); border-color: rgba(32, 214, 163, 0.4); }
.pos-integrity-pill-clarify { color: var(--pos-clarify); background: rgba(245, 184, 75, 0.12); border-color: rgba(245, 184, 75, 0.4); }
.pos-integrity-pill-missing { color: var(--pos-missing); background: rgba(240, 135, 106, 0.12); border-color: rgba(240, 135, 106, 0.4); }

.pos-integrity-explain {
  color: var(--pos-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pos-objective-box {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(160deg, rgba(22,184,217,0.08), rgba(32,214,163,0.05));
  border: 1px solid rgba(22, 184, 217, 0.35);
  border-radius: 20px;
}

.pos-objective-text {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.55;
  font-weight: 600;
  color: var(--pos-ink);
  margin-top: 4px;
}

.pos-objective-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.pos-results-grid {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
}

.pos-results-block p:last-child {
  color: var(--pos-ink);
  font-size: 1.02rem;
  line-height: 1.6;
}

.pos-results-next {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--pos-line);
}

.pos-results-next ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.pos-results-next li {
  padding-left: 22px;
  position: relative;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--pos-ink);
}
.pos-results-next li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--pos-cyan);
}

.pos-edit-links {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--pos-line);
}

.pos-edit-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.pos-edit-link {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--pos-line-strong);
  background: transparent;
  color: var(--pos-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}
.pos-edit-link:hover { border-color: var(--pos-cyan); color: var(--pos-ink); }

/* ---------- BRIEF / EXPORT ---------- */
.pos-brief { padding: clamp(48px, 8vw, 96px) 0; }

.pos-brief h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 900;
  margin-top: 4px;
}

.pos-output-box {
  margin-top: 24px;
  margin-bottom: 20px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--pos-panel);
  border: 1px solid var(--pos-line);
  border-radius: 18px;
}

.pos-brief-box pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--pos-ink);
}

.pos-copy-status {
  margin-left: 4px;
  color: var(--pos-teal);
  font-weight: 700;
  font-size: 0.92rem;
}

.pos-inline-feedback-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--pos-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--pos-line-strong);
}
.pos-inline-feedback-link:hover {
  color: var(--pos-cyan);
  text-decoration-color: var(--pos-cyan);
}

.pos-export-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.pos-export-note {
  margin: 10px 0 0;
  color: var(--pos-muted);
  font-size: 0.85rem;
}

.pos-print-export { display: none; }

/* ---------- FEEDBACK ---------- */
.pos-feedback {
  padding: clamp(36px, 6vw, 64px) 0 clamp(48px, 8vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  border-top: 1px solid var(--pos-line);
}

.pos-feedback-copy p {
  max-width: 620px;
  color: var(--pos-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.pos-feedback-cta { text-align: right; }

.pos-feedback-note {
  margin-top: 10px;
  color: var(--pos-muted);
  font-size: 0.82rem;
}

/* ---------- PRINT ---------- */
@media print {
  body * { visibility: hidden; }
  #printExport, #printExport * { visibility: visible; }

  .pos-print-export {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    color: #111827;
    padding: 0;
  }

  .pos-print-export h1 { font-size: 1.8rem; color: #0b1020; margin-bottom: 4px; }
  .pos-print-meta { color: #555; font-size: 0.85rem; margin-bottom: 24px; }

  .pos-print-export h2 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f766e;
    margin: 20px 0 4px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
  }

  .pos-print-export p {
    font-size: 0.98rem;
    line-height: 1.5;
    color: #111827;
    margin: 0 0 4px;
  }

  #printIntegrity p {
    margin: 0 0 6px;
  }

  @page { size: letter; margin: 0.75in; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .pos-hero { grid-template-columns: 1fr; }
  .pos-hero-visual { max-width: 220px; }

  .pos-ba-grid { grid-template-columns: 1fr; }

  .pos-workbench { grid-template-columns: 1fr; }

  .pos-rail {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 8px;
  }

  .pos-rail-step {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid var(--pos-line);
    padding: 8px 4px;
  }
  .pos-rail-step.is-active { border-bottom-color: var(--pos-cyan); }

  .pos-workspace { border-left: 0; border-right: 0; padding: 0; }
  .pos-status { position: static; }

  .pos-integrity-grid { grid-template-columns: 1fr; }
  .pos-results-grid { grid-template-columns: 1fr; }

  .pos-feedback { grid-template-columns: 1fr; }
  .pos-feedback-cta { text-align: left; }
}

@media (max-width: 600px) {
  .pos-hero-actions,
  .pos-workspace-nav,
  .pos-objective-actions,
  .pos-export-row {
    flex-direction: column;
    align-items: stretch;
  }
  .pos-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
