:root {
  color-scheme: light;
  --bg: #f4f5f6;
  --panel: #ffffff;
  --panel-soft: #eceeef;
  --line: #d7dadd;
  --text: #151719;
  --muted: #5a6066;
  --dark: #0d0f10;
  --accent: #2c6bed;
  --good: #147a45;
  --warn: #8a5a00;
  --bad: #9a2525;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 11px;
}

.public-body {
  background: #ffffff;
  color: #111111;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.public-page {
  width: min(1160px, calc(100vw - 36px));
  margin: 0 auto;
  display: grid;
  gap: clamp(26px, 4vw, 44px);
  padding: 20px 0 32px;
}

.public-header,
.public-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 16px;
}

.public-logo-link img {
  width: clamp(112px, 12vw, 150px);
  height: auto;
  display: block;
}

.access-logo-link img {
  width: 74px;
  height: auto;
  display: block;
}

.public-nav-links,
.public-footer-links,
.public-cta-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.public-nav-links a,
.public-footer-links a,
.public-button {
  color: #111111;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.35;
}

.public-nav-links a:hover,
.public-footer-links a:hover {
  text-decoration: underline;
}

.public-hero {
  padding: clamp(24px, 5vw, 56px) 0 clamp(12px, 2vw, 22px);
  display: grid;
  gap: 16px;
}

.public-hero h1 {
  max-width: 980px;
  font-size: clamp(46px, 7.6vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 700;
}

.public-hero p {
  max-width: 720px;
  color: #303030;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
}

.public-hero .public-lead {
  color: #111111;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.18;
  font-weight: 600;
}

.public-button {
  border: 1px solid #111111;
  padding: 12px 16px;
}

.public-button.primary {
  color: #ffffff;
  background: #111111;
}

.public-section {
  display: grid;
  gap: 18px;
  border-top: 1px solid #e5e5e5;
  padding-top: clamp(20px, 3vw, 30px);
}

.public-section-heading {
  display: grid;
  max-width: 780px;
}

.public-section h2 {
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.12;
}

.public-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.public-copy-grid article,
.public-team-list div {
  display: grid;
  gap: 8px;
}

.public-copy-grid h3 {
  font-size: 20px;
  line-height: 1.2;
}

.public-copy-grid p,
.public-team-list span,
.public-statement p,
.public-flow li,
.public-signup p,
.public-footer p {
  color: #333333;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.55;
}

.public-statement {
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  padding: clamp(28px, 5vw, 46px) 0;
}

.public-statement p {
  max-width: 920px;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.32;
  color: #111111;
}

.public-team-list {
  display: grid;
  gap: 0;
  border-bottom: 1px solid #eeeeee;
}

.public-team-list div {
  grid-template-columns: minmax(180px, 240px) 1fr;
  border-top: 1px solid #eeeeee;
  padding: 16px 0;
  gap: 18px;
}

.public-team-list strong {
  font-size: clamp(16px, 1.25vw, 18px);
}

.public-flow ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.public-signup {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.public-signup h2 {
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.15;
}

.public-form-card {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.public-footer {
  border-top: 1px solid #e5e5e5;
  border-bottom: 0;
  padding-top: 18px;
  color: #222222;
}

.public-footer p {
  font-size: 13px;
  line-height: 1.4;
}

.access-page {
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 4vw, 42px);
  padding: 20px 0 32px;
}

.access-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 14px;
}

.access-hero {
  display: grid;
  gap: 14px;
  padding: clamp(20px, 4vw, 42px) 0 0;
}

.access-hero h1 {
  max-width: 800px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.03;
}

.access-hero p {
  max-width: 760px;
  color: #303030;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: clamp(24px, 4vw, 46px);
  align-items: stretch;
}

.access-copy {
  display: grid;
  gap: 18px;
  align-content: start;
  height: 100%;
  border: 1px solid #e1e1e1;
  background: #ffffff;
  padding: clamp(18px, 2.5vw, 26px);
}

.access-copy h2,
.access-form-panel h2 {
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.16;
}

.access-copy p,
.access-copy li,
.access-form-panel p,
.access-form label,
.access-form legend,
.access-status {
  color: #303030;
  font-size: 15px;
  line-height: 1.55;
}

.access-copy ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.access-form-panel {
  border: 1px solid #e1e1e1;
  background: #fafafa;
  padding: clamp(18px, 2.5vw, 26px);
  display: grid;
  gap: 16px;
  align-content: start;
  height: 100%;
}

.access-form {
  display: grid;
  gap: 14px;
}

.access-form label {
  display: grid;
  gap: 6px;
}

.access-form input,
.access-form select,
.access-form textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  background: #ffffff;
  color: #111111;
  padding: 10px 11px;
  font-size: 14px;
  line-height: 1.35;
}

