:root {
  --ink: #17212c;
  --muted: #596675;
  --line: #d8e0e8;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --brand: #14354a;
  --brand-dark: #0d2637;
  --navy: #10283a;
  --ridge: #315f72;
  --accent: #b99154;
  --accent-soft: #ead9bd;
  --danger: #b42318;
  --shadow: 0 18px 42px rgba(23, 33, 44, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 144px;
}

section {
  scroll-margin-top: 144px;
}

body {
  position: relative;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(16, 40, 58, 0.08), transparent 36%),
    linear-gradient(225deg, rgba(185, 145, 84, 0.1), transparent 32%),
    var(--soft);
  color: var(--ink);
}

.ambient-canvas {
  position: fixed;
  inset: 123px 0 0;
  z-index: 0;
  width: 100%;
  height: calc(100vh - 123px);
  pointer-events: none;
}

.ambient-motion {
  position: fixed;
  inset: 123px 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.5;
}

.ambient-block {
  position: absolute;
  width: 18vw;
  min-width: 150px;
  height: 46vh;
  border-left: 1px solid rgba(18, 63, 99, 0.14);
  border-right: 1px solid rgba(18, 63, 99, 0.1);
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.06) 1px, transparent 1px),
    rgba(255, 255, 255, 0.22);
  background-size: 34px 34px;
  transform: skewX(-8deg);
  animation: ambientPanel 16s ease-in-out infinite alternate;
}

.block-a {
  right: 4%;
  top: 4%;
}

.block-b {
  right: 24%;
  top: 25%;
  opacity: 0.75;
  animation-delay: -6s;
}

.block-c {
  left: 3%;
  top: 15%;
  opacity: 0.55;
  animation-delay: -10s;
}

.ambient-line {
  position: absolute;
  height: 5px;
  border-radius: 999px;
  transform-origin: right center;
  animation: ambientSweep 8s ease-in-out infinite;
}

.ambient-line-a {
  right: 8%;
  top: 18%;
  width: 35vw;
  background: rgba(217, 164, 65, 0.58);
}

.ambient-line-b {
  left: 8%;
  bottom: 18%;
  width: 28vw;
  background: rgba(10, 75, 77, 0.22);
  animation-delay: -3.5s;
}

.ambient-ridge {
  position: absolute;
  right: 7%;
  bottom: 9%;
  width: min(560px, 58vw);
  height: 150px;
  opacity: 0.16;
  animation: ambientRidge 12s ease-in-out infinite;
}

.ambient-ridge::before,
.ambient-ridge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 11px solid var(--accent);
  clip-path: polygon(0 66%, 14% 24%, 28% 58%, 43% 18%, 59% 76%, 75% 32%, 100% 62%, 100% 100%, 0 100%);
}

.ambient-ridge::after {
  top: 34px;
  border-top-color: var(--brand);
  transform: translateX(18px);
  opacity: 0.72;
}

@keyframes ambientPanel {
  from {
    transform: translateX(-16px) skewX(-8deg);
  }

  to {
    transform: translateX(24px) skewX(-8deg);
  }
}

@keyframes ambientSweep {
  0%,
  100% {
    transform: scaleX(0.45);
    opacity: 0.18;
  }

  50% {
    transform: scaleX(1);
    opacity: 0.62;
  }
}

@keyframes ambientRidge {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-24px, -12px, 0);
  }
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px 18px;
  padding: 15px max(24px, calc((100vw - 1180px) / 2));
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid rgba(185, 145, 84, 0.48);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 20px;
  padding: 15px max(24px, calc((100vw - 1180px) / 2));
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid rgba(185, 145, 84, 0.48);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: 6px;
  color: var(--ink);
  font-weight: 780;
  justify-self: end;
}

nav a {
  position: relative;
  min-height: 44px;
  padding: 12px 12px;
  border-left: 0;
  color: #243241;
}

nav a:hover {
  background: transparent;
  color: var(--brand);
}

nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.6);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.language-control {
  display: grid;
  grid-template-columns: auto minmax(260px, 360px);
  align-items: center;
  justify-content: center;
  gap: 14px;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(680px, 100%);
  min-width: 280px;
  padding: 11px 16px;
  border: 1px solid rgba(185, 145, 84, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(185, 145, 84, 0.12), rgba(20, 53, 74, 0.04)),
    #fff;
  box-shadow: 0 10px 24px rgba(23, 33, 44, 0.08);
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-control span {
  text-align: center;
  white-space: nowrap;
}

.language-control select {
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border: 1px solid rgba(20, 53, 74, 0.18);
  border-radius: 6px;
  background-color: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-align-last: center;
  text-transform: none;
}

.compact-language-control {
  max-width: 620px;
}

nav a,
.header-button,
.primary-link,
.secondary-link {
  text-decoration: none;
}

.header-button,
.primary-link,
button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

body.rtl {
  direction: rtl;
}

body.rtl .brand,
body.rtl .hero-actions,
body.rtl .consent,
body.rtl .site-header,
body.rtl .portal-header {
  direction: rtl;
}

body.rtl input,
body.rtl textarea,
body.rtl select {
  direction: rtl;
}

body.rtl .portal-main,
body.rtl .portal-shell,
body.rtl .admin-shell,
body.rtl .legal-shell {
  direction: ltr;
  text-align: left;
}

body.rtl .hero-copy::before {
  left: auto;
  right: 0;
}

body.rtl .state-picker {
  border-left: 0;
  border-right: 5px solid var(--accent);
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 44px;
  min-width: 164px;
  padding: 0 18px;
  text-align: center;
  line-height: 1.1;
}

main,
footer {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 380px;
  gap: 0;
  align-items: stretch;
  padding: 36px 0 0;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 520px;
  padding: 64px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(185, 145, 84, 0.18), transparent 24%),
    linear-gradient(135deg, var(--navy), #071927 72%);
  box-shadow: var(--shadow);
  color: #fff;
  text-align: center;
}

.hero-copy > *:not(.motion-graphic) {
  position: relative;
  z-index: 2;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(var(--navy), var(--ridge), var(--brand));
}

.hero-copy h1,
.hero-copy .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 42px;
  top: 48px;
  width: 210px;
  height: 108px;
  border-top: 8px solid var(--accent);
  border-bottom: 3px solid rgba(255, 255, 255, 0.24);
  opacity: 0.9;
}

.motion-graphic {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.motion-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  opacity: 0.28;
  transform: skewX(-8deg);
  animation: panelDrift 12s ease-in-out infinite alternate;
}

.panel-one {
  right: 8%;
  background: rgba(26, 99, 134, 0.42);
}

.panel-two {
  right: 22%;
  background: rgba(10, 75, 77, 0.5);
  animation-delay: -4s;
}

.panel-three {
  right: 36%;
  background: rgba(18, 63, 99, 0.44);
  animation-delay: -7s;
}

.motion-line {
  position: absolute;
  right: 7%;
  height: 4px;
  border-radius: 999px;
  transform-origin: right center;
  animation: lineSweep 5.5s ease-in-out infinite;
}

.line-one {
  top: 28%;
  width: 38%;
  background: var(--accent);
}

.line-two {
  top: 46%;
  width: 29%;
  background: rgba(244, 248, 251, 0.54);
  animation-delay: -1.8s;
}

.line-three {
  top: 67%;
  width: 22%;
  background: rgba(143, 184, 193, 0.75);
  animation-delay: -3.2s;
}

.motion-ridge {
  position: absolute;
  right: 5%;
  bottom: 18%;
  width: 48%;
  height: 120px;
  opacity: 0.42;
}

.motion-ridge::before,
.motion-ridge::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 42px;
  border-top: 7px solid var(--accent);
  border-right: 7px solid transparent;
  clip-path: polygon(0 72%, 18% 28%, 34% 64%, 48% 18%, 64% 76%, 82% 34%, 100% 60%, 100% 100%, 0 100%);
  animation: ridgePulse 6.5s ease-in-out infinite;
}

.motion-ridge::after {
  top: 32px;
  border-top-color: rgba(244, 248, 251, 0.78);
  transform: translateX(10px);
  animation-delay: -2.2s;
}

@keyframes panelDrift {
  from {
    transform: translateX(-12px) skewX(-8deg);
  }

  to {
    transform: translateX(18px) skewX(-8deg);
  }
}

