:root {
  --navy: #071b36;
  --navy-2: #0b294d;
  --blue: #1570ef;
  --cyan: #37b9d6;
  --ink: #10233f;
  --muted: #66758c;
  --line: #dfe6ef;
  --surface: #ffffff;
  --bg: #f3f6fa;
  --danger: #c4323b;
  --success: #13805e;
  --shadow: 0 18px 50px rgba(7, 27, 54, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, Pretendard, "Noto Sans SC", "Noto Sans KR", "Microsoft YaHei", Arial, sans-serif;
  overflow-wrap: anywhere;
}
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(55, 185, 214, 0.5);
  outline-offset: 2px;
}
.hidden { display: none !important; }

/* The anonymous document contains only this authentication surface. */
.auth-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 10%, rgba(55, 185, 214, 0.13), transparent 32rem),
    linear-gradient(150deg, #f7faff, #eef3f9 65%, #e9f1f8);
}
.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(202, 215, 230, 0.85);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}
.auth-brand, .brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  text-decoration: none;
}
.auth-brand { color: var(--navy); }
.brand { color: #fff; }
.brand-mark {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: -1px;
}
.auth-brand .brand-mark { color: #0c4b80; background: rgba(255, 255, 255, 0.68); }
.brand .brand-mark { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.08); }
.auth-brand strong, .brand strong { display: block; font-size: 17px; letter-spacing: 0.12em; white-space: nowrap; }
.auth-brand small, .brand small { display: block; margin-top: 3px; font-size: 11px; letter-spacing: 0.28em; }
.auth-brand small { color: #1287a4; }
.brand small { color: #8ed8e8; }
.auth-language { display: flex; align-items: center; gap: 10px; }
.auth-language label { color: var(--muted); font-size: 12px; }
select {
  min-height: 44px;
  max-width: 170px;
  padding: 9px 34px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.auth-stage {
  display: grid;
  width: 100%;
  padding: clamp(32px, 6vh, 70px) 20px;
  place-items: center;
}
.login-card {
  width: min(100%, 480px);
  min-width: 0;
  padding: clamp(26px, 5vw, 40px);
  border: 1px solid rgba(215, 224, 235, 0.95);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-heading { margin-bottom: 26px; text-align: center; }
.card-kicker { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.login-card h1 { margin: 7px 0 0; font-size: clamp(27px, 5vw, 32px); }
.login-lead { margin: 10px 0 0; color: var(--ink); font-size: 16px; font-weight: 700; }
.login-description { margin: 8px auto 0; max-width: 390px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-card > label { display: block; margin: 18px 0 7px; color: #4c5d73; font-size: 12px; font-weight: 700; }
.login-card input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 13px;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  outline: none;
}
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.12); }
.password-field { position: relative; min-width: 0; }
.password-field input { padding-right: 78px; }
.password-field button {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 58px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #425975;
  background: #edf3fa;
  font-size: 12px;
}
.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), #0e8fb4);
  font-weight: 800;
}
.primary-button:disabled { cursor: wait; opacity: 0.6; }
.form-status { min-height: 21px; margin: 12px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.form-status.success { color: var(--success); }
.access-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; text-align: center; }
.auth-support { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 12px; text-align: center; }
.auth-support summary { display: inline-block; color: var(--blue); font-size: 12px; font-weight: 700; list-style: none; }
.auth-support summary::-webkit-details-marker { display: none; }
.auth-support p { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-footer { padding: 18px 20px 24px; color: #77899c; font-size: 11px; text-align: center; }
noscript { display: block; padding: 20px; color: var(--danger); text-align: center; }

/* Authenticated workspace. It is injected only after session and role checks pass. */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.app-shell > main { min-width: 0; }
.test-environment-banner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  color: #3b2600;
  background: #ffd76a;
  border-bottom: 1px solid #e4b83f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  overflow-wrap: anywhere;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 22px;
  color: #fff;
  background: linear-gradient(165deg, var(--navy), #0a2446 64%, #0c3158);
  overflow-y: auto;
}
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-close {
  display: none;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 28px;
  line-height: 1;
}
.portal-label { margin: 34px 0 16px; color: #8ca5c0; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 6px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 10px;
  color: #bfd0e1;
  font-size: 14px;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-icon { flex: 0 0 23px; width: 23px; text-align: center; }
.support-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #abc0d5;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.6;
}
.support-card a { display: block; margin-top: 8px; color: #8ee1f0; font-weight: 700; text-decoration: none; }
.sidebar-overlay { display: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 14px 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}
.page-heading { min-width: 0; }
.eyebrow { display: block; color: #698099; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.topbar h1 { margin: 5px 0 0; font-size: 20px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.language-label { color: var(--muted); font-size: 12px; }
.text-button { min-height: 42px; padding: 8px; border: 0; color: var(--blue); background: transparent; }
.mobile-menu {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-size: 23px;
}
.workspace { width: 100%; max-width: 1380px; margin: 0 auto; padding: 50px; }
.content-panel { min-height: calc(100vh - 184px); }
.content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.content-heading h2 { margin: 8px 0; font-size: clamp(28px, 4vw, 34px); }
.user-chip { max-width: 50%; padding: 9px 12px; border-radius: 999px; color: #1c5da9; background: #e9f2ff; font-size: 12px; }
.empty-state {
  display: grid;
  place-items: center;
  margin-top: 80px;
  padding: clamp(40px, 7vw, 70px) 24px;
  border: 1px dashed #c5d1df;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}
.empty-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; color: #129276; background: #e9f8f5; font-size: 24px; }
.empty-state h3 { margin: 20px 0 8px; }
.empty-state p { max-width: 660px; margin: 0; color: var(--muted); line-height: 1.7; }
.support-guidance { margin-top: 14px !important; padding: 10px 14px; border-radius: 10px; color: #6f5c23 !important; background: #fff8dd; font-size: 12px; }

@media (max-width: 1100px) {
  .workspace { padding: 40px 32px; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 0;
    width: min(300px, 86vw);
    height: 100dvh;
    padding-top: max(22px, env(safe-area-inset-top));
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: 18px 0 50px rgba(7, 27, 54, 0.2);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    visibility: hidden;
    border: 0;
    background: rgba(4, 18, 35, 0.52);
    opacity: 0;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }
  .sidebar-overlay.visible { visibility: visible; opacity: 1; }
  body.menu-open { overflow: hidden; }
  .mobile-menu { display: grid; place-items: center; }
  .topbar { padding: 14px 20px; }
  .workspace { padding: 32px 20px; }
}

@media (max-width: 640px) {
  .auth-topbar { min-height: 76px; gap: 12px; padding: 12px 15px; }
  .auth-brand { gap: 9px; }
  .auth-brand .brand-mark { flex-basis: 40px; width: 40px; height: 40px; border-radius: 12px; }
  .auth-brand strong { font-size: 14px; letter-spacing: 0.08em; }
  .auth-brand small { font-size: 9px; }
  .auth-language label { display: none; }
  .auth-language select { width: 112px; max-width: 34vw; padding-left: 8px; font-size: 13px; }
  .auth-stage { padding: 24px 14px; align-items: start; }
  .login-card { padding: 26px 19px; border-radius: 18px; }
  .login-card input, .primary-button { min-height: 50px; }
  .auth-footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 76px; gap: 10px; padding: 10px 14px; }
  .page-heading { flex: 1 1 auto; }
  .topbar .eyebrow, .language-label { display: none; }
  .topbar h1 { margin: 0; font-size: 17px; }
  .top-actions { flex: 0 1 auto; gap: 4px; }
  .top-actions select { width: 112px; max-width: 30vw; min-height: 44px; padding-left: 8px; font-size: 13px; }
  .text-button { max-width: 86px; font-size: 12px; }
  .workspace { padding: 24px 15px; }
  .content-heading { align-items: center; }
  .user-chip { max-width: 46%; }
  .empty-state { margin-top: 42px; padding: 42px 18px; }
}

@media (max-width: 380px) {
  .auth-brand strong { font-size: 13px; }
  .auth-brand small { letter-spacing: 0.2em; }
  .auth-language select { width: 98px; max-width: 31vw; }
  .login-card { padding-inline: 16px; }
  .top-actions select { width: 98px; max-width: 28vw; }
  .text-button { padding-inline: 3px; }
  .workspace { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
/* V1.1.0 limited assignment workspace */
.organization-summary {
  display: grid;
  gap: 5px;
  margin: 28px 0 16px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}
.organization-summary span { color: #8ca5c0; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.organization-summary strong { color: #fff; font-size: 13px; line-height: 1.45; }
.support-card strong { display: block; margin-bottom: 5px; color: #fff; }
.support-card span { display: block; }
.identity-context { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.organization-chip, .user-chip { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-chip { padding: 9px 12px; border-radius: 999px; color: #176477; background: #e8f7f8; font-size: 12px; }
.content-body { margin-top: 28px; }
.context-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.context-card, .detail-card, .data-boundary {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(7,27,54,.06);
}
.context-card h3, .detail-card h3 { margin: 8px 0 14px; }
.context-card p, .detail-card p, .data-boundary p { color: var(--muted); line-height: 1.7; }
.section-kicker { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.context-card dl, .assignment-card dl, .detail-list { display: grid; gap: 9px; margin: 16px 0 0; }
.context-card dl div, .assignment-card dl div, .detail-list div { display: flex; min-width: 0; justify-content: space-between; gap: 18px; }
dt { color: var(--muted); font-size: 12px; }
dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; text-align: right; }
.boundary-note, .privacy-note, .feature-notice, .review-gate-note { margin-top: 16px !important; padding: 11px 13px; border-radius: 10px; color: #35516f !important; background: #edf4fb; font-size: 12px; }
.review-card { border-color: #d6e9e4; background: #f8fdfb; }
.data-boundary { margin-top: 16px; box-shadow: none; }
.data-boundary h3 { margin: 0 0 6px; font-size: 16px; }
.status-badge { display: inline-flex; align-items: center; min-height: 29px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.status-ready, .status-accepted { color: #0d7456; background: #e4f7f1; }
.status-pending, .status-draft { color: #725d1d; background: #fff4cc; }
.status-submitted, .status-review_required { color: #185a96; background: #e5f1ff; }
.status-revision_requested { color: #9b3f31; background: #fdeae6; }
.status-assigned, .status-in_progress, .status-due { color: #315c88; background: #edf4fb; }
.status-completed { color: #0d7456; background: #e4f7f1; }
.status-cancelled { color: #66758c; background: #edf0f4; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 280px; color: var(--muted); }
.loading-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); animation: partnerPulse 1.2s ease-in-out infinite; }
@keyframes partnerPulse { 50% { opacity: .3; transform: scale(.8); } }
.assignment-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.assignment-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 0 10px 28px rgba(7,27,54,.06); text-decoration: none; transition: transform .16s ease, border-color .16s ease; }
.assignment-card:hover { transform: translateY(-2px); border-color: #9cc3ee; }
.assignment-card-heading, .detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.assignment-card h3 { margin: 17px 0; font-size: 18px; }
.system-number { color: var(--blue); font-size: 12px; font-weight: 800; }
.card-link { display: block; margin-top: 18px; color: var(--blue); font-size: 12px; font-weight: 800; }
.muted-value { color: #8b98a9; font-weight: 500; }
.assignment-detail-layout { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(420px,1.2fr); align-items: start; gap: 18px; margin-top: 16px; }
.back-link { display: inline-flex; margin-bottom: 4px; }
.secondary-link { color: var(--blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.detail-list { margin: 22px 0; }
.detail-list div { padding-bottom: 10px; border-bottom: 1px solid #edf1f5; }
.instruction-block, .template-block, .derived-drafts, .evidence-panel { margin-top: 20px; padding: 17px; border-radius: 13px; background: #f7f9fc; }
.instruction-block h4, .template-block h4, .derived-drafts h4, .evidence-panel h4 { margin: 0 0 8px; font-size: 13px; }
.instruction-block p { margin: 0; white-space: pre-wrap; }
.template-fields { margin: 10px 0 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.review-waiting { display: grid; gap: 5px; margin-top: 18px; padding: 14px; border: 1px solid #cce3f8; border-radius: 12px; color: #185a96; background: #f0f7ff; }
.review-waiting span { font-size: 12px; line-height: 1.5; }
.response-workspace form > label:not(.check-field) { display: block; margin: 17px 0 7px; color: #4c5d73; font-size: 12px; font-weight: 800; }
.response-workspace textarea, .response-workspace input[type="date"], .response-workspace input[type="file"] { width: 100%; min-width: 0; border: 1px solid #cfd9e6; border-radius: 10px; background: #fff; }
.response-workspace textarea { padding: 12px; resize: vertical; }
.response-workspace input[type="date"], .response-workspace input[type="file"] { min-height: 46px; padding: 10px; }
.response-workspace textarea:focus, .response-workspace input:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(21,112,239,.12); }
.response-workspace :disabled { cursor: not-allowed; opacity: .68; }
.field-help { margin: 7px 0 0 !important; color: var(--muted); font-size: 11px; line-height: 1.55 !important; }
.check-field { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-size: 13px; font-weight: 700; }
.check-field input { width: 18px; height: 18px; }
.derived-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.derived-grid div { display: grid; gap: 5px; padding: 12px; border: 1px dashed #cbd6e3; border-radius: 10px; background: #fff; }
.derived-grid strong { font-size: 12px; }
.derived-grid span { color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.primary-button.compact { width: auto; min-width: 150px; margin-top: 0; }
.secondary-button { min-height: 44px; padding: 9px 15px; border: 1px solid #c9d6e5; border-radius: 10px; color: #31516f; background: #fff; font-weight: 800; }
.evidence-panel .secondary-button { margin-top: 12px; }
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.policy-card { background: #f8fbff; }
.account-management { margin-top: 18px; }
.soft-policy { max-width: 260px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: right; }
.account-user-list { display: grid; gap: 10px; margin-top: 20px; }
.account-user-row { display: grid; grid-template-columns: minmax(180px,1fr) minmax(170px,.7fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fbfcfe; }
.account-user-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.account-user-row strong, .account-user-row span { overflow-wrap: anywhere; }
.account-user-row > div:first-child span { color: var(--muted); font-size: 11px; }
.user-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #455c75; font-size: 12px; }
.secondary-button.compact { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.member-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e6ecf3; }
.member-form h4 { margin: 0 0 14px; }
.member-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.member-form label { display: grid; gap: 7px; color: #4c5d73; font-size: 12px; font-weight: 800; }
.member-form input, .member-form select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #cfd9e6; border-radius: 10px; color: var(--ink); background: #fff; }
.member-form .primary-button { margin-top: 14px; }
.content-body .empty-state { margin-top: 0; min-height: 360px; }

@media (max-width: 1100px) {
  .context-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .context-grid .review-card { grid-column: 1 / -1; }
  .assignment-detail-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .context-grid, .assignment-list, .account-grid { grid-template-columns: minmax(0,1fr); }
  .context-grid .review-card { grid-column: auto; }
  .identity-context { display: none; }
  .content-body { margin-top: 20px; }
  .context-card, .detail-card, .data-boundary { padding: 19px; border-radius: 15px; }
  .form-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .primary-button.compact { width: 100%; }
  .account-user-row { grid-template-columns: minmax(0,1fr); }
  .user-meta { justify-content: flex-start; }
  .account-user-row .secondary-button { width: 100%; }
  .member-form-grid { grid-template-columns: minmax(0,1fr); }
  .soft-policy { max-width: none; text-align: left; }
}
@media (max-width: 420px) {
  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
  }
  .top-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  .top-actions select { width: 100%; max-width: none; }
  .text-button { max-width: none; white-space: nowrap; }
  .derived-grid { grid-template-columns: minmax(0,1fr); }
  .assignment-card-heading, .detail-heading { align-items: flex-start; flex-direction: column; }
}

/* P01-U1 standalone account and shell productization */
.auth-state-card {
  display: grid;
  justify-items: center;
  width: min(100%, 540px);
  padding: 42px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(7,27,54,.1);
  text-align: center;
}
.auth-state-card h1 { margin: 10px 0 8px; font-size: clamp(24px, 4vw, 34px); }
.auth-state-card p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.7; }
.auth-state-card.is-unavailable .state-spinner { display: none; }
.auth-state-action { margin-top: 24px; }
.state-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #dce8f5;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: partnerSpin .8s linear infinite;
}
@keyframes partnerSpin { to { transform: rotate(360deg); } }
.organization-summary small { color: #b7c7da; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.test-environment-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 14px; }
.test-environment-banner[data-prelaunch-banner] { display: block; width: 100%; white-space: normal; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.test-environment-banner strong { letter-spacing: .08em; }
.test-environment-banner span { padding-left: 14px; border-left: 1px solid currentColor; }
.ui-state {
  display: grid;
  justify-items: center;
  min-height: 300px;
  padding: 44px 22px;
  border: 1px dashed #cfdae7;
  border-radius: 16px;
  background: #fbfcfe;
  text-align: center;
}
.ui-state-icon { display: grid; place-items: center; min-height: 42px; color: var(--blue); font-size: 28px; font-weight: 800; }
.ui-state h3 { margin: 14px 0 8px; font-size: 20px; }
.ui-state p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.7; }
.ui-state-unavailable, .ui-state-denied { border-style: solid; border-color: #f0d9d5; background: #fffaf9; }
.ui-state-denied .ui-state-icon, .ui-state-unavailable .ui-state-icon { color: #9b3f31; }
.state-action { margin-top: 22px; }
.state-back-link { display: table; margin: 16px auto 0; }
.global-feedback {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  background: #0d7456;
  box-shadow: 0 16px 40px rgba(7,27,54,.22);
  font-size: 13px;
  font-weight: 800;
}
.global-feedback.is-error { background: #9b3f31; }
.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(7,27,54,.28);
}
.confirm-dialog::backdrop { background: rgba(4,20,38,.55); backdrop-filter: blur(3px); }
.confirm-dialog form { padding: 28px; }
.dialog-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #9b3f31; background: #fdeae6; font-weight: 900; }
.confirm-dialog h2 { margin: 16px 0 8px; font-size: 21px; }
.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.7; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.danger-button { min-height: 44px; padding: 9px 15px; border: 0; border-radius: 10px; color: #fff; background: #9b3f31; font-weight: 800; }
.danger-button:hover { background: #7f3026; }
.self-badge { padding: 3px 7px; border-radius: 999px; color: #315c88; background: #edf4fb; font-size: 10px; font-weight: 800; }
.form-intro { margin: -7px 0 14px !important; font-size: 12px; }
.status-inactive { color: #9b3f31; background: #fdeae6; }

/* PRE-LAUNCH Test Access */
.test-access-page { min-height: 100vh; color: var(--ink); background: linear-gradient(145deg, #f4f8fc, #eef7f5); }
.test-access-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); }
.test-access-header .brand { color: var(--ink); }
.test-access-main { width: min(1050px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 72px; }
.test-access-intro { max-width: 720px; }
.test-access-intro h1 { margin: 10px 0 12px; font-size: clamp(30px, 6vw, 50px); line-height: 1.08; }
.test-access-intro p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.review-only-note { display: inline-flex; margin-top: 12px; padding: 8px 12px; border-radius: 999px; color: #725d1d; background: #fff4cc; font-size: 12px; font-weight: 800; }
.persona-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 34px; }
.persona-card { display: grid; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 14px 36px rgba(7,27,54,.07); }
.persona-card h2 { margin: 12px 0 6px; font-size: 19px; }
.persona-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.persona-card .primary-button { align-self: end; margin-top: 22px; text-decoration: none; text-align: center; }
.persona-role { justify-self: start; }
.test-access-footer { margin-top: 28px; padding: 18px; border-radius: 14px; color: #35516f; background: #e8f1fa; font-size: 13px; line-height: 1.7; }

@media (max-width: 760px) {
  .auth-state-card { padding: 34px 20px; border-radius: 18px; }
  .ui-state { min-height: 260px; padding: 34px 16px; }
  .global-feedback { right: 16px; bottom: 16px; left: 16px; max-width: none; }
  .dialog-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dialog-actions button { width: 100%; }
  .persona-grid { grid-template-columns: minmax(0,1fr); }
  .test-access-main { padding-top: 34px; }
}

/* P01-U2 Home and read-only Assignment productization */
.home-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #0b345f, #116a82);
  box-shadow: 0 18px 44px rgba(7,27,54,.12);
}
.home-intro h3 { margin: 8px 0; font-size: clamp(23px,3vw,31px); }
.home-intro p { max-width: 680px; margin: 0; color: #d7e9f2; line-height: 1.7; }
.home-intro .section-kicker { color: #93e0ec; }
.home-all-link { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; color: #fff; border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.1); text-decoration: none; }
.home-identity {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)) auto;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.home-identity > div { display: grid; min-width: 0; gap: 3px; }
.home-identity span, .home-identity small { color: var(--muted); font-size: 11px; }
.home-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.home-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.home-metrics > div { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.home-metrics strong { color: var(--blue); font-size: 27px; }
.home-metrics span { color: var(--muted); font-size: 12px; }
.home-section { margin-top: 24px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.home-section-heading h3 { margin: 5px 0; font-size: 19px; }
.home-section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-assignment-list { display: grid; gap: 10px; }
.overview-state { margin-top: 16px; }
.overview-state .ui-state { min-height: 180px; padding: 28px 18px; }
.overview-state .ui-state-icon { min-height: 30px; font-size: 22px; }
.overview-state .ui-state h3 { margin-top: 8px; font-size: 17px; }

.assignment-toolbar {
  display: grid;
  grid-template-columns: minmax(260px,1fr) minmax(180px,240px);
  gap: 14px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.assignment-toolbar label { display: grid; gap: 7px; color: #4c5d73; font-size: 12px; font-weight: 800; }
.assignment-toolbar input, .assignment-toolbar select { width: 100%; min-width: 0; max-width: none; min-height: 46px; padding: 9px 12px; border: 1px solid #cfd9e6; border-radius: 10px; color: var(--ink); background: #fff; }
.assignment-toolbar input:focus, .assignment-toolbar select:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(21,112,239,.12); }
.result-count { min-height: 20px; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.assignment-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.assignment-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(140px,.3fr);
  column-gap: 24px;
  row-gap: 12px;
  padding: 20px 22px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.assignment-card:hover { transform: none; border-color: #b8cce3; box-shadow: 0 13px 32px rgba(7,27,54,.08); }
.assignment-card-heading { grid-column: 1 / -1; align-items: center; }
.assignment-title-group { min-width: 0; }
.assignment-title-group h3 { margin: 6px 0 0; line-height: 1.4; }
.assignment-card dl { grid-column: 1; margin: 0; }
.assignment-card-footer { grid-column: 2; grid-row: 2 / span 2; display: grid; align-content: center; justify-items: end; gap: 10px; text-align: right; }
.assignment-context { color: var(--muted); font-size: 12px; line-height: 1.5; }
.assignment-open-link { white-space: nowrap; }
.assignment-identifier { grid-column: 1; color: #74869a; font-size: 11px; }
.assignment-card-compact { grid-template-columns: minmax(0,1fr) auto; padding: 16px 18px; box-shadow: none; }
.assignment-card-compact .assignment-card-footer { grid-column: 2; grid-row: 2 / span 2; }
.assignment-card-compact .assignment-context { max-width: 210px; }
.status-unknown { color: #66758c; background: #edf0f4; }

.assignment-detail-layout { grid-template-columns: minmax(0,1fr) minmax(270px,.42fr); }
.read-only-panel { position: sticky; top: 104px; }
.read-only-panel > h3 { margin-bottom: 6px; }
.read-only-notice { display: grid; gap: 6px; margin-top: 20px; padding: 15px; border: 1px solid #d5e2ef; border-radius: 12px; background: #f4f8fc; }
.read-only-notice span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.assignment-attention { display: grid; gap: 5px; margin-top: 18px; padding: 14px; border: 1px solid #f0cfc7; border-radius: 12px; color: #8f3b2e; background: #fff7f5; }
.assignment-attention span { font-size: 12px; line-height: 1.5; }
.identifier-details { margin-top: 20px; padding-top: 14px; border-top: 1px solid #e4eaf1; }
.identifier-details summary { color: var(--blue); font-size: 12px; font-weight: 800; }
.identifier-details .detail-list { margin-bottom: 0; }
.secondary-button { text-decoration: none; }

@media (max-width: 1100px) {
  .assignment-detail-layout { grid-template-columns: minmax(0,1fr); }
  .read-only-panel { position: static; }
}
@media (max-width: 760px) {
  .home-intro, .home-section-heading { align-items: stretch; flex-direction: column; }
  .home-all-link { width: 100%; }
  .home-identity { grid-template-columns: minmax(0,1fr); }
  .home-identity strong { white-space: normal; }
  .home-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .assignment-toolbar { grid-template-columns: minmax(0,1fr); }
  .assignment-card, .assignment-card-compact { grid-template-columns: minmax(0,1fr); }
  .assignment-card-footer, .assignment-card-compact .assignment-card-footer { grid-column: 1; grid-row: auto; justify-items: start; text-align: left; }
  .assignment-identifier { grid-column: 1; }
}
@media (max-width: 420px) {
  .home-intro { padding: 21px 18px; border-radius: 16px; }
  .home-metrics { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .home-metrics > div { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; padding: 13px 16px; }
  .home-metrics strong { font-size: 22px; }
  .assignment-toolbar { padding: 13px; }
  .assignment-card { padding: 17px; border-radius: 14px; }
  .assignment-card-heading { align-items: flex-start; }
  .assignment-card .status-badge { align-self: flex-start; }
  .assignment-open-link { white-space: normal; }
  .test-environment-banner { gap: 4px 10px; padding-inline: 12px; letter-spacing: 0; line-height: 1.45; }
  .test-environment-banner span { max-width: 100%; padding-left: 0; border-left: 0; }
}

/* P01-U3 visual system and interaction hardening */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --control-height: 44px;
  --container-max: 1180px;
  --surface-muted: #f8fafc;
  --line-strong: #cbd6e3;
  --shadow-card: 0 10px 30px rgba(7, 27, 54, 0.07);
  --focus-ring: 0 0 0 3px rgba(21, 112, 239, 0.18);
  --danger-ink: #96392f;
  --danger-surface: #fff1ee;
  --warning-ink: #805615;
  --warning-surface: #fff5d6;
  --info-ink: #185a96;
  --info-surface: #eaf3ff;
  --success-ink: #0d7456;
  --success-surface: #e6f7f1;
}

body { font-size: 14px; line-height: 1.55; }
button, input, select, textarea { min-width: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.workspace {
  width: min(100%, var(--container-max));
  max-width: var(--container-max);
  padding: var(--space-8) clamp(var(--space-5), 4vw, 52px);
}
.content-panel { min-width: 0; }
.content-heading { align-items: center; gap: var(--space-6); }
.content-heading h1 { margin: var(--space-2) 0 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.16; letter-spacing: -0.025em; }
.topbar-context { display: block; margin-top: var(--space-1); font-size: 18px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.content-body { margin-top: var(--space-7); }
.section-kicker, .eyebrow { line-height: 1.35; }
.context-card h2, .detail-card h2, .data-boundary h2, .home-section-heading h2 { margin: var(--space-2) 0 var(--space-3); font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.instruction-block h3, .template-block h3, .member-form h3 { margin: 0 0 var(--space-2); font-size: 15px; line-height: 1.4; }

.context-card, .detail-card, .data-boundary, .home-identity, .assignment-toolbar, .assignment-card, .persona-card, .auth-state-card, .login-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.context-card, .detail-card, .data-boundary { padding: var(--space-6); }
.data-boundary { box-shadow: none; background: var(--surface-muted); }
.data-boundary h2 { margin-top: 0; font-size: 16px; }

.primary-button, .secondary-button, .danger-button, .text-button {
  min-height: var(--control-height);
  border-radius: var(--radius-sm);
  font-weight: 800;
  line-height: 1.25;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.primary-button { background: var(--blue); }
.primary-button:not(:disabled):hover { background: #0d5fcf; }
.secondary-button { border-color: var(--line-strong); color: #294c70; background: #fff; }
.secondary-button:not(:disabled):hover { border-color: #9fb8d2; background: #f3f7fb; }
.danger-button { background: var(--danger-ink); }
.danger-trigger { border-color: #e5b8b1; color: var(--danger-ink); background: #fff; }
.danger-trigger:not(:disabled):hover { border-color: #cf8e84; background: var(--danger-surface); }
.primary-button:disabled, .secondary-button:disabled, .danger-button:disabled { cursor: not-allowed; opacity: .58; }
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  color: #0f64be;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-underline-offset: 3px;
}
.secondary-link:hover { color: #084f9a; text-decoration: underline; }

.status-badge {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.status-active, .status-ready, .status-completed, .status-accepted { color: var(--success-ink); background: var(--success-surface); }
.status-inactive, .status-revision_requested { color: var(--danger-ink); background: var(--danger-surface); }
.status-due, .status-pending, .status-draft { color: var(--warning-ink); background: var(--warning-surface); }
.status-submitted, .status-review_required, .status-assigned, .status-in_progress { color: var(--info-ink); background: var(--info-surface); }
.status-cancelled, .status-unknown { color: var(--muted); background: #edf1f5; }

.home-intro { gap: var(--space-7); padding: var(--space-7); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.home-intro h2 { margin: var(--space-2) 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.22; letter-spacing: -0.02em; }
.home-all-link { align-self: center; min-height: var(--control-height); color: #fff; text-decoration-color: rgba(255,255,255,.7); }
.home-all-link:hover { color: #fff; }
.home-identity { gap: var(--space-5); margin-top: var(--space-4); padding: var(--space-4) var(--space-5); }
.home-metrics {
  gap: 0;
  margin-top: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.home-metrics > div { gap: var(--space-1); padding: var(--space-4) var(--space-5); border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.home-metrics > div:last-child { border-right: 0; }
.home-metrics strong { font-size: 24px; line-height: 1.1; }
.home-section { margin-top: var(--space-7); }
.home-section-heading { align-items: center; gap: var(--space-5); margin-bottom: var(--space-3); padding-left: var(--space-4); border-left: 3px solid #b8cadc; }
.home-section[data-home-category="needsAttention"] .home-section-heading { border-left-color: #d36a5c; }
.home-section[data-home-category="activeAssignments"] .home-section-heading { border-left-color: var(--blue); }
.home-section[data-home-category="waitingNoAction"] .home-section-heading { border-left-color: #d7a834; }
.home-section[data-home-category="completedAssignments"] .home-section-heading { border-left-color: var(--success); }
.home-section-heading h2 { margin: var(--space-1) 0; }
.section-empty {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-muted);
}
.section-empty > span { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--success-ink); background: var(--success-surface); font-weight: 900; }
.section-empty strong { display: block; color: var(--ink); font-size: 13px; }
.section-empty p { margin: var(--space-1) 0 0; font-size: 12px; line-height: 1.55; }

.assignment-toolbar { gap: var(--space-4); margin-bottom: var(--space-3); padding: var(--space-4); }
.assignment-toolbar input, .assignment-toolbar select, .member-form input, .member-form select { min-height: 46px; border-color: var(--line-strong); border-radius: var(--radius-sm); }
.assignment-toolbar input:focus, .assignment-toolbar select:focus, .member-form input:focus, .member-form select:focus { border-color: var(--blue); outline: 0; box-shadow: var(--focus-ring); }
.assignment-list, .home-assignment-list { gap: var(--space-3); }
.assignment-card { column-gap: var(--space-6); row-gap: var(--space-3); padding: var(--space-5) var(--space-6); }
.assignment-card:hover { border-color: #a9bfd7; box-shadow: 0 14px 34px rgba(7,27,54,.09); }
.assignment-card[data-assignment-category="attention"] { border-left: 4px solid #d36a5c; }
.assignment-card[data-assignment-category="waiting"] { border-left: 4px solid #d7a834; }
.assignment-title-group h3 { font-size: 18px; overflow-wrap: anywhere; }
.assignment-context { max-width: 260px; }
.assignment-open-link { justify-content: flex-end; }
.assignment-detail-layout { gap: var(--space-5); margin-top: var(--space-4); }
.read-only-panel { top: 112px; }
.read-only-notice, .instruction-block, .template-block { border-radius: var(--radius-md); }

.account-grid { gap: var(--space-5); }
.account-management { margin-top: var(--space-5); }
.account-user-list { gap: var(--space-3); margin-top: var(--space-5); }
.account-user-row { gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-muted); }
.member-form { margin-top: var(--space-6); padding-top: var(--space-6); }
.member-form-grid { gap: var(--space-3); }
.form-intro { margin: 0 0 var(--space-4) !important; }

.ui-state { min-height: 280px; padding: var(--space-8) var(--space-6); border-radius: var(--radius-lg); background: var(--surface-muted); }
.ui-state h2 { margin: var(--space-3) 0 var(--space-2); font-size: 20px; line-height: 1.35; }
.overview-state .ui-state { min-height: 170px; padding: var(--space-6); }
.overview-state .ui-state h2 { margin-top: var(--space-2); font-size: 17px; }
.confirm-dialog { max-height: min(620px, calc(100dvh - 32px)); border-radius: var(--radius-lg); overflow: auto; }
.confirm-dialog form { padding: var(--space-7); }
.dialog-actions { gap: var(--space-3); margin-top: var(--space-6); }

.test-environment-banner { min-height: 32px; padding: 6px var(--space-4); letter-spacing: 0; line-height: 1.4; }
.test-access-main { width: min(1050px, calc(100% - 40px)); padding: 48px 0 64px; }
.test-access-intro h1 { max-width: 780px; font-size: clamp(32px, 5vw, 48px); }
.persona-grid { gap: var(--space-5); margin-top: var(--space-7); }
.persona-card { gap: var(--space-2); padding: var(--space-6); }
.persona-card h2 { margin: var(--space-2) 0 0; line-height: 1.35; }
.persona-card .primary-button { display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
  .workspace { padding: var(--space-7) var(--space-5); }
  .topbar-context { font-size: 17px; }
}
@media (max-width: 760px) {
  .workspace { padding: var(--space-6) var(--space-4); }
  .content-heading h1 { font-size: 28px; }
  .content-body { margin-top: var(--space-6); }
  .home-intro, .home-section-heading { gap: var(--space-4); }
  .home-all-link { align-self: flex-start; width: auto; }
  .home-section-heading { align-items: flex-start; padding-left: var(--space-3); }
  .home-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .home-metrics > div { padding: var(--space-3); }
  .assignment-card, .assignment-card-compact { padding: var(--space-5); }
  .assignment-card-footer, .assignment-card-compact .assignment-card-footer { justify-items: start; }
  .assignment-open-link { justify-content: flex-start; }
  .confirm-dialog form { padding: var(--space-6); }
}
@media (max-width: 420px) {
  .workspace { padding: var(--space-5) var(--space-3); }
  .topbar-context { font-size: 16px; }
  .content-heading h1 { font-size: 26px; }
  .home-intro { padding: var(--space-5); }
  .home-metrics { grid-template-columns: minmax(0,1fr); }
  .home-metrics > div { grid-template-columns: 52px minmax(0,1fr); border-right: 0; border-bottom: 1px solid var(--line); }
  .home-metrics > div:last-child { border-bottom: 0; }
  .assignment-card-heading, .detail-heading { gap: var(--space-3); }
  .assignment-card .status-badge { width: auto; }
  .assignment-toolbar { padding: var(--space-3); }
  .account-user-row .secondary-button { min-height: 46px; }
  .test-access-header { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3); }
  .test-access-header .auth-language { width: 100%; justify-content: space-between; }
  .test-access-header .auth-language select { width: min(180px, 55vw); max-width: none; }
  .test-access-main { width: min(100% - 24px, 1050px); padding-top: var(--space-7); }
  .persona-card { padding: var(--space-5); }
  .dialog-actions { grid-template-columns: minmax(0,1fr); }
}

/* P01-U4 onboarding and first-use guidance productization */
.first-use-orientation {
  margin-bottom: var(--space-7);
  padding: var(--space-6);
  border: 1px solid #aec8e3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f2f8ff 0%, #fff 65%);
  box-shadow: var(--shadow-card);
}
.orientation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); }
.orientation-heading h2 { margin: var(--space-2) 0 0; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; letter-spacing: -0.02em; }
.orientation-dismiss { flex: 0 0 auto; min-height: 44px; padding: 0 var(--space-3); }
.orientation-purpose { max-width: 780px; margin: var(--space-4) 0; color: var(--ink); font-size: 15px; line-height: 1.65; }
.orientation-context { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3); margin: 0; }
.orientation-context > div { min-width: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.orientation-context dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.orientation-context dd { margin: var(--space-1) 0 0; color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.orientation-guide { margin-top: var(--space-5); }
.orientation-guide > strong { display: block; margin-bottom: var(--space-2); }
.orientation-guide ul { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.orientation-guide li { min-width: 0; padding: var(--space-3) var(--space-4); border-left: 3px solid #abc6df; background: var(--surface-muted); }
.orientation-guide li span { display: block; color: var(--ink); font-weight: 800; }
.orientation-guide li small { display: block; margin-top: var(--space-1); color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.orientation-role-note { margin: var(--space-4) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.first-use-next { margin: var(--space-3) 0 var(--space-6); color: var(--muted); text-align: center; line-height: 1.6; }
.section-helper { max-width: 680px; margin: var(--space-2) 0 var(--space-4); color: var(--muted); font-size: 13px; line-height: 1.6; }
.persona-code { display: block; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .first-use-orientation { padding: var(--space-5); }
  .orientation-guide ul { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 420px) {
  .orientation-heading { align-items: stretch; flex-direction: column; gap: var(--space-3); }
  .orientation-dismiss { align-self: flex-start; }
  .orientation-context { grid-template-columns: minmax(0,1fr); }
}

/* P01-U5 degraded network and recovery UX hardening */
.degraded-network-banner {
  position: sticky;
  z-index: 18;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3) var(--space-5);
  border-block: 1px solid #d9b66d;
  color: #5f4514;
  background: #fff8e8;
  box-shadow: 0 6px 18px rgba(86, 59, 8, .08);
}
.degraded-network-banner[hidden] { display: none; }
.degraded-network-banner.is-offline { border-color: #d49a8b; color: #713729; background: #fff5f2; }
.degraded-network-banner.is-ambiguous { border-color: #c59a59; background: #fff4dd; }
.degraded-network-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-weight: 900; }
.degraded-network-copy { display: grid; min-width: 0; gap: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.degraded-network-copy strong { font-size: 14px; }
.degraded-network-copy span, .degraded-network-copy small { font-size: 12px; }
.degraded-network-copy small { color: #745b2c; font-weight: 700; }
.degraded-network-retry { min-width: 132px; min-height: 44px; background: #fff; }

@media (max-width: 760px) {
  .degraded-network-banner { padding-inline: var(--space-4); }
}
@media (max-width: 420px) {
  .degraded-network-banner { grid-template-columns: auto minmax(0,1fr); padding: var(--space-3); }
  .degraded-network-retry { grid-column: 1 / -1; width: 100%; }
}

/* P01-U6 compact shell and action-first layout polish */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { padding: 18px 15px; }
.sidebar .brand { gap: 10px; }
.sidebar .brand-mark { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.sidebar .brand strong { font-size: 14px; letter-spacing: .1em; }
.sidebar .brand small { margin-top: 1px; font-size: 9px; }
.organization-summary { gap: 3px; margin: 18px 0 12px; padding: 10px 11px; border-radius: 10px; }
.organization-summary strong { font-size: 12px; }
.sidebar-user-line { display: flex; min-width: 0; flex-wrap: wrap; gap: 2px 8px; }
.sidebar-user-line small:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav { gap: 3px; }
.nav-link { min-height: 44px; gap: 9px; padding: 9px 11px; }
.nav-icon { flex-basis: 20px; width: 20px; }
.support-card.support-note { display: flex; align-items: flex-start; gap: 7px; padding: 8px 4px; border: 0; background: transparent; line-height: 1.45; }
.support-note > span { flex: 0 0 auto; color: #8ee1f0; }
.support-note small { color: #abc0d5; font-size: 11px; }
.test-environment-banner { min-height: 30px; padding: 4px 12px; gap: 4px 10px; font-size: 11px; line-height: 1.35; }
.test-environment-banner span { padding-left: 10px; }
.topbar { min-height: 56px; justify-content: flex-end; gap: 12px; padding: 6px clamp(16px, 3vw, 32px); }
.topbar-context { display: none; }
.mobile-menu { margin-right: auto; }
.top-actions { gap: 7px; }
.top-actions select { min-height: 44px; }
.workspace { max-width: 1440px; padding: 24px clamp(16px, 3vw, 36px); }
.content-panel { min-height: calc(100vh - 134px); }
.content-heading { display: block; }
.content-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 32px); line-height: 1.18; }
.content-body { margin-top: 16px; }

.home-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.home-metrics > div { padding: 12px 16px; }
.home-metrics strong { font-size: 21px; }
.home-quick-action { margin-top: 8px; text-align: right; }
.home-quick-action .home-all-link { min-height: 44px; color: var(--blue); text-decoration-color: currentColor; }
.home-section { margin-top: 16px; }
.home-section-heading { gap: 12px; margin-bottom: 9px; padding-left: 10px; }
.home-section-heading h2 { margin: 2px 0 3px; font-size: 17px; }
.home-section-heading p { line-height: 1.45; }
.section-empty { padding: 12px 14px; }
.overview-state { margin-top: 0; }
.ui-state, .overview-state .ui-state, .content-body .empty-state {
  min-height: 0;
  justify-items: start;
  padding: 18px 20px;
  border-radius: 14px;
  text-align: left;
}
.ui-state-icon, .overview-state .ui-state-icon { min-height: 26px; font-size: 21px; }
.ui-state h2, .ui-state h3, .overview-state .ui-state h2, .overview-state .ui-state h3 { margin: 6px 0 4px; font-size: 17px; }
.ui-state p { max-width: 680px; line-height: 1.5; }
.state-action { margin-top: 12px; }
.state-back-link { margin: 10px 0 0; }
.first-use-next { margin: 8px 0 0; text-align: left; }
.first-use-orientation { margin: 16px 0 0; padding: 13px 15px; border-radius: 13px; box-shadow: none; }
.orientation-heading { gap: 12px; }
.orientation-heading h2 { margin: 2px 0 0; font-size: 17px; }
.orientation-dismiss { flex: 0 0 auto; min-height: 44px; }
.orientation-role-note { margin: 6px 0 0; padding: 0; border: 0; font-size: 12px; line-height: 1.5; }
.orientation-guide { margin-top: 8px; }
.orientation-guide ul { display: flex; flex-wrap: wrap; gap: 6px; }
.orientation-guide li { padding: 0; border: 0; background: transparent; }
.orientation-guide a { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--blue); background: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }

.assignment-toolbar { padding: 12px; }
.result-count { margin: 10px 0; }
.assignment-card { padding: 15px 17px; }
.privacy-note { margin-top: 10px; }

.account-management { margin-top: 0; padding: 18px; }
.detail-heading { align-items: flex-start; }
.detail-heading h2 { margin: 2px 0 4px; font-size: 19px; }
.detail-heading .section-helper { margin: 0; }
.soft-policy { align-self: flex-start; max-width: 230px; font-weight: 400; opacity: .86; }
.account-user-list { margin-top: 14px; }
.account-user-row { padding: 11px 13px; }
.member-form { margin-top: 16px; padding-top: 16px; }
.form-intro { margin-bottom: 10px !important; }
.account-summary { margin-top: 14px; padding: 15px 18px; background: var(--surface-muted); box-shadow: none; }
.account-summary-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-summary-heading h2 { margin: 2px 0 0; font-size: 17px; }
.account-summary-heading .section-helper { max-width: 520px; margin: 0; font-size: 12px; text-align: right; }
.account-summary-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 12px; }
.account-summary-list > div { display: block; padding: 8px 12px; border-bottom: 0; border-left: 1px solid var(--line); }
.account-summary-list > div:first-child { padding-left: 0; border-left: 0; }
.account-summary-list dt { margin-bottom: 3px; }
.account-summary-list dd { overflow-wrap: anywhere; }
.access-helper { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

@media (max-width: 900px) {
  .sidebar { width: min(268px, 86vw); }
  .topbar { padding: 6px 16px; }
  .workspace { padding: 22px 18px; }
  .account-summary-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-summary-list > div:nth-child(4) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .workspace { padding: 20px 15px; }
  .content-body { margin-top: 14px; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metrics > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .home-metrics > div:nth-child(2n) { border-right: 0; }
  .home-metrics > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .account-summary-heading { display: block; }
  .account-summary-heading .section-helper { margin-top: 5px; text-align: left; }
  .account-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-summary-list > div, .account-summary-list > div:nth-child(4) { padding: 8px 10px; border-left: 1px solid var(--line); }
  .account-summary-list > div:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 420px) {
  .degraded-network-banner { grid-template-columns: auto minmax(0, 1fr); }
  .degraded-network-retry { grid-column: 1 / -1; width: 100%; }
  .test-environment-banner { max-height: 58px; gap: 2px 7px; padding-inline: 8px; }
  .test-environment-banner span { padding-left: 0; border-left: 0; }
  .topbar { display: flex; min-height: 56px; grid-template-columns: none; padding: 6px 10px; }
  .top-actions { grid-column: auto; width: auto; }
  .top-actions select { width: 108px; max-width: 31vw; }
  .workspace { padding: 18px 12px; }
  .content-heading h1 { font-size: 25px; }
  .orientation-heading { align-items: flex-start; flex-direction: row; gap: 8px; }
  .orientation-dismiss { align-self: flex-start; }
  .orientation-guide ul { display: flex; grid-template-columns: none; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .home-metrics > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px; padding: 10px; }
  .home-metrics strong { font-size: 19px; }
  .home-metrics span { font-size: 11px; }
  .ui-state, .overview-state .ui-state, .content-body .empty-state { padding: 16px; }
  .account-management, .account-summary { padding: 15px; }
  .detail-heading { display: block; }
  .soft-policy { display: block; max-width: none; margin-top: 6px; text-align: left; }
  .account-summary-list { grid-template-columns: minmax(0, 1fr); }
  .account-summary-list > div, .account-summary-list > div:nth-child(4), .account-summary-list > div:nth-child(odd) { padding: 7px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .account-summary-list > div:last-child { border-bottom: 0; }
}
