:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fa;
  line-height: 1.5;
  --surface: #ffffff;
  --surface-alt: #eef4fb;
  --text: #172033;
  --muted: #56657a;
  --brand: #164b7a;
  --brand-strong: #0e375d;
  --border: #cbd6e3;
  --focus: #8a4b00;
  --success: #176b3a;
  --danger: #a32626;
  --shadow: 0 14px 36px rgba(27, 49, 77, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(22, 75, 122, 0.10), transparent 30rem),
    var(--surface-alt);
  color: var(--text);
}

button, input, select { font: inherit; }

button, input, select, a { min-height: 44px; }

button {
  border: 0;
  border-radius: 0.7rem;
  padding: 0.72rem 1rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--brand-strong); }

button.secondary {
  color: var(--brand-strong);
  background: #e4edf7;
  border: 1px solid #b8c8d9;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.72rem 0.8rem;
  background: var(--surface);
  color: var(--text);
}

label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  background: #fff;
  color: #000;
  padding: 0.75rem;
  z-index: 20;
}

.skip-link:focus { top: 1rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(203, 214, 227, 0.8);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: block;
  color: var(--brand-strong);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.subtitle { color: var(--muted); font-size: 0.82rem; }

.account-status { color: var(--muted); font-weight: 700; }

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: end;
  padding: clamp(1.2rem, 4vw, 3.2rem);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  background: linear-gradient(135deg, #fff, #edf5fd);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  max-width: 13ch;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.audience-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.audience-strip span {
  border: 1px solid #b9c9d9;
  background: rgba(255,255,255,0.8);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.panel-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card,
.status-panel,
.profile-summary,
.module-nav a {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(27, 49, 77, 0.05);
}

.card { padding: clamp(1rem, 3vw, 1.6rem); margin-top: 1rem; }

.card h2, .card h3 { margin-top: 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

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

.form-message { min-height: 1.5em; color: var(--muted); }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
button.secondary.is-disabled,
button.secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hidden { display: none !important; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.section-heading h2 { margin: 0.1rem 0 0; font-size: 2rem; }

.profile-summary {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.profile-summary strong { color: var(--brand-strong); }

.module-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.module-nav a {
  min-height: 7rem;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.module-nav a:hover { border-color: var(--brand); }
.module-nav strong { color: var(--brand-strong); font-size: 1.05rem; }
.module-nav span { color: var(--muted); font-size: 0.85rem; }

.role-card h3 { margin-bottom: 0.35rem; }
.role-card p { color: var(--muted); margin-top: 0; }
.role-card ul { margin-bottom: 0; }

.status-panel {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #8b97a5;
}

.status-panel.ok .status-dot { background: var(--success); }
.status-panel.error .status-dot { background: var(--danger); }

.muted { color: var(--muted); }

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.assignment-grid {
  margin-top: 1.2rem;
}

.assignment-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.assignment-heading h3,
.assignment-heading p {
  margin: 0;
}

.assignment-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.assignment-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 5px 18px rgba(27, 49, 77, 0.05);
}

.assignment-card__header,
.assignment-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.assignment-card__header {
  align-items: flex-start;
}

.assignment-card__header h3,
.assignment-card__header p {
  margin: 0;
}

.assignment-card__footer {
  margin-top: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--surface-alt);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.warning {
  border-color: #b47a23;
  background: rgba(235, 174, 76, 0.13);
}

.pill.success {
  border-color: var(--success);
  background: rgba(23, 107, 58, 0.10);
}

.pill.swot-s { border-color: #2f7d4a; }
.pill.swot-w { border-color: #b35454; }
.pill.swot-o { border-color: #3269a8; }
.pill.swot-t { border-color: #9a6a22; }

.research-access-results {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.research-access-summary {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--surface-alt);
}

.research-access-summary h3,
.research-access-summary p {
  margin: 0;
}

.research-access-summary p {
  margin-top: 0.25rem;
}

.simulation-view {
  margin-top: 1rem;
}

.simulation-toolbar {
  position: sticky;
  top: 4.7rem;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.simulation-toolbar h2 {
  margin: 0.1rem 0 0;
}

.cockpit-top {
  margin-top: 1rem;
}

.sim-progress {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  padding: 0.8rem 1rem;
}

.sim-progress__copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.sim-progress__track {
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-alt);
}

.sim-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.channel-mixer {
  display: grid;
  gap: 0.75rem;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.3fr) auto minmax(7rem, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
}

.channel-row input[type="range"] {
  width: 100%;
}

.channel-row strong {
  min-width: 4.5rem;
  text-align: right;
}

.metric-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  padding: 0.8rem;
}

.metric-card__label,
.metric-card__note {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.metric-card__value {
  display: block;
  margin: 0.2rem 0;
  color: var(--brand-strong);
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.05;
}

.cockpit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

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

.cockpit-side {
  position: sticky;
  top: 11rem;
  display: grid;
  gap: 0.8rem;
}

.side-card,
.cockpit-section {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(27, 49, 77, 0.05);
}

.side-card {
  padding: 1rem;
}

.side-card h4,
.side-card p {
  margin-top: 0;
}

.data-notice {
  border-left: 4px solid #b47a23;
}

.cockpit-section {
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.cockpit-section + .cockpit-section {
  margin-top: 1rem;
}

.cockpit-section__header {
  margin-bottom: 1rem;
}

.cockpit-section__header h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
}

.cockpit-section__header p {
  margin-bottom: 0;
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.cockpit-form {
  margin-top: 1rem;
}

.cockpit-form h4 {
  margin-bottom: 0.4rem;
}

.swot-legend,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.swot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.swot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 13rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: var(--surface-alt);
}

.swot-card.resolved {
  background: var(--surface);
  border-style: dashed;
}

.swot-card h4 {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.swot-card p {
  margin: 0.2rem 0;
}

.swot-card__number {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 900;
}

.swot-card__status {
  margin-top: auto !important;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.swot-card__actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.tiny-button {
  min-height: 2.3rem;
  padding: 0.35rem;
  border-radius: 0.55rem;
}

.swot-details,
.diagnosis-axis,
.rationale-panel,
.package-preview {
  margin-top: 1rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: var(--surface);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  color: var(--brand-strong);
  font-size: 0.8rem;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table select {
  min-width: 5rem;
}

.data-table input[type="checkbox"] {
  width: 1.2rem;
  min-height: 1.2rem;
}

.scale-note {
  display: block;
  max-width: 38rem;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.zone-picker,
.decision-card,
.rationale-panel,
.summary-question {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.8rem;
}

.zone-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.zone-picker legend,
.decision-card legend,
.rationale-panel legend,
.summary-question legend {
  padding: 0 0.3rem;
  font-weight: 900;
}

.zone-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.zone-option input,
.decision-option input,
.rationale-option input,
.crisis-response input,
.summary-answer input {
  width: auto;
  min-height: auto;
}

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

.decision-card {
  min-width: 0;
  margin: 0;
}

.decision-option,
.rationale-option,
.crisis-response,
.summary-answer {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.45rem 0;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.6rem;
  cursor: pointer;
}

.decision-option:hover,
.rationale-option:hover,
.crisis-response:hover,
.summary-answer:hover,
.decision-option.selected {
  border-color: var(--border);
  background: var(--surface-alt);
}

.decision-option__copy {
  display: grid;
  gap: 0.2rem;
}

.decision-option__copy small {
  color: var(--muted);
  line-height: 1.35;
}

.rationale-panel {
  margin-top: 1rem;
}

.confirm-button {
  background: var(--success);
}

.package-preview {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--surface-alt);
}

.package-preview.ok {
  border-left-color: var(--success);
}

.package-preview.danger {
  border-left-color: var(--danger);
}

.package-preview h4,
.package-preview p {
  margin: 0;
}

.decision-result,
.notice {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--surface-alt);
}

.decision-result {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.crisis-section {
  border-top: 4px solid #a34a32;
}

.crisis-description {
  max-width: 72ch;
  font-size: 1.05rem;
}

.crisis-responses,
.summary-form {
  display: grid;
  gap: 0.65rem;
}

.crisis-response,
.summary-answer {
  border-color: var(--border);
  background: var(--surface);
}

.summary-question {
  margin: 0;
}

.completed-panel {
  text-align: left;
}

.final-score {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 1rem 0;
}

.final-score strong {
  color: var(--brand-strong);
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
}

.final-score span {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 700;
}

.certificate-card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem;
  background: var(--surface-alt);
}

.certificate-card.ok {
  border-color: var(--success);
}

.certificate-card p {
  margin-bottom: 0;
}

.state-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.7rem;
  margin: 0;
}

.state-list dt {
  color: var(--muted);
}

.state-list dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.admin-workspace {
  grid-column: 1 / -1;
}

.admin-workspace > h3 {
  margin-bottom: 0.3rem;
}

.admin-assignment-form {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.admin-assignment-list {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.admin-assignment-list h4 {
  margin: 0 0 0.5rem;
}

.admin-assignment-list ul {
  margin: 0;
  padding-left: 1.2rem;
}

.admin-assignment-list li + li {
  margin-top: 0.3rem;
}

.pill.danger {
  border-color: var(--danger);
  background: rgba(159, 45, 45, 0.1);
}

.feedback-trigger {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9990;
  border-radius: 999px;
  background: #be123c;
  box-shadow: 0 12px 30px rgba(80, 8, 24, 0.28);
}

.feedback-trigger:hover {
  background: #9f1239;
}

.feedback-selection-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10000;
  padding: 0.8rem 1rem;
  background: #be123c;
  color: #fff;
  text-align: center;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 15, 23, 0.68);
}

.feedback-modal {
  width: min(100%, 720px);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
  padding: 1.25rem;
  box-shadow: 0 24px 70px rgba(0,0,0,0.3);
}

.feedback-modal h2 {
  margin: 0.2rem 0 0.35rem;
}

.feedback-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.feedback-field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  font-weight: 800;
}

.feedback-field:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}

.feedback-field textarea {
  width: 100%;
  resize: vertical;
}

.feedback-submit {
  background: #be123c;
}

.feedback-workspace {
  grid-column: 1 / -1;
}

.expert-assignment-box {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: var(--surface-alt);
}

.expert-assignment-box h4,
.expert-assignment-box p {
  margin-top: 0;
}

.expert-assignment-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr) auto;
  gap: 0.7rem;
  align-items: end;
}

.expert-assignment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.feedback-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.feedback-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.feedback-list {
  display: grid;
  gap: 0.7rem;
}

.feedback-card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  padding: 0.9rem;
}

.feedback-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.feedback-card__header > input {
  width: 1.15rem;
  min-height: 1.15rem;
  margin-top: 0.25rem;
}

.feedback-card h4,
.feedback-card p {
  margin-top: 0;
}

.feedback-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.feedback-export {
  position: sticky;
  top: 6rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: var(--surface-alt);
}

.feedback-export h4,
.feedback-export p {
  margin-top: 0;
}

.feedback-export textarea {
  width: 100%;
  min-height: 22rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
}

.admin-users-workspace {
  grid-column: 1 / -1;
}

.admin-user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.admin-user-tab {
  min-height: 2.45rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--brand-strong);
  border: 1px solid var(--border);
}

.admin-user-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.admin-user-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(180px, 0.5fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.admin-user-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.admin-user-card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  padding: 0.9rem;
}

.admin-user-card__summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.admin-user-card__summary h4,
.admin-user-card__summary p {
  margin: 0;
}

.pill.audience {
  border-style: dashed;
}

.admin-user-editor {
  margin-top: 0.7rem;
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.admin-user-editor > summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-weight: 900;
}

.admin-user-editor__body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 0.8rem;
  margin-top: 0.8rem;
  align-items: start;
}

.admin-audience-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.7rem;
}

.admin-audience-picker legend {
  padding: 0 0.3rem;
  font-weight: 900;
}

.admin-check-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.admin-check-option input {
  width: auto;
  min-height: auto;
}

.admin-role-editor {
  display: grid;
  gap: 0.5rem;
}

.admin-user-card__summary > input {
  width: auto;
  min-height: auto;
  margin-top: 0.35rem;
}

.platform-workspace {
  grid-column: 1 / -1;
}

.platform-form,
.bulk-bar,
.module-publication__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
  margin-top: 0.8rem;
}

.platform-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.platform-card,
.cohort-block,
.module-publication {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: var(--surface);
}

.module-publication {
  margin-top: 1rem;
}

.platform-card h4,
.module-publication h4,
.expert-assigned-modules h4 {
  margin: 0 0 0.35rem;
}

.code-reveal {
  overflow-wrap: anywhere;
}

.platform-details {
  margin-top: 0.6rem;
}

.comparison-list,
.expert-assigned-modules {
  margin-top: 0.8rem;
}

@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cockpit-layout {
    grid-template-columns: 1fr;
  }

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

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

.top-nav { display: flex; align-items: center; }

.open-ed-entry {
  display: inline-flex;
  align-items: center;
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.open-ed-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.open-ed-results {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.resource-card,
.resource-page,
.resource-file {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface);
  padding: 1rem;
}

.resource-page { margin-top: 1rem; }

.resource-card h3,
.resource-file h3 { margin: 0.2rem 0 0.4rem; }

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  color: var(--muted);
}

.resource-file + .resource-file { margin-top: 0.7rem; }

.preview-banner {
  background: color-mix(in srgb, var(--focus) 28%, var(--surface));
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
}

.checksum {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .hero,
  .panel-grid,
  .dashboard-grid,
  .module-nav,
  .form-grid,
  .assignment-cards,
  .metric-grid,
  .briefing-grid,
  .decision-grid,
  .cockpit-side,
  .swot-grid {
    grid-template-columns: 1fr;
  }

  .topbar { align-items: flex-start; }
  .subtitle { display: none; }
  .module-nav a { min-height: 5.2rem; }

  .simulation-toolbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .assignment-card__footer,
  .assignment-heading,
  .decision-result,
  .admin-user-card__summary,
  .platform-form,
  .bulk-bar,
  .module-publication__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .feedback-form-grid,
  .feedback-filter-grid,
  .feedback-workspace-layout,
  .expert-assignment-form,
  .admin-user-filters,
  .admin-user-editor__body,
  .platform-form,
  .bulk-bar,
  .module-publication__row,
  .open-ed-filters {
    grid-template-columns: 1fr;
  }

  .feedback-export {
    position: static;
  }

  .assignment-card__footer button {
    width: 100%;
  }

  .cockpit-side {
    display: grid;
  }

  .data-table {
    min-width: 680px;
  }
}

@media (max-width: 480px) {
  .page { width: min(100% - 1rem, 1180px); padding-top: 0.5rem; }
  .hero { border-radius: 0.8rem; padding: 1rem; }
  .hero h1 { font-size: 2.25rem; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .actions > * { width: 100%; }

  .metric-grid {
    gap: 0.4rem;
  }

  .channel-mixer { gap: 0.5rem; }
  .metric-card {
    padding: 0.7rem;
  }

  .swot-card {
    min-height: auto;
  }

  .zone-picker {
    display: grid;
    grid-template-columns: 1fr;
  }

  .zone-option {
    width: 100%;
  }

  .final-score {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #151c26;
    --surface-alt: #0e141d;
    --text: #eef3f8;
    --muted: #b9c5d3;
    --brand: #83b9e8;
    --brand-strong: #b6d9f6;
    --border: #344356;
    --focus: #ffbf5d;
  }

  .channel-row { background: #101721; }
  body { background: #0e141d; }
  .topbar { background: rgba(21,28,38,0.95); }
  .simulation-toolbar { background: rgba(21,28,38,0.97); }
  .hero { background: linear-gradient(135deg, #151c26, #142439); }
  .audience-strip span { background: #182332; border-color: #44566d; }
  button.secondary { background: #263548; color: #edf5fd; border-color: #53657b; }
  input, select { background: #101721; }
}

.tg05-table { display: grid; gap: 0.8rem; }
.tg05-metrics, .tg05-variants { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.tg05-metrics article, .tg05-variants article { border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.7rem; background: var(--surface); }
.tg05-variants .is-assigned { border-color: var(--brand); }
.tg05-time { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.tg05-time li, .tg05-slot { display: grid; grid-template-columns: 5rem 1fr auto; gap: 0.4rem; align-items: center; }
.tg05-route { font-weight: 650; }
.tg05-table .ok { color: #1d7a46; }
.tg05-table .bad { color: #a33b32; }
@media (max-width: 800px) {
  .tg05-metrics, .tg05-variants { grid-template-columns: 1fr 1fr; }
  .tg05-time li, .tg05-slot { grid-template-columns: 1fr; }
}

.tg06 { display: grid; gap: 1rem; }
.tg06-notice, .tg06-card, .tg06-result, .tg06-stage, .tg06-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}
.tg06-notice { background: #fff8e1; }
.tg06-facts { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.tg06-facts li { display: grid; }
.tg06-map { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.tg06-map svg { width: 100%; height: auto; }
.tg06-link { stroke: #8aa0b8; stroke-width: 2; }
.tg06-node text { font-size: 12px; fill: var(--text); }
.tg06-node.is-overloaded circle { stroke: #a32626; stroke-width: 4; }
.tg06-form, .tg06-stack { display: grid; gap: 0.75rem; }
.tg06-inline, .tg06-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tg06-field { display: grid; gap: 0.25rem; }
.tg06-choice { display: flex; gap: 0.4rem; align-items: flex-start; }
.tg06-badge { font-weight: 700; }

/* ==========================================================================
   GRYTUR UX 2026 — tourism-tech / strategy lab
   Warstwa wizualna prototypu ChatGPT. Nie zmienia mechaniki symulacji.
   ========================================================================== */

:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-alt: #f3f5ef;
  --text: #15231f;
  --muted: #64736d;
  --brand: #176f62;
  --brand-strong: #103f38;
  --border: #dce4df;
  --focus: #e58b3d;
  --success: #1d7a55;
  --danger: #b5473f;
  --warning: #9a6a22;
  --grytur-ink: #102a26;
  --grytur-deep: #0c302b;
  --grytur-green: #176f62;
  --grytur-mint: #dcece6;
  --grytur-sand: #f5f2e9;
  --grytur-orange: #e58b3d;
  --grytur-blue: #2f6177;
  --grytur-violet: #655b8f;
  --grytur-shadow: 0 24px 70px rgba(13, 49, 43, 0.12);
  --grytur-shadow-soft: 0 12px 32px rgba(13, 49, 43, 0.08);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(16, 63, 56, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 63, 56, 0.025) 1px, transparent 1px),
    #f7f8f4;
  background-size: 32px 32px;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 12%, rgba(32, 127, 111, 0.08), transparent 26rem),
    radial-gradient(circle at 92% 18%, rgba(229, 139, 61, 0.06), transparent 24rem);
}

main { min-height: calc(100vh - 7rem); }

button {
  background: var(--grytur-green);
  border-radius: 0.75rem;
  box-shadow: none;
}

button:hover { background: #125c52; }
button:active { transform: translateY(1px); }

button.secondary {
  color: var(--grytur-deep);
  background: #edf3f0;
  border-color: #d5e0dc;
}

button.secondary:hover { background: #e1ebe7; }

input,
select,
textarea {
  border-color: #d4dfda;
  background: #fff;
  color: var(--text);
}

input::placeholder,
textarea::placeholder { color: #97a39e; }

label { color: #263a34; }

.topbar {
  position: sticky;
  top: 0;
  min-height: 72px;
  padding: 0.75rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid rgba(220, 228, 223, 0.9);
  background: rgba(250, 251, 247, 0.94);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
}

.brand-lockup > span:last-child {
  display: grid;
  gap: 0.05rem;
}

.brand {
  color: var(--grytur-deep);
  font-size: 1.22rem;
  line-height: 1;
  letter-spacing: 0.1em;
}

.subtitle {
  color: #72817b;
  font-size: 0.72rem;
  letter-spacing: 0.015em;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--grytur-deep);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.brand-mark__peak {
  position: absolute;
  width: 29px;
  height: 18px;
  left: 7px;
  top: 10px;
  clip-path: polygon(0 100%, 35% 22%, 52% 58%, 70% 8%, 100% 100%);
  background: #dfece7;
}

.brand-mark__route {
  position: absolute;
  width: 25px;
  height: 9px;
  left: 9px;
  bottom: 8px;
  border-bottom: 2px solid var(--grytur-orange);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.brand-mark--small {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 11px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-nav a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border-radius: 0.7rem;
  color: #334842;
  font-weight: 750;
  font-size: 0.9rem;
  text-decoration: none;
}

.top-nav a:hover,
.text-link:hover {
  background: #edf3f0;
  color: var(--grytur-deep);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.account-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.72rem;
  border: 1px solid #d6e0dc;
  border-radius: 999px;
  background: #fff;
  color: #61706b;
  font-size: 0.78rem;
}

.is-authenticated .top-nav,
.is-authenticated .top-actions .text-link {
  display: none;
}

.public-shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4.5rem;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 5.2rem);
  border: 0;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 22% 12%, rgba(61, 146, 127, 0.28), transparent 24rem),
    linear-gradient(135deg, #123f38 0%, #0c2d29 58%, #092522 100%);
  box-shadow: var(--grytur-shadow);
  color: #f8fbf8;
}

.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  left: -140px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255,255,255,0.025),
    0 0 0 64px rgba(255,255,255,0.018),
    0 0 0 105px rgba(255,255,255,0.012);
  z-index: -1;
}

.hero-copy { max-width: 700px; }

.hero .eyebrow {
  color: #9ed5c8;
}

.hero h1 {
  margin: 0.65rem 0 1.35rem;
  max-width: 11ch;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 860;
}

.hero h1 span { color: #ffb267; }

.hero-lead {
  max-width: 62ch;
  margin: 0;
  color: #dce8e4;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.78rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cta-primary {
  background: var(--grytur-orange);
  color: #1e271f;
}

.cta-primary:hover { background: #f0a054; }

.cta-ghost {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.cta-ghost:hover {
  background: rgba(255,255,255,0.12);
}

.cta-small { min-height: 42px; padding: 0.55rem 0.85rem; }

.workspace-main .cta-ghost {
  border-color: #d3ded9;
  background: #fff;
  color: var(--grytur-deep);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.2rem;
  margin-top: 2rem;
  color: #bcd1ca;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-proof span::before {
  content: "✓";
  margin-right: 0.38rem;
  color: #ffb267;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 1.6rem;
  background: rgba(7, 33, 30, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.hero-visual__label {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 4;
  color: #a9c8bf;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.topo-lines {
  position: absolute;
  inset: -35%;
  opacity: 0.42;
  background:
    repeating-radial-gradient(
      ellipse at 48% 42%,
      transparent 0 22px,
      rgba(175, 215, 205, 0.24) 23px 24px,
      transparent 25px 48px
    );
  transform: rotate(-13deg) scale(1.05);
}

.decision-map {
  position: absolute;
  inset: 3.4rem 1.5rem 8rem;
}

.map-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 86px;
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(205, 231, 224, 0.35);
  border-radius: 999px;
  background: rgba(13, 53, 47, 0.92);
  color: #dcebe6;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}

.node-a { left: 5%; top: 35%; }
.node-b { left: 39%; top: 13%; border-color: rgba(255,178,103,0.75); color: #ffd2a8; }
.node-c { right: 3%; top: 42%; }
.node-d { left: 41%; bottom: 3%; }

.map-route {
  position: absolute;
  z-index: 2;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255,178,103,0.85), rgba(160,211,198,0.34));
}

.route-1 { width: 39%; left: 22%; top: 43%; transform: rotate(-27deg); }
.route-2 { width: 39%; left: 54%; top: 29%; transform: rotate(25deg); }
.route-3 { width: 35%; left: 58%; top: 57%; transform: rotate(132deg); }

.hero-kpi-grid {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.hero-kpi-grid > div {
  padding: 0.85rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.065);
  backdrop-filter: blur(8px);
}

.hero-kpi-grid small,
.hero-kpi-grid span { display: block; }

.hero-kpi-grid small {
  color: #9abbb1;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.hero-kpi-grid strong {
  display: block;
  margin: 0.2rem 0;
  color: #fff;
  font-size: 1.45rem;
}

.hero-kpi-grid span {
  color: #b9cec7;
  font-size: 0.68rem;
}

.product-section,
.access-section,
.about-section {
  margin-top: clamp(4rem, 7vw, 7rem);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.6rem;
}

.section-intro h2,
.access-copy h2,
.about-section h2 {
  margin: 0.25rem 0 0;
  color: var(--grytur-deep);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.section-intro > p,
.about-section > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.product-card {
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: var(--grytur-shadow-soft);
}

.product-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -80px;
  border-radius: 50%;
  background: rgba(23,111,98,0.06);
}

.product-card--sid::before { background: rgba(101,91,143,0.07); }
.product-card--edutur::before { background: rgba(229,139,61,0.08); }
.product-card--open::before { background: rgba(47,97,119,0.08); }

.product-card__top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.product-icon,
.module-nav-card__icon {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e7f2ee;
  color: var(--grytur-deep);
  font-weight: 900;
}

.product-card--sid .product-icon { background: #eeeaf6; color: #554b7d; }
.product-card--edutur .product-icon { background: #fff0e1; color: #8d521e; }
.product-card--open .product-icon { background: #e6f0f4; color: #285467; }

.status-chip,
.pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.status-chip { padding: 0.28rem 0.55rem; }
.status-chip--live { background: #e4f2eb; color: #146243; }
.status-chip--build { background: #f6f0df; color: #805c1e; }
.status-chip--public { background: #e5eef2; color: #285467; }

.product-code {
  margin: 2rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.product-card h3 {
  margin: 0;
  color: var(--grytur-deep);
  font-size: 1.45rem;
}

.product-card > p:not(.product-code) {
  color: var(--muted);
  line-height: 1.65;
}

.product-card > a,
.product-card__disabled {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.85rem;
  font-weight: 850;
}

.product-card > a {
  color: var(--grytur-green);
  text-decoration: none;
}

.product-card__disabled { color: #87928e; }

.access-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid #dfe6e1;
  border-radius: 1.8rem;
  background: var(--grytur-sand);
}

.access-copy {
  position: sticky;
  top: 96px;
}

.access-copy > p:not(.eyebrow) {
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.7;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.access-card,
.access-drawer {
  border: 1px solid #dce3df;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 54, 48, 0.06);
}

.access-card { padding: 1.3rem; }
.access-card--primary { border-top: 4px solid var(--grytur-green); }

.access-card h3,
.access-drawer h2 {
  margin: 0.2rem 0 0.7rem;
  color: var(--grytur-deep);
}

.card-kicker {
  margin: 0;
  color: var(--grytur-green);
  font-size: 0.69rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.full-button { width: 100%; margin-top: 1rem; }

.cta.secondary {
  border-color: #d5e0dc;
  background: #edf3f0;
  color: var(--grytur-deep);
}
.cta.secondary:hover { background: #e1ebe7; }

.text-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: var(--grytur-green);
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
}
.text-button:hover { background: transparent; text-decoration: underline; }

.text-button.is-disabled {
  min-height: auto;
  color: #7d8a85;
  cursor: not-allowed;
  text-decoration: none;
}

.registration-policy {
  margin: 0.45rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--grytur-orange);
  border-radius: 0.45rem;
  background: #fff8ef;
  color: #6f563b;
  line-height: 1.5;
}

.access-divider {
  position: relative;
  margin: 1.2rem 0 0.8rem;
  text-align: center;
}
.access-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.access-divider span {
  position: relative;
  padding: 0 0.6rem;
  background: #fff;
  color: #9aa49f;
  font-size: 0.72rem;
}

.small-copy { font-size: 0.82rem; }

.access-drawer {
  grid-column: 2;
  margin-top: 0.9rem;
  padding: 1.35rem;
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 1.4rem;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: 4rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 1.8rem;
  background: #e8f0ec;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 3rem);
  border-top: 1px solid var(--border);
  color: #74817c;
  font-size: 0.78rem;
}

.site-footer span:first-child {
  color: var(--grytur-deep);
  font-weight: 900;
  letter-spacing: 0.1em;
}

/* Authenticated workspace */
.app-view {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  background: #f5f7f3;
}

.app-rail {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 0.9rem;
  border-right: 1px solid #d9e2dd;
  background: #f9faf7;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.4rem 1.2rem;
  border-bottom: 1px solid #e0e6e2;
}

.rail-brand > div { display: grid; }
.rail-brand strong { color: var(--grytur-deep); letter-spacing: 0.08em; }
.rail-brand span:last-child { color: #87938e; font-size: 0.72rem; }

.rail-nav {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.1rem;
}

.rail-nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  color: #4a5b55;
  font-weight: 780;
  font-size: 0.88rem;
  text-decoration: none;
}

.rail-nav a > span {
  width: 23px;
  color: #82908a;
  text-align: center;
}

.rail-nav a:hover {
  background: #edf2ef;
  color: var(--grytur-deep);
}

.rail-nav a.active {
  background: #dfece7;
  color: var(--grytur-deep);
}

.rail-nav a.active > span { color: var(--grytur-green); }

.rail-bottom { margin-top: auto; }
.rail-logout {
  width: 100%;
  border: 1px solid #d9e2dd;
  background: #fff;
  color: #596a64;
}
.rail-logout:hover { background: #f1f4f2; color: var(--grytur-deep); }

.workspace-main {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.workspace-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.workspace-topline h2 {
  margin: 0.22rem 0 0;
  color: var(--grytur-deep);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.workspace-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid #d7e2dd;
  border-radius: 999px;
  background: #fff;
  color: #61716b;
  font-size: 0.74rem;
  font-weight: 750;
}

.workspace-state > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a36a;
  box-shadow: 0 0 0 4px rgba(40,163,106,0.12);
}

.profile-summary {
  margin: 1.3rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid #dde5e1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: none;
}

.profile-summary span {
  padding-right: 1.2rem;
  color: #63736d;
  font-size: 0.78rem;
}

.profile-summary strong { color: #2d4039; }

.dashboard-focus {
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid #dbe4df;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--grytur-shadow-soft);
}

.assignment-grid { margin-top: 0; }

.assignment-heading {
  align-items: center;
  margin-bottom: 0.9rem;
}

.assignment-heading h3 {
  color: var(--grytur-deep);
  font-size: 1.1rem;
}

.assignment-heading p { font-size: 0.82rem; }

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

.assignment-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  border-color: #dce4e0;
  border-radius: 1rem;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.assignment-card:hover {
  transform: translateY(-2px);
  border-color: #bfcfc8;
  box-shadow: 0 12px 28px rgba(15, 58, 50, 0.08);
}

.assignment-card__header h3 {
  color: var(--grytur-deep);
  font-size: 1.02rem;
}

.assignment-card__header p { font-size: 0.75rem; }

.assignment-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.assignment-card__badges .pill {
  white-space: normal;
  text-align: center;
}

.assignment-card__footer { margin-top: auto; }
.assignment-card__footer button { white-space: nowrap; }

.module-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.module-nav a {
  min-height: 86px;
  padding: 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  justify-content: initial;
  border-color: #dce4e0;
  border-radius: 1rem;
  box-shadow: none;
}

.module-nav-card__copy { display: grid; gap: 0.15rem; }
.module-nav-card__copy strong { color: var(--grytur-deep); }
.module-nav-card__copy small { color: #72817b; }
.module-nav-card__arrow { color: #82908a; font-size: 1.1rem; }
.module-nav-card--sid .module-nav-card__icon { background: #eeeaf6; color: #554b7d; }
.module-nav-card--edutur .module-nav-card__icon { background: #fff0e1; color: #8d521e; }
.module-nav-card--open .module-nav-card__icon { background: #e6f0f4; color: #285467; }

.role-zone { margin-top: 2.8rem; }
.section-intro--compact {
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 1fr);
  margin-bottom: 0.8rem;
}
.section-intro--compact h3 {
  margin: 0.25rem 0 0;
  color: var(--grytur-deep);
  font-size: 1.55rem;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.dashboard-grid > .card,
.dashboard-grid > article {
  border-color: #dce4e0;
  box-shadow: none;
}

.workspace-lead {
  max-width: 72ch;
  margin: 1rem 0 1.5rem;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-body { display: grid; gap: 1rem; }

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.catalog-stats .metric-card {
  min-height: 118px;
  background: #fff;
  border-color: #dce4e0;
}

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

.catalog-empty {
  min-height: 260px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px dashed #cbd7d1;
  border-radius: 1.4rem;
  background: #fff;
}

.catalog-empty__mark {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: #e8f1ed;
  color: var(--grytur-deep);
  font-size: 1.8rem;
  font-weight: 900;
}

.catalog-empty h3 {
  margin: 0.8rem 0 0.35rem;
  color: var(--grytur-deep);
  font-size: 1.5rem;
}

.catalog-empty p { max-width: 68ch; line-height: 1.65; }

/* Simulation as a decision cockpit, not an admin page */
.simulation-view {
  width: min(1500px, calc(100% - 2rem));
  margin: 1rem auto 4rem;
}

.simulation-toolbar {
  top: 82px;
  border: 1px solid #cad9d3;
  border-radius: 1.15rem;
  background: rgba(249, 251, 248, 0.97);
  box-shadow: 0 14px 36px rgba(12, 48, 43, 0.10);
}

.simulation-toolbar__identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.sim-brand {
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grytur-deep);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.simulation-toolbar h2 {
  color: var(--grytur-deep);
  font-size: 1.25rem;
}

.simulation-message {
  max-width: 900px;
  margin: 0.7rem 0;
}

.cockpit-layout {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 1rem;
  align-items: start;
}

.cockpit-main,
.cockpit-side {
  min-width: 0;
}

.cockpit-side {
  position: sticky;
  top: 168px;
}

.cockpit-section,
.side-card,
.sim-progress,
.metric-card {
  border-color: #d7e1dc;
  box-shadow: none;
}

.cockpit-section {
  border-radius: 1.2rem;
  background: #fff;
}

.side-card {
  border-radius: 1rem;
  background: #f8faf7;
}

.metric-grid { gap: 0.65rem; }
.metric-card {
  background: #fff;
  border-radius: 0.95rem;
}

.metric-card__label {
  color: #70807a;
  font-size: 0.69rem;
  letter-spacing: 0.03em;
}

.metric-card__value { color: var(--grytur-deep); }

/* OPEN-ED */
.open-ed-view {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 4rem;
}

.open-ed-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 1.5rem;
  background: #e8f0f3;
}

.open-ed-header h2 {
  margin: 0.3rem 0;
  color: #244e60;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.035em;
}

.open-ed-header p:last-child { color: #5d7580; }

.open-ed-filters {
  margin-top: 1rem;
  border-color: #d8e2e6;
  box-shadow: none;
}

.open-ed-results:empty::before {
  content: "Brak opublikowanych materiałów.";
  display: block;
  padding: 2rem;
  border: 1px dashed #cad7dc;
  border-radius: 1rem;
  color: #6d7f87;
  background: #fff;
}

.status-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  margin: 0;
  width: auto;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 28px rgba(12,48,43,0.13);
  font-size: 0.72rem;
  backdrop-filter: blur(12px);
}

.notice {
  border-color: #d8e3de;
  background: #f6f8f5;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual { min-height: 390px; }

  .product-grid { grid-template-columns: 1fr 1fr; }

  .access-section { grid-template-columns: 1fr; }
  .access-copy { position: static; }
  .access-drawer { grid-column: 1; }

  .assignment-cards,
  .assignment-cards--catalog { grid-template-columns: 1fr 1fr; }

  .app-view { grid-template-columns: 205px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .top-nav { display: none; }
  .text-link { display: none; }

  .public-shell { width: min(100% - 1rem, 1240px); padding-top: 0.8rem; }

  .hero {
    padding: 1.5rem;
    border-radius: 1.3rem;
  }

  .hero h1 { font-size: clamp(2.6rem, 12vw, 4.6rem); }
  .hero-visual { min-height: 350px; }

  .product-grid,
  .access-grid,
  .section-intro,
  .about-section,
  .section-intro--compact {
    grid-template-columns: 1fr;
  }

  .app-view {
    display: block;
    padding-bottom: 72px;
  }

  .app-rail {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    height: auto;
    display: block;
    padding: 0.45rem;
    border-top: 1px solid #d9e2dd;
    border-right: 0;
    background: rgba(249,250,247,0.97);
    backdrop-filter: blur(14px);
  }

  .rail-brand,
  .rail-bottom { display: none; }

  .rail-nav {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
    margin: 0;
  }

  .rail-nav a {
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: 0.1rem;
    padding: 0.35rem;
    font-size: 0.65rem;
    text-align: center;
  }

  .rail-nav a > span { width: auto; font-size: 1rem; }

  .workspace-main {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .workspace-topline { align-items: flex-start; }
  .workspace-state { display: none; }

  .module-nav { grid-template-columns: 1fr 1fr; }
  .assignment-cards,
  .assignment-cards--catalog { grid-template-columns: 1fr; }

  .catalog-stats { grid-template-columns: 1fr; }

  .cockpit-layout { grid-template-columns: 1fr; }
  .cockpit-side { position: static; }

  .simulation-view { width: min(100% - 1rem, 1500px); }
  .simulation-toolbar {
    position: static;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .brand-lockup .subtitle,
  .account-status { display: none; }

  .hero-visual { min-height: 310px; }
  .hero-kpi-grid { grid-template-columns: 1fr 1fr 1fr; }
  .hero-kpi-grid span { display: none; }

  .product-grid,
  .module-nav { grid-template-columns: 1fr; }

  .product-card { min-height: 290px; }

  .form-grid { grid-template-columns: 1fr; }

  .workspace-topline {
    display: grid;
    gap: 0.9rem;
  }

  .profile-summary { display: grid; }

  .catalog-empty {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .open-ed-header {
    display: grid;
    align-items: start;
  }

  .simulation-toolbar {
    display: grid;
    gap: 0.8rem;
  }

  .simulation-toolbar .actions { margin-top: 0; }
}