@keyframes lineSweep {
  0%,
  100% {
    transform: scaleX(0.55);
    opacity: 0.35;
  }

  48% {
    transform: scaleX(1);
    opacity: 0.9;
  }
}

@keyframes ridgePulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  50% {
    transform: translateY(-8px);
    opacity: 0.95;
  }
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.08;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.17rem;
  line-height: 1.65;
}

.hero-copy .eyebrow {
  color: #f4d58d;
}

.hero-copy .lead {
  color: rgba(255, 255, 255, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  width: 100%;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 190px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
}

.secondary-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.hero-copy .secondary-link {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-panel {
  display: grid;
  gap: 0;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-panel div {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    #fff;
  background-size: 28px 28px;
}

.hero-panel div:last-child {
  border-bottom: 0;
}

.hero-panel span,
.process span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.24);
  color: #76520d;
  font-weight: 900;
}

.hero-panel p,
.service-grid p,
.upload-intro p,
.upload-intro li,
.process p,
.contact p,
footer p {
  color: var(--muted);
  line-height: 1.55;
}

.section,
.coverage,
.upload-section,
.resources,
.contact {
  margin-top: 28px;
  padding: 44px;
  border: 1px solid rgba(220, 228, 236, 0.95);
  border-top: 4px solid var(--brand);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px;
  border: 1px solid rgba(216, 224, 232, 0.95);
  border-top: 4px solid var(--brand);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.feature-band a {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  align-content: space-between;
  min-height: 138px;
  padding: 26px 28px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.feature-band a:last-child {
  border-right: 0;
}

.feature-band a:hover {
  background: rgba(20, 53, 74, 0.045);
  color: var(--brand);
}

.feature-band span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(217, 164, 65, 0.24);
  color: #76520d;
  font-weight: 900;
}

.feature-band strong {
  align-self: end;
  font-size: 1.22rem;
  line-height: 1.15;
}

.feature-band a::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(217, 164, 65, 0.22);
  border-radius: 8px;
}

.trust-panel,
.portal-feature {
  display: grid;
  gap: 28px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.trust-panel {
  grid-template-columns: 0.72fr 1.28fr;
  padding: 36px;
}

.trust-panel h2,
.portal-feature h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.trust-grid article {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.trust-grid article::before {
  content: "";
  display: block;
  width: 54px;
  height: 7px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--navy), var(--ridge), var(--brand));
}

.trust-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(217, 164, 65, 0.28);
  border-radius: 8px;
}

.trust-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-weight: 900;
}

.trust-grid p,
.portal-feature p,
.auth-footnote {
  color: var(--muted);
  line-height: 1.55;
}

.portal-feature {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  padding: 42px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.96);
  background-size: 34px 34px;
}

.portal-device {
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 22px;
  border: 9px solid #102b3f;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #f9fbfd, #eef5f7);
  box-shadow: 0 24px 48px rgba(22, 34, 51, 0.22);
}

.portal-device-top {
  justify-self: center;
  width: 82px;
  height: 8px;
  border-radius: 999px;
  background: #102b3f;
}

.portal-device-logo {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
}

.portal-device-logo img {
  width: 54px;
  height: 54px;
}

