:root {
  --canvas: #f6f1e7;
  --ink: #18261e;
  --muted: #5d675f;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-strong: rgba(255, 252, 246, 0.96);
  --line: rgba(24, 38, 30, 0.1);
  --shadow: 0 30px 70px rgba(16, 27, 21, 0.14);
  --brand: #174b33;
  --brand-2: #c95c2f;
  --brand-3: #dcb95b;
  --good: #1f7a46;
  --warn: #aa6a18;
  --bad: #b13a2b;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --sans: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  --serif: "Iowan Old Style", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.backdrop {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

.backdrop-a {
  width: 30rem;
  height: 30rem;
  top: -8rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(201, 92, 47, 0.28), rgba(201, 92, 47, 0));
}

.backdrop-b {
  width: 34rem;
  height: 34rem;
  bottom: -10rem;
  left: -10rem;
  background: radial-gradient(circle, rgba(23, 75, 51, 0.2), rgba(23, 75, 51, 0));
}

.auth-layout,
.portal-shell {
  position: relative;
  z-index: 1;
}

.auth-layout {
  padding-top: 5.4rem;
}

.landing-screen .auth-layout {
  padding-top: 0;
}

.public-brand {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 26;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.7rem 1rem 0.7rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.public-brand-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.public-brand-copy strong,
.public-brand-copy small {
  overflow-wrap: anywhere;
}

.public-brand-copy strong {
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-brand-copy small {
  color: var(--muted);
}

.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem;
}

.auth-copy h1,
.hero h1,
.portal-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.lede {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.feature-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.feature-ribbon span,
.pill,
.eyebrow,
.brand-logo-frame {
  border-radius: 999px;
}

.feature-ribbon span {
  padding: 0.6rem 0.9rem;
  background: rgba(255, 252, 246, 0.6);
  border: 1px solid rgba(24, 38, 30, 0.08);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 0.8rem;
  padding: 0.32rem 0.72rem;
  background: rgba(23, 75, 51, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card,
.data-panel,
.metric-card,
.sidebar,
.portal-header,
.final-pack-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.auth-card.wide {
  max-width: 42rem;
}

.auth-card h2 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
}

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

.stack-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.stack-form label {
  display: grid;
  gap: 0.45rem;
}

.stack-form span {
  font-size: 0.9rem;
  color: var(--muted);
}

.stack-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.workspace-form input:focus,
.workspace-form select:focus,
.workspace-form textarea:focus {
  outline: 2px solid rgba(23, 75, 51, 0.24);
  border-color: rgba(23, 75, 51, 0.24);
}

.stack-form select,
.stack-form textarea,
.workspace-form input,
.workspace-form select,
.workspace-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.stack-form input[type="file"],
.workspace-form input[type="file"] {
  padding: 0.7rem 0.8rem;
}

.stack-form input[type="file"]::file-selector-button,
.workspace-form input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 75, 51, 0.12);
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand), #2a7d56);
  color: #fffdf8;
  box-shadow: 0 18px 36px rgba(23, 75, 51, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.auth-links,
.sidebar-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-links a,
.ghost-link {
  color: var(--brand);
  font-weight: 600;
}

.shell-menu-button,
.shell-scrim,
.sidebar-close {
  display: none;
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.5rem;
  min-height: 100vh;
  padding: 1.4rem;
}

.sidebar {
  border-radius: calc(var(--radius-lg) + 8px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}

.brand-panel {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 0;
}

.brand-panel > div,
.nav-link > div,
.panel-header > div,
.portal-header > div {
  min-width: 0;
}

.brand-panel h1 {
  margin: 0;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.brand-logo-frame {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(24, 38, 30, 0.08);
  box-shadow: 0 18px 40px rgba(16, 27, 21, 0.12);
}

.brand-logo {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo-frame-public {
  width: 3.2rem;
  height: 3.2rem;
}

.brand-logo-public {
  max-height: 2rem;
}

.brand-logo-frame-sidebar {
  width: 4.8rem;
  min-height: 4rem;
  padding: 0.7rem 1rem;
  border-radius: 1.35rem;
}

.brand-logo-sidebar {
  max-height: 2.4rem;
}

.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-logo-frame.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  border: 0;
  color: white;
  box-shadow: 0 18px 40px rgba(16, 27, 21, 0.16);
}

.user-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(24, 38, 30, 0.08);
  min-width: 0;
}

.user-card strong {
  font-size: 1.06rem;
  overflow-wrap: anywhere;
}

.user-card span,
.user-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.nav-stack {
  display: grid;
  gap: 0.55rem;
}

.nav-link {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  min-width: 0;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(23, 75, 51, 0.08);
  color: var(--ink);
  transform: translateX(2px);
}

.nav-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: rgba(201, 92, 47, 0.12);
  color: var(--brand-2);
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-link small {
  display: block;
  margin-top: 0.16rem;
  opacity: 0.78;
  overflow-wrap: anywhere;
}

.content {
  display: grid;
  gap: 1.25rem;
  padding: 0.7rem 0;
  min-width: 0;
}

.hero {
  padding: 2rem 2.1rem 0.4rem;
  min-width: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  padding: 0 2rem;
}

.metric-card {
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  min-width: 0;
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 0.55rem 0 0.35rem;
  font-size: 2rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.tone-good strong { color: var(--good); }
.tone-warn strong { color: var(--warn); }
.tone-bad strong { color: var(--bad); }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
  padding: 0 2rem 2rem;
}

.panel-grid.single {
  grid-template-columns: 1fr;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 1rem;
  padding: 0 2rem 2rem;
  align-items: start;
}

.workspace-stack {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.data-panel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
}

.form-panel,
.detail-panel {
  overflow: visible;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem 0.7rem;
  min-width: 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.panel-header h3,
.panel-header span {
  overflow-wrap: anywhere;
}

.panel-header-tight {
  padding-top: 0;
}

.panel-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.panel-actions {
  padding: 0 1.35rem 1.35rem;
}

.workspace-form {
  display: grid;
  gap: 1rem;
  padding: 0 1.35rem 1.35rem;
}

.compact-form {
  padding-top: 0.2rem;
}

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

.form-grid label,
.item-row label,
.action-form label {
  display: grid;
  gap: 0.45rem;
}

.form-grid span,
.item-row span,
.action-form span,
.detail-grid small {
  color: var(--muted);
  font-size: 0.84rem;
}

.field-span-2 {
  grid-column: span 2;
}

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

.detail-grid strong {
  display: block;
  margin-top: 0.28rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.inner-divider {
  height: 1px;
  margin: 0 1.35rem 1.15rem;
  background: var(--line);
}

.toggle-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.button-row form {
  margin: 0;
}

.toggle-row label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.danger-button {
  color: var(--bad);
  border-color: rgba(177, 58, 43, 0.2);
  background: rgba(177, 58, 43, 0.08);
}

.table-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18rem;
  color: var(--brand);
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-link small {
  color: var(--muted);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.row-selected {
  background: rgba(23, 75, 51, 0.05);
}

.item-builder {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(23, 75, 51, 0.04);
  border: 1px solid rgba(23, 75, 51, 0.08);
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 0.7fr);
  gap: 0.8rem;
}

.action-stack {
  display: grid;
  gap: 0.85rem;
  padding: 0 1.35rem 1.35rem;
}

.action-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 38, 30, 0.08);
  background: rgba(255, 255, 255, 0.58);
  min-width: 0;
}

.action-form p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.field-grow {
  min-width: 0;
}

.table-shell {
  overflow-x: auto;
  padding: 0 0 0.8rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 38, 30, 0.22) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
}

table.compact {
  min-width: 38rem;
}

th,
td {
  padding: 0.9rem 1.35rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
  overflow-wrap: break-word;
  word-break: normal;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.83rem;
  font-weight: 700;
  background: rgba(24, 38, 30, 0.06);
  white-space: nowrap;
  overflow-wrap: normal;
}

.pill.tone-good {
  color: var(--good);
  background: rgba(31, 122, 70, 0.1);
}

.pill.tone-warn {
  color: var(--warn);
  background: rgba(170, 106, 24, 0.1);
}

.pill.tone-bad {
  color: var(--bad);
  background: rgba(177, 58, 43, 0.1);
}

.notice {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice-good {
  background: rgba(31, 122, 70, 0.11);
  color: var(--good);
}

.notice-bad {
  background: rgba(177, 58, 43, 0.1);
  color: var(--bad);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
}

.portal-shell {
  padding: 2rem;
}

.portal-shell-client,
.portal-shell-validation {
  display: grid;
  gap: 1.15rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.timeline-list {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.35rem 1.35rem;
}

.timeline-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.timeline-item strong,
.timeline-item span,
.timeline-item p {
  display: block;
  margin: 0;
}

.timeline-item span,
.timeline-item p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.final-pack-card {
  margin: 0 1.35rem 1.35rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
}

.portal-layout,
.validation-layout {
  display: grid;
  gap: 1rem;
}

.portal-layout {
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.45fr);
  align-items: start;
}

.portal-rail,
.portal-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.portal-main {
  align-content: start;
}

.portal-rail .timeline-list {
  max-height: 54rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.portal-card-list {
  display: grid;
  gap: 0.95rem;
  padding: 0 1.35rem 1.35rem;
}

.portal-card-list-compact {
  gap: 0.75rem;
}

.portal-entry-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.portal-entry-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.portal-entry-head strong,
.portal-entry-card strong {
  display: block;
  margin: 0;
  font-size: 1.05rem;
}

.portal-entry-head p,
.portal-entry-card p {
  margin: 0.22rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-kv-grid,
.portal-kv-stack {
  margin: 0;
}

.portal-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1rem;
}

.portal-kv-stack {
  display: grid;
  gap: 0;
}

.portal-kv-grid div,
.portal-kv-stack div {
  min-width: 0;
}

.portal-kv-grid dt,
.portal-kv-stack dt {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-kv-grid dd,
.portal-kv-stack dd {
  margin: 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.portal-kv-stack div + div {
  border-top: 1px solid var(--line);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.validation-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: start;
}

.portal-shell-validation .portal-header h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
}

.portal-shell-validation .notice {
  margin-top: 0;
}

.portal-shell-validation .metric-card strong {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.portal-shell-validation .lede,
.portal-shell-client .lede {
  max-width: 60rem;
}

.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(220, 185, 91, 0.34), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(201, 92, 47, 0.3), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.96), rgba(247, 239, 225, 0.92));
}

.landing-grain {
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.75;
}

.landing-grain-a {
  width: 28rem;
  height: 28rem;
  top: -5rem;
  right: -4rem;
  background: radial-gradient(circle, rgba(220, 185, 91, 0.34), rgba(220, 185, 91, 0));
}

.landing-grain-b {
  width: 34rem;
  height: 34rem;
  bottom: -10rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(23, 75, 51, 0.22), rgba(23, 75, 51, 0));
}

.landing-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: clamp(1.4rem, 3vw, 2.3rem);
}

.landing-copy {
  display: grid;
  gap: 1.2rem;
  max-width: 34rem;
  padding: clamp(1.5rem, 2vw, 2rem);
  border-radius: 2.2rem;
  background: rgba(255, 252, 246, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 60px rgba(16, 27, 21, 0.14);
}

.landing-brand {
  display: inline-flex;
}

.brand-logo-frame-hero {
  min-width: 12rem;
  min-height: 4.8rem;
  padding: 1rem 1.4rem;
  border-radius: 1.8rem;
}

.brand-logo-hero {
  max-height: 3.2rem;
}

.brand-logo-frame-hero.brand-mark {
  width: 5rem;
  min-width: 5rem;
  height: 5rem;
  min-height: 5rem;
  border-radius: 1.6rem;
}

.landing-display {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 11vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
}

.landing-lede {
  margin: 0;
  max-width: 30rem;
  color: rgba(24, 38, 30, 0.74);
  font-size: 1.02rem;
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.landing-access {
  min-width: 11rem;
  padding-inline: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 50% 35%, rgba(220, 185, 91, 0.22), transparent 26%),
    radial-gradient(circle at 50% 60%, rgba(23, 75, 51, 0.18), transparent 34%),
    rgba(246, 241, 231, 0.98);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash-active .landing-splash {
  opacity: 1;
  visibility: visible;
}

.landing-splash-core {
  display: grid;
  gap: 1.15rem;
  justify-items: center;
  text-align: center;
}

.landing-splash-ring {
  width: min(20rem, 68vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.48) 48%, rgba(255, 255, 255, 0) 72%);
  box-shadow: 0 28px 70px rgba(16, 27, 21, 0.18);
  animation: splashPulse 1.8s ease-in-out infinite;
}

.brand-logo-frame-splash {
  min-width: 8rem;
  min-height: 8rem;
  padding: 1.2rem 1.4rem;
  border-radius: 2rem;
  background: rgba(255, 252, 246, 0.9);
}

.brand-logo-splash {
  max-height: 4rem;
}

.brand-logo-frame-splash.brand-mark {
  width: 8rem;
  height: 8rem;
  padding: 0;
  border-radius: 2rem;
  font-size: 2rem;
}

.landing-splash-copy {
  display: grid;
  gap: 0.35rem;
}

.landing-splash-copy strong {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 7vw, 4rem);
  letter-spacing: -0.05em;
}

.splash-active .landing-hero {
  filter: blur(12px);
  transform: scale(1.02);
  transition: filter 0.7s ease, transform 0.7s ease;
}

body:not(.splash-active) .landing-hero {
  filter: none;
  transform: none;
  transition: filter 0.7s ease, transform 0.7s ease;
}

@keyframes splashPulse {
  0%,
  100% {
    transform: scale(0.98);
    box-shadow: 0 28px 70px rgba(16, 27, 21, 0.18);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 34px 84px rgba(16, 27, 21, 0.24);
  }
}

.compact th,
.compact td {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.timestamp {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.approval-table {
  min-width: 56rem;
}

.approval-table th:nth-child(1),
.approval-table td:nth-child(1) {
  min-width: 11rem;
}

.approval-table th:nth-child(2),
.approval-table td:nth-child(2) {
  min-width: 10rem;
}

.approval-table th:nth-child(6),
.approval-table td:nth-child(6) {
  min-width: 10.5rem;
}

.approval-type-link {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1100px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: 1fr;
    padding-top: 5.4rem;
  }

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

  .shell-menu-button {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 34;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    color: var(--ink);
    cursor: pointer;
  }

  .shell-menu-icon {
    width: 1.1rem;
    height: 0.78rem;
    display: inline-block;
    position: relative;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .shell-menu-icon::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 2px solid currentColor;
    transform: translateY(-50%);
  }

  .shell-scrim {
    position: fixed;
    inset: 0;
    z-index: 29;
    border: 0;
    background: rgba(24, 38, 30, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar {
    position: fixed;
    top: 0.9rem;
    bottom: 0.9rem;
    left: 0.9rem;
    z-index: 32;
    width: min(24rem, calc(100vw - 1.8rem));
    max-width: 24rem;
    overflow-y: auto;
    transform: translateX(calc(-100% - 1.5rem));
    transition: transform 0.24s ease;
  }

  .sidebar-close {
    display: inline-flex;
    align-self: flex-end;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--muted);
    cursor: pointer;
  }

  body.sidebar-open .shell-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .landing-stage,
  .landing-hero {
    min-height: auto;
  }

  .landing-stage {
    align-items: center;
    padding-block: 7rem 2rem;
  }
}

@media (max-width: 720px) {
  .auth-layout {
    padding-top: 4.9rem;
  }

  .auth-stage,
  .portal-shell,
  .shell,
  .hero,
  .card-grid,
  .panel-grid,
  .workspace-grid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .public-brand {
    top: 0.75rem;
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
    padding-right: 0.85rem;
  }

  .auth-stage {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .auth-copy h1,
  .hero h1,
  .portal-header h1 {
    font-size: 2.3rem;
  }

  th,
  td {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  table,
  table.compact {
    min-width: 34rem;
  }

  .approval-table {
    min-width: 48rem;
  }

  .portal-shell-client,
  .portal-shell-validation {
    gap: 1rem;
  }

  .portal-layout,
  .validation-layout {
    grid-template-columns: 1fr;
  }

  .portal-rail .timeline-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .portal-entry-head {
    flex-direction: column;
    align-items: start;
  }

  .landing-stage {
    padding: 7rem 1rem 1.25rem;
  }

  .landing-copy {
    padding: 1.25rem;
    border-radius: 1.6rem;
  }

  .brand-logo-frame-hero {
    min-width: 9.5rem;
    min-height: 4.2rem;
    padding: 0.9rem 1rem;
  }

  .brand-logo-hero {
    max-height: 2.6rem;
  }

  .landing-access {
    width: 100%;
  }

  .landing-splash-ring {
    width: min(16rem, 78vw);
  }

  .brand-logo-frame-splash {
    min-width: 6.4rem;
    min-height: 6.4rem;
  }

  .form-grid,
  .detail-grid,
  .item-row,
  .action-form {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }
}
