:root {
  --bg: #f8f7f2;
  --ink: #171717;
  --muted: #5f625c;
  --line: #d9d6ca;
  --panel: #ffffff;
  --accent: #123d34;
  --accent-ink: #ffffff;
  --error: #9f1d1d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

.home-shell,
.login-shell,
.portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.home-copy,
.portal-copy {
  width: min(100%, 760px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin: 0 0 64px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-style: italic;
  text-decoration: none;
}

.brand.small {
  margin-bottom: 42px;
}

.brand span {
  color: var(--accent);
}

.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: .98;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.actions.compact {
  margin-top: 22px;
}

.button,
button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.login-panel {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 34px;
}

.login-panel h1 {
  font-size: 2.4rem;
}

.muted {
  margin: 0 0 28px;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input[type="password"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 2px;
}

form button {
  width: 100%;
  margin-top: 14px;
}

.error {
  margin: 14px 0 0;
  color: var(--error);
  font-size: .9rem;
}

code {
  border: 1px solid var(--line);
  padding: 2px 6px;
  background: var(--panel);
  font-size: .92em;
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.surface-card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}

.surface-card:hover,
.surface-card:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.surface-name {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
}

.surface-copy {
  color: var(--muted);
  font-size: .95rem;
}

@media (max-width: 560px) {
  .brand {
    margin-bottom: 44px;
  }

  .login-panel {
    padding: 26px;
  }

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