.portal-device span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-device strong {
  max-width: 220px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.portal-device small {
  align-self: end;
  color: var(--muted);
  font-weight: 800;
}

.page-hero {
  margin-top: 36px;
  padding: 56px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, var(--navy), #081c28 70%);
  background-size: 42px 42px, 42px 42px, auto;
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero .eyebrow {
  color: #f4d58d;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero p:not(.eyebrow) {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.12rem;
  line-height: 1.65;
}

.simple-header {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.compact-hero {
  padding: 46px;
}

.compact-hero h1 {
  margin-bottom: 14px;
}

.legal-shell {
  padding-bottom: 20px;
}

.legal-content,
.support-grid article {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.legal-content {
  padding: 36px;
}

.legal-content h2 {
  margin-top: 28px;
  font-size: 1.38rem;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p,
.support-grid p {
  color: var(--muted);
  line-height: 1.62;
}

.legal-content a,
.support-grid a,
footer a {
  color: var(--brand);
  font-weight: 850;
  text-decoration: none;
}

.legal-content a:hover,
.support-grid a:hover,
footer a:hover {
  text-decoration: underline;
}

.policy-date {
  color: var(--brand) !important;
  font-weight: 850;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.support-grid article {
  display: grid;
  gap: 10px;
  min-height: 250px;
  padding: 24px;
}

.support-grid span {
  color: var(--accent);
  font-weight: 900;
}

.support-grid h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.support-grid a {
  align-self: end;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.admin-hero {
  margin-top: 28px;
}

.admin-panel,
.admin-layout {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.admin-panel {
  display: grid;
  grid-template-columns: 1.15fr minmax(240px, 0.75fr) auto minmax(180px, 0.55fr);
  gap: 16px;
  align-items: end;
}

.admin-panel p {
  margin: 0;
}

.admin-access-panel h2 {
  margin: 6px 0;
  font-size: 1.35rem;
}

.admin-access-panel p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 600;
}

.admin-access-panel label {
  display: grid;
  gap: 8px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-actions button:last-child {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.admin-panel #adminMessage {
  color: var(--brand);
  font-weight: 800;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-status-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-status-grid span {
  display: block;
  color: var(--brand);
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  font-weight: 900;
}

.admin-status-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.signature-admin-panel {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.signature-admin-panel h2 {
  margin: 6px 0;
  font-size: 1.35rem;
}

.signature-request-form {
  display: grid;
  gap: 16px;
}

.signature-request-form .wide {
  display: grid;
  gap: 8px;
}

.signature-request-form textarea {
  resize: vertical;
}

.signature-layout {
  margin-top: 28px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.admin-list-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-details {
  min-height: 280px;
  border: 1px solid var(--line);
  padding: 20px;
  background: #fff;
}

.admin-details dl {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 14px;
}

.admin-details dt {
  color: var(--muted);
  font-weight: 800;
}

.admin-details dd {
  margin: 0;
}

.admin-files {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.admin-files li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.admin-files a {
  color: var(--brand);
  font-weight: 850;
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 79px);
  place-items: center;
  padding: 42px 0;
}

.auth-card {
  display: grid;
  width: min(100%, 460px);
  max-width: calc(100vw - 32px);
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(216, 224, 232, 0.95);
  border-top: 5px solid var(--brand);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-card > * {
  min-width: 0;
  max-width: 100%;
}

.auth-logo {
  width: 54px;
  height: 54px;
}

.auth-card h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.auth-copy {
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.portal-assurance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(10, 75, 77, 0.22);
  background: rgba(10, 75, 77, 0.05);
}

.portal-assurance span {
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 850;
}

.portal-assurance span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--accent);
}

.auth-footnote {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.oauth-stack {
  display: grid;
  gap: 10px;
}

.oauth-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.oauth-button:hover {
  background: rgba(18, 63, 99, 0.05);
}

.oauth-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-weight: 900;
}

.oauth-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.apple-icon svg {
  width: 24px;
  height: 24px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  background: #fff;
}

.auth-tabs button {
  min-height: 42px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.auth-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.portal-card {
  display: none;
  gap: 14px;
}

.portal-card.active {
  display: grid;
}

.signature-center {
  display: none;
  gap: 18px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.portal-upload-center {
  display: none;
  gap: 18px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.portal-authenticated .portal-upload-center,
.portal-authenticated .signature-center {
  display: grid;
}

.signature-center-heading h2 {
  margin: 4px 0 6px;
  font-size: 1.15rem;
}

.signature-center-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.signature-list {
  display: grid;
  gap: 10px;
}

.signature-request-card {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  padding: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.signature-request-card span,
.signature-request-card small {
  color: var(--muted);
  font-weight: 700;
}

.signature-status-signed {
  border-left-color: #1b7f4a;
}

.signature-status-pending_signature {
  border-left-color: var(--accent);
}

.signature-form {
  display: none;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(10, 75, 77, 0.2);
  padding: 16px;
  background: rgba(10, 75, 77, 0.04);
}

.signature-form.active {
  display: grid;
}

.signature-summary h3 {
  margin: 0 0 6px;
}

.signature-summary p {
  margin: 4px 0;
  color: var(--muted);
}

.signature-review-note {
  margin: -4px 0 2px;
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  background: rgba(185, 145, 84, 0.1);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.45;
}

.signature-review-note.reviewed {
  border-left-color: #1b7f4a;
  background: rgba(27, 127, 74, 0.1);
}

.signature-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  line-height: 1.45;
}

.signature-consent input {
  width: auto;
  margin-top: 4px;
}

.signature-pad-wrap {
  display: grid;
  gap: 8px;
}

.signature-pad-wrap > span {
  font-weight: 850;
}

#signaturePad {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 180px;
  border: 1px solid var(--line);
  background: #fff;
  touch-action: none;
}

.signature-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.signature-actions button:first-child {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.portal-status {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.portal-status.signed-in {
  padding: 16px;
  border: 1px solid rgba(185, 145, 84, 0.48);
  background: linear-gradient(135deg, rgba(185, 145, 84, 0.12), rgba(20, 53, 74, 0.05));
}

.portal-upload-link {
  justify-self: stretch;
  text-align: center;
}

.portal-upload-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(10, 75, 77, 0.2);
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.96);
  background-size: 28px 28px;
}

.portal-upload-form .drop-zone {
  margin: 6px 0 0;
}

.portal-authenticated .auth-tabs,
.portal-authenticated .oauth-stack,
.portal-authenticated #loginForm,
.portal-authenticated #registerForm,
.portal-authenticated .auth-divider {
  display: none;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  justify-self: start;
}

.reset-form {
  display: none;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.reset-form.active {
  display: grid;
}

.portal-status p {
  color: var(--brand);
  font-weight: 850;
}

.install-app-button {
  border-color: rgba(203, 158, 86, 0.55);
  background: linear-gradient(135deg, var(--brand), #123f63);
  color: #fff;
}

.install-app-button[hidden] {
  display: none;
}

.section-heading {
  max-width: 650px;
  margin-bottom: 24px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.resources {
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.97);
  background-size: 32px 32px;
}

.resource-teaser {
  position: relative;
  overflow: hidden;
}

.resource-teaser::after {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 36px;
  width: 240px;
  height: 96px;
  border-top: 8px solid rgba(217, 164, 65, 0.55);
  border-bottom: 4px solid rgba(10, 75, 77, 0.22);
  transform: skewX(-10deg);
}

.section-heading p {
  color: var(--muted);
  line-height: 1.6;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.resource-grid article {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 260px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px;
  background: #fff;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.resource-grid article::before {
  content: "";
  display: block;
  width: 54px;
  height: 7px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--navy), var(--ridge), var(--brand));
}

.resource-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(217, 164, 65, 0.28);
  border-radius: 8px;
  pointer-events: none;
}

.resource-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(22, 34, 51, 0.1);
}

.resource-grid span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.resource-grid h3 {
  margin: 14px 0 8px;
}

.resource-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.resource-grid a {
  align-self: end;
  color: var(--brand);
  font-weight: 850;
  text-decoration: none;
}

.resource-grid a:hover {
  text-decoration: underline;
}

.resource-feature {
  grid-column: span 2;
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(18, 63, 99, 0.95), rgba(10, 75, 77, 0.94)),
    #082f3a !important;
  color: #fff;
}

.resource-feature::before {
  background: linear-gradient(90deg, #f4d58d, var(--accent), rgba(255, 255, 255, 0.78));
}

.resource-feature::after {
  border-color: rgba(255, 255, 255, 0.22);
}

.resource-feature span,
.resource-feature h3 {
  color: #fff;
}

.resource-feature p,
.resource-feature a {
  color: rgba(255, 255, 255, 0.82);
}

.worksheet-library {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  margin-top: 34px;
  padding-top: 34px;
  border-top: 4px solid var(--accent);
}

.worksheet-library > section {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(220, 228, 236, 0.95);
  background: #fff;
}

.worksheet-library > section::before {
  content: "";
  display: block;
  width: 54px;
  height: 7px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--navy), var(--ridge), var(--brand));
}

.worksheet-library section {
  min-width: 0;
}

.worksheet-library h3 {
  margin-bottom: 18px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.worksheet-list {
  display: grid;
  gap: 12px;
}

.worksheet-list a {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.worksheet-list a::before {
  content: "";
  width: 42px;
  height: 6px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--navy), var(--ridge), var(--brand));
}

.worksheet-list a:hover {
  border-color: rgba(217, 164, 65, 0.7);
  box-shadow: 0 12px 24px rgba(22, 34, 51, 0.08);
  transform: translateY(-2px);
}

.worksheet-list strong {
  color: var(--ink);
}

.worksheet-list span {
  color: var(--muted);
  line-height: 1.45;
}

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

.worksheet-builder {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 28px;
  margin-top: 34px;
  padding: 32px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.04) 1px, transparent 1px),
    #fff;
  background-size: 30px 30px;
  box-shadow: 0 22px 46px rgba(22, 34, 51, 0.1);
}

.worksheet-builder h3 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.worksheet-builder p {
  color: var(--muted);
  line-height: 1.55;
}

.worksheet-form {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.worksheet-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.worksheet-fields label {
  min-width: 0;
}

.worksheet-fields .wide,
.worksheet-fields .worksheet-empty {
  grid-column: 1 / -1;
}

.worksheet-empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--line);
  background: rgba(244, 248, 251, 0.85);
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-top: 4px;
}

.worksheet-actions p {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
}

.service-grid article {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 28px;
  background: #fff;
}

.service-grid article::before {
  content: "";
  display: block;
  width: 54px;
  height: 7px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--navy), var(--ridge), var(--brand));
}

.service-grid article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(217, 164, 65, 0.28);
  border-radius: 8px;
}

.coverage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(18, 63, 99, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 63, 99, 0.06) 1px, transparent 1px),
    rgba(255, 255, 255, 0.95);
  background-size: 32px 32px;
}

.coverage p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.state-picker {
  border-left: 5px solid var(--accent);
  border-radius: 0;
  padding: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(22, 34, 51, 0.08);
}

.service-grid h3,
.process h3 {
  margin-bottom: 8px;
}

.upload-section {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 32px;
  align-items: start;
}

.upload-intro ul {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.upload-intro li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.upload-intro li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 0.72em;
  flex: 0 0 7px;
  background: var(--brand);
}

.upload-form {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 24px;
  background: #fff;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.drop-zone:focus-within {
  border-color: var(--accent);
  outline: 3px solid rgba(217, 164, 65, 0.35);
}

.drop-zone {
  margin: 20px 0 14px;
  min-height: 190px;
  place-items: center;
  border: 2px dashed rgba(17, 100, 102, 0.38);
  border-radius: 0;
  background: rgba(244, 248, 251, 0.86);
  text-align: center;
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: var(--brand);
  background: rgba(17, 100, 102, 0.1);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.drop-title {
  font-size: 1.08rem;
  font-weight: 850;
}

.drop-help {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.file-list {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.wide,
.consent {
  margin-bottom: 18px;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 18px;
}

button {
  padding: 15px 22px;
}

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

.header-button:hover,
.primary-link:hover,
button:hover {
  background: var(--brand-dark);
}

.message {
  margin: 14px 0 0;
  color: var(--danger);
  font-weight: 750;
}

.process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.process article {
  padding: 26px;
  border: 1px solid rgba(220, 228, 236, 0.95);
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: center;
}

.contact-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.contact-card .primary-link {
  margin-top: 8px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 0 44px;
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 920px) {
  .site-header,
  .portal-header {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .language-control {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
  }

  .header-button {
    display: none;
  }

  .hero,
  .upload-section,
  .coverage,
  .contact,
  .admin-layout,
  .admin-panel,
  .admin-status-grid,
  .support-grid,
  .trust-panel,
  .portal-feature {
    grid-template-columns: 1fr;
  }

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

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

  .worksheet-library {
    grid-template-columns: 1fr;
  }

  .worksheet-builder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main,
  footer {
    width: min(100% - 24px, 680px);
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy,
  .section,
  .upload-section,
  .contact,
  .legal-content,
  .compact-hero,
  .trust-panel,
  .portal-feature {
    padding: 24px;
  }

  .service-grid,
  .feature-band,
  .resource-grid,
  .field-grid,
  .process,
  .admin-status-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-panel,
  .admin-layout,
  .admin-status-grid article {
    padding: 20px;
  }

  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-details dl {
    grid-template-columns: 1fr;
  }

  .portal-device {
    min-height: 300px;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .primary-link,
  .hero-actions .secondary-link {
    width: 100%;
    max-width: 320px;
  }

  .resource-feature {
    grid-column: auto;
  }

  .worksheet-list.compact {
    grid-template-columns: 1fr;
  }

  .worksheet-fields {
    grid-template-columns: 1fr;
  }

  .feature-band a {
    min-height: 105px;
  }

  .resource-teaser::after {
    right: -40px;
    bottom: 20px;
    width: 180px;
    opacity: 0.45;
  }

  .worksheet-builder,
  .worksheet-library > section,
  .worksheet-form {
    padding: 20px;
  }

  .motion-panel {
    width: 24%;
  }

  .motion-ridge {
    right: -18%;
    bottom: 10%;
    width: 78%;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-canvas {
    display: none;
  }

  .motion-panel,
  .motion-line,
  .ambient-block,
  .ambient-line,
  .ambient-ridge,
  .motion-ridge::before,
  .motion-ridge::after {
    animation: none;
  }
}

body[data-page="portal"] .portal-header {
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px 32px;
}

body[data-page="portal"] .portal-header .language-control {
  grid-column: 1 / -1;
}

body[data-page="portal"] .portal-header nav {
  justify-self: center;
}

body[data-page="portal"] .portal-header .header-button {
  display: none;
}

body[data-page="portal"] .auth-shell {
  align-items: start;
  padding: 40px 20px 56px;
}

body[data-page="portal"] .auth-card {
  width: min(100%, 500px);
  gap: 16px;
  border-top-width: 6px;
}

body[data-page="portal"].portal-authenticated .auth-card {
  width: min(100%, 880px);
}

body[data-page="portal"] .auth-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.08;
}

body[data-page="portal"] .portal-assurance {
  gap: 0;
  padding: 0;
  border-color: rgba(185, 145, 84, 0.35);
  background: #f8faf9;
}

body[data-page="portal"] .portal-assurance span {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(216, 224, 232, 0.85);
}

body[data-page="portal"] .portal-assurance span:last-child {
  border-bottom: 0;
}

body[data-page="portal"] .oauth-button {
  min-height: 52px;
  border-color: rgba(20, 53, 74, 0.18);
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none !important;
}

body[data-page="portal"] .oauth-button:hover {
  border-color: rgba(185, 145, 84, 0.72);
  background: rgba(185, 145, 84, 0.08);
}

body[data-page="portal"] .oauth-button *,
body[data-page="portal"] .primary-link {
  text-decoration: none !important;
}

body[data-page="portal"]:not(.portal-authenticated) .portal-upload-link,
body[data-page="portal"]:not(.portal-authenticated) #logoutButton {
  display: none;
}

body[data-page="portal"] .portal-status {
  margin-top: 2px;
  color: var(--muted);
}

body[data-page="portal"] .auth-footnote {
  color: var(--muted);
}

@media (max-width: 920px) {
  body[data-page="portal"] .portal-header {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    padding: 16px 24px;
  }

  body[data-page="portal"] .portal-header .brand {
    justify-self: center;
  }

  body[data-page="portal"] .portal-header nav {
    justify-self: center;
    width: auto;
    max-width: 100%;
    gap: 8px 14px;
  }

  body[data-page="portal"] .portal-header .language-control {
    width: min(620px, 100%);
  }
}

@media (max-width: 640px) {
  body[data-page="portal"] .auth-shell {
    padding: 26px 12px 44px;
  }

  body[data-page="portal"] .auth-card {
    width: 100%;
    max-width: 100%;
    gap: 14px;
    padding: 24px 20px;
  }

  body[data-page="portal"] .auth-card h1 {
    font-size: 1.85rem;
    line-height: 1.14;
  }

  body[data-page="portal"] .auth-copy {
    font-size: 0.98rem;
  }

  body[data-page="portal"] .portal-assurance span {
    min-height: 38px;
    padding: 0 12px;
  }

  body[data-page="portal"] .oauth-button {
    min-height: 50px;
    padding: 0 12px;
    text-align: center;
  }

  body[data-page="portal"] .auth-tabs button {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.94rem;
  }

  body[data-page="portal"] .signature-form {
    padding: 14px;
  }

  body[data-page="portal"] .portal-upload-form {
    padding: 14px;
  }

  body[data-page="portal"] .signature-actions {
    grid-template-columns: 1fr;
  }
}