.access-form textarea {
  resize: vertical;
}

.access-form fieldset {
  border: 1px solid #dedede;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.access-form legend {
  padding: 0 6px;
  color: #111111;
  font-weight: 600;
}

.access-form fieldset label,
.access-check {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.access-form input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
}

.access-status {
  min-height: 1.5em;
  color: #111111;
}

@media (max-width: 900px) {
  .public-copy-grid,
  .public-signup,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .public-team-list div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .public-header,
  .public-footer,
  .access-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav-links,
  .public-footer-links,
  .public-cta-row,
  .public-form-card {
    gap: 10px;
  }

  .public-button {
    width: 100%;
    text-align: center;
  }
}
button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(220px, 18vw) 1fr;
  min-height: 100vh;
}

.side-panel {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-block {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--dark);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
}

.hero-logo {
  width: min(240px, 70%);
  justify-self: center;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 10px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 13px;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  letter-spacing: 0;
}

h3 {
  font-size: 12px;
  letter-spacing: 0;
}

h4 {
  font-size: 11px;
  margin-bottom: 8px;
}

.brand-block p,
.eyebrow,
.note,
.panel-heading span,
.summary-grid span {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item,
.connection-card button,
.top-actions a,
.job-form button {
  border: 1px solid var(--line);
  background: #f7f8f8;
  color: var(--text);
  padding: 7px 9px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-item.active,
.connection-card button:hover,
.top-actions a:hover,
.job-form button:hover {
  background: #111315;
  color: #ffffff;
  border-color: #111315;
}

.connection-card {
  margin-top: auto;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 7px;
}

.connection-card label {
  color: var(--muted);
}

.connection-card input,
.job-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 7px;
}

.main-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 12px;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.account-pill {
  border: 1px solid var(--line);
  background: #f7f8f8;
  color: var(--muted);
  padding: 7px 9px;
  line-height: 1.2;
}

.account-pill.good {
  color: var(--good);
  border-color: #a8ccb6;
  background: #f7fbf8;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.summary-grid strong {
  font-size: 18px;
}

.content-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.hidden {
  display: none;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plain-list {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 5px;
}

.record-list {
  display: grid;
  gap: 7px;
}

.policy-list {
  display: grid;
  gap: 7px;
  max-height: 300px;
  overflow: auto;
}

.record-card {
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 9px;
  display: grid;
  gap: 5px;
}

.policy-card {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 9px;
  display: grid;
  gap: 5px;
}

.record-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.policy-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.record-card strong {
  font-size: 11px;
}

.record-card code {
  color: var(--muted);
  word-break: break-all;
}

.record-action {
  justify-self: start;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 5px 8px;
  cursor: pointer;
}

.record-action:hover {
  background: #111315;
  color: #ffffff;
  border-color: #111315;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.info-card,
.content-strip {
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 12px;
  display: grid;
  gap: 9px;
}

.content-strip {
  background: #ffffff;
}

.project-card {
  background: #ffffff;
}

.project-workspace-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 7px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: start;
}

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

.detail-list dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.compact-facts {
  display: grid;
  gap: 8px;
}

.compact-facts div,
.source-grid article {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 9px;
  display: grid;
  gap: 4px;
}

.compact-facts span,
.source-grid span {
  color: var(--muted);
}

.compact-facts strong,
.source-grid strong {
  font-size: 12px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.compact-heading {
  padding-bottom: 8px;
}

.tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 2px 5px;
  color: #25282b;
}

.tag.warn {
  color: var(--warn);
  border-color: #d7c49a;
}

.tag.good {
  color: var(--good);
  border-color: #a8ccb6;
}

.mini-bars {
  display: grid;
  gap: 6px;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  align-items: center;
  gap: 8px;
}

.bar-track {
  height: 7px;
  background: #e2e5e7;
}

.bar-fill {
  height: 100%;
  background: #2f3337;
}

.dense {
  max-height: 430px;
  overflow: auto;
}

.compact {
  max-height: 300px;
}

.job-form {
  display: flex;
  gap: 8px;
  align-items: end;
}

.job-form label {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.workspace-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 12px;
}

.setup-card {
  border: 1px solid var(--line);
  background: #fafafa;
  padding: 12px;
  display: grid;
  gap: 9px;
}

.project-form {
  display: grid;
  gap: 8px;
}

.project-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.project-form input,
.project-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 7px 8px;
  font: inherit;
}

.project-form textarea {
  resize: vertical;
}

.project-form button,
.desktop-actions button,
.desktop-actions a {
  border: 1px solid var(--line);
  background: #f7f8f8;
  color: var(--text);
  padding: 7px 9px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.project-form button:hover,
.desktop-actions button:hover,
.desktop-actions a:hover {
  background: #111315;
  color: #ffffff;
  border-color: #111315;
}

.desktop-actions {
  display: grid;
  gap: 8px;
}

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

.install-fallback {
  border: 1px solid #d7c49a;
  background: #fff9eb;
  color: var(--warn);
  padding: 9px;
  display: grid;
  gap: 5px;
}

.install-fallback p {
  color: #5d4508;
}

.portal-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f5f6 100%);
  color: #111315;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 10px;
}

