:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #19352f;
  background: #f4f0e8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgb(242 177 92 / 24%), transparent 34rem),
    linear-gradient(145deg, #f8f4ec 0%, #e7eee7 100%);
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 48px;
}

.hero {
  max-width: 820px;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge {
  padding: 8px 14px;
  color: #6d3a18;
  background: #f6dcc0;
}

.eyebrow {
  margin: 44px 0 12px;
  color: #2f7767;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.3rem);
  font-weight: 500;
  line-height: 0.97;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 700px;
  margin: 32px 0 24px;
  color: #45635c;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.status {
  gap: 10px;
  padding: 11px 16px;
  color: #245d50;
  background: rgb(255 255 255 / 65%);
  border: 1px solid rgb(47 119 103 / 20%);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e28b45;
  box-shadow: 0 0 0 5px rgb(226 139 69 / 16%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #567068;
  font-size: 0.9rem;
  font-weight: 650;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-action {
  color: #fff;
  background: #245d50;
  box-shadow: 0 12px 28px rgb(36 93 80 / 18%);
}

.secondary-action {
  color: #245d50;
  background: rgb(255 255 255 / 72%);
  border: 1px solid rgb(36 93 80 / 18%);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
button:focus-visible {
  outline: 3px solid #e28b45;
  outline-offset: 3px;
}

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

.admin-card {
  margin-top: 24px;
}

.admin-card h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.admin-lead {
  margin-top: 16px;
  font-size: 1rem;
}

.source-section {
  margin: 28px 0 34px;
  padding: 22px;
  border: 1px solid rgb(36 93 80 / 14%);
  border-radius: 18px;
  background: #edf5f0;
}

.section-heading,
.source-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading .eyebrow {
  margin: 0 0 5px;
}

.section-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.source-revision,
.source-help,
.source-actions span {
  color: #567068;
  font-size: 0.84rem;
}

.source-help {
  margin: 14px 0 0;
  line-height: 1.55;
}

.source-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.source-form label {
  display: grid;
  gap: 7px;
  color: #45635c;
  font-size: 0.88rem;
  font-weight: 750;
}

.source-form input {
  min-height: 44px;
  padding: 9px 12px;
  color: #19352f;
  font: inherit;
  border: 1px solid rgb(36 93 80 / 22%);
  border-radius: 10px;
  background: #fff;
}

.source-actions code {
  overflow-wrap: anywhere;
}

.source-actions button {
  min-height: 42px;
  padding: 9px 16px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: #245d50;
}

.invite-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.invite-form label {
  display: grid;
  gap: 7px;
  color: #45635c;
  font-size: 0.88rem;
  font-weight: 750;
}

.invite-form input,
.invite-form select {
  min-height: 44px;
  padding: 9px 12px;
  color: #19352f;
  font: inherit;
  border: 1px solid rgb(36 93 80 / 22%);
  border-radius: 10px;
  background: #fff;
}

.invite-form button {
  min-height: 44px;
  width: fit-content;
  padding: 10px 18px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  background: #245d50;
}

.users-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid rgb(36 93 80 / 12%);
  border-radius: 14px;
  background: #f8fbf8;
}

.user-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  min-width: min(100%, 430px);
}

.user-controls input,
.user-controls select {
  min-height: 40px;
  padding: 8px 10px;
  color: #19352f;
  font: inherit;
  border: 1px solid rgb(36 93 80 / 20%);
  border-radius: 9px;
  background: #fff;
}

.user-controls button,
.quiet-button {
  min-height: 40px;
  padding: 8px 14px;
  color: #245d50;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgb(36 93 80 / 20%);
  border-radius: 9px;
  background: #fff;
}

.audit-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}

.audit-heading .eyebrow {
  margin: 0 0 6px;
}

.audit-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.audit-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgb(36 93 80 / 12%);
}

.audit-row span,
.audit-row time {
  color: #567068;
  font-size: 0.84rem;
}

.user-row div {
  display: grid;
  gap: 4px;
}

.user-row span {
  color: #567068;
  font-size: 0.86rem;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 72px;
}

.brand {
  color: #19352f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.portal-card {
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgb(25 53 47 / 10%);
  border-radius: 28px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 24px 70px rgb(38 65 58 / 10%);
}

.portal-card h1 {
  max-width: 620px;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
}

.portal-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: #567068;
  line-height: 1.5;
}

.portal-message[data-tone="error"] {
  color: #9b3f2d;
}

.portal-message[data-tone="success"] {
  color: #245d50;
}

.google-button-wrap {
  min-height: 44px;
  margin-top: 26px;
}

.session-panel {
  display: grid;
  gap: 18px;
  margin-top: 26px;
  padding: 22px;
  border-radius: 18px;
  background: #edf5f0;
}

.session-panel p {
  margin: 0;
}

.session-panel button {
  width: fit-content;
  min-height: 44px;
  padding: 10px 16px;
  color: #245d50;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  border: 1px solid rgb(36 93 80 / 22%);
  border-radius: 12px;
  background: #fff;
}

[hidden] {
  display: none !important;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 72px;
}

.principles article {
  min-height: 220px;
  padding: 28px;
  border-radius: 24px;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(25 53 47 / 9%);
  box-shadow: 0 18px 50px rgb(38 65 58 / 7%);
}

.principles span {
  color: #c36e30;
  font-weight: 800;
}

h2 {
  margin: 42px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 600;
}

.principles p {
  margin: 0;
  color: #567068;
  line-height: 1.6;
}

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 36px;
  color: #678078;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .shell {
    padding-top: 40px;
  }

  .principles {
    grid-template-columns: 1fr;
    margin-top: 48px;
  }

  .principles article {
    min-height: auto;
  }

  h2 {
    margin-top: 24px;
  }

  .portal-nav {
    margin-bottom: 44px;
  }

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

  .user-row {
    flex-direction: column;
  }

  .user-controls,
  .audit-row {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .source-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