.portal-shell {
  width: min(1440px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 22px 0 30px;
  display: grid;
  gap: 16px;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0 22px;
  border-bottom: 1px solid #dedede;
}

.portal-brand {
  display: flex;
  gap: 13px;
  align-items: center;
}

.portal-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border: 1px solid #dedede;
  background: #ffffff;
}

.portal-brand h1 {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0;
}

.portal-brand p,
.portal-kicker,
.portal-status,
.portal-project-meta,
.portal-section-heading span,
.portal-source-grid span,
.portal-detail-list dt,
.portal-page-heading p,
.portal-hero-panel p,
.portal-card p {
  color: #50555a;
}

.portal-button,
.portal-back,
.portal-project-name {
  border: 1px solid #cfd3d7;
  background: #ffffff;
  color: #111315;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.portal-button {
  min-height: 30px;
  padding: 7px 11px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.portal-button.primary {
  background: #111315;
  border-color: #111315;
  color: #ffffff;
}

.portal-button.secondary {
  background: #ffffff;
}

.portal-button:hover,
.portal-back:hover,
.portal-project-name:hover {
  border-color: #111315;
}

.portal-button:disabled,
.portal-button:disabled:hover {
  background: #e3e5e7;
  border-color: #d2d6da;
  color: #6b7177;
  cursor: not-allowed;
}

.portal-view {
  display: grid;
  gap: 14px;
}

.portal-view.hidden,
.portal-install-note.hidden {
  display: none;
}

.portal-hero-panel {
  min-height: 150px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: 1px solid #d9dcdf;
  background: #ffffff;
  padding: clamp(20px, 3vw, 30px);
}

.portal-kicker {
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.portal-hero-panel h2 {
  max-width: 760px;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 650;
}

.portal-page-heading h2 {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0;
  font-weight: 650;
}

.portal-hero-panel p,
.portal-page-heading p {
  max-width: 690px;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.45;
}

.portal-section,
.portal-card,
.portal-form {
  border: 1px solid #d9dcdf;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 11px;
}

.portal-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e5e7e9;
  padding-bottom: 12px;
}

.portal-section-heading h3,
.portal-card h3 {
  font-size: 14px;
  line-height: 1.2;
}

.portal-project-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.portal-table-wrap {
  width: 100%;
  overflow: visible;
}

.portal-project-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.portal-project-table th,
.portal-project-table td {
  border-bottom: 1px solid #e4e6e8;
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
  color: #121416;
}

.portal-project-table th {
  color: #3f454a;
  font-weight: 650;
  background: #f6f7f8;
}

.portal-project-table th:nth-child(1),
.portal-project-table td:nth-child(1) {
  width: 23%;
}

.portal-project-table th:nth-child(2),
.portal-project-table td:nth-child(2) {
  width: 20%;
}

.portal-project-table th:nth-child(3),
.portal-project-table td:nth-child(3),
.portal-project-table th:nth-child(4),
.portal-project-table td:nth-child(4),
.portal-project-table th:nth-child(5),
.portal-project-table td:nth-child(5) {
  width: 13%;
}

.portal-project-table th:nth-child(6),
.portal-project-table td:nth-child(6) {
  width: 10%;
}

.portal-project-table th:nth-child(7),
.portal-project-table td:nth-child(7) {
  width: 56px;
}

.portal-project-link {
  color: #111315;
  text-decoration: none;
  font-weight: 650;
}

.portal-project-link:hover {
  text-decoration: underline;
}

.portal-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #d7dadd;
  background: #ffffff;
  color: #252a2e;
}

.portal-table-actions {
  position: relative;
  text-align: right;
}

.portal-kebab {
  width: 28px;
  height: 24px;
  border: 1px solid #d5d8db;
  background: #ffffff;
  color: #111315;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.portal-kebab:hover {
  border-color: #111315;
}

.portal-action-menu {
  position: absolute;
  top: calc(100% - 3px);
  right: 8px;
  z-index: 20;
  width: 132px;
  border: 1px solid #d7dadd;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 19, 21, 0.14);
  padding: 4px;
  display: grid;
}

.portal-action-menu.hidden {
  display: none;
}

.portal-action-menu button {
  border: 0;
  background: transparent;
  color: #111315;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.portal-action-menu button:hover {
  background: #f0f1f2;
}

.portal-project-card {
  border: 1px solid #e0e2e4;
  background: #fbfbfc;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.portal-project-name {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
  text-align: left;
}

.portal-project-name:hover {
  text-decoration: underline;
}

.portal-project-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.portal-project-meta span {
  border: 1px solid #e0e2e4;
  background: #ffffff;
  padding: 4px 7px;
}

.portal-empty {
  color: #5d6369;
  margin: 0;
}

.portal-page-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 18px;
}

.portal-back {
  min-width: 74px;
  padding: 7px 10px;
}

.portal-register-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
}

.portal-register-heading h2 {
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 650;
}

.portal-register-heading p {
  max-width: 560px;
  margin-top: 4px;
  color: #50555a;
  font-size: 10px;
  line-height: 1.4;
}

.portal-register-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.portal-register-form {
  max-width: none;
  gap: 10px;
}

.portal-form-section {
  border: 1px solid #e1e4e7;
  background: #ffffff;
  padding: 11px;
  display: grid;
  gap: 9px;
}

.portal-form-section h3,
.portal-side-panel h3,
.portal-confirmation-panel h3,
.portal-delivery-panel h3 {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
}

.portal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.portal-field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.required-star {
  color: #b00020;
  font-weight: 700;
}

.portal-register-side {
  display: grid;
  gap: 10px;
}

.portal-side-panel,
.portal-confirmation-panel,
.portal-delivery-panel {
  border: 1px solid #d9dcdf;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.portal-side-panel p,
.portal-confirmation-panel p,
.portal-delivery-panel p {
  color: #50555a;
  line-height: 1.45;
}

.portal-confirmation-panel {
  border-color: #b7c7b8;
  background: #fbfdfb;
}

.portal-confirmation-panel dl {
  margin: 0;
  display: grid;
  gap: 6px;
}

.portal-confirmation-panel dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  border-top: 1px solid #e2e5e7;
  padding-top: 6px;
}

.portal-confirmation-panel dt {
  color: #50555a;
}

.portal-confirmation-panel dd {
  margin: 0;
  word-break: break-word;
}

.portal-delivery-panel {
  background: #ffffff;
}

.portal-progress-line {
  height: 7px;
  width: 100%;
  background: #e5e7e9;
  overflow: hidden;
}

.portal-progress-line span {
  display: block;
  height: 100%;
  background: #111315;
  transition: width 180ms ease;
}

.portal-delivery-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #50555a;
}

.portal-form {
  max-width: 760px;
}

.portal-form label {
  display: grid;
  gap: 5px;
  color: #3f454a;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  border: 1px solid #cfd3d7;
  background: #ffffff;
  color: #111315;
  padding: 8px 9px;
  font: inherit;
}

.portal-form textarea {
  resize: vertical;
}

.portal-form-actions,
.portal-action-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.portal-detail-list {
  margin: 0;
  display: grid;
  gap: 9px;
}

.portal-detail-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}

.portal-detail-list dd {
  margin: 0;
  word-break: break-word;
}

.portal-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portal-source-grid article {
  border: 1px solid #e0e2e4;
  background: #fbfbfc;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.portal-source-grid strong {
  font-size: 15px;
}

.portal-install-note {
  border: 1px solid #d8c486;
  background: #fffaf0;
  color: #5c4300;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.portal-install-note p {
  margin: 0;
  color: #5c4300;
}

.portal-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #cfd3d7;
  background: #ffffff;
  color: #111315;
  padding: 0;
}

.portal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.portal-dialog form {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.portal-dialog h3 {
  font-size: 19px;
  line-height: 1.2;
}

.portal-dialog p {
  color: #50555a;
  line-height: 1.5;
}

.portal-role-list {
  display: grid;
  gap: 8px;
}

.portal-role-list article {
  border: 1px solid #e0e2e4;
  background: #fbfbfc;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.portal-footer-status {
  color: #5d6369;
  font-size: 13px;
  min-height: 18px;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-grid,
  .two-column,
  .workspace-flow,
  .source-grid,
  .project-workspace-header,
  .portal-detail-grid,
  .portal-source-grid,
  .portal-register-layout,
  .portal-field-grid,
  .portal-field-grid.three,
  .portal-page-heading,
  .portal-register-heading,
  .hero,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-header,
  .portal-hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-shell {
    width: min(100% - 24px, 1180px);
  }
}
