/* The recipient portal: the staff app's sage palette, one column, no
   third-party code. Only buttons are rounded. */
:root {
  color-scheme: light;
  --bg: #e8e8e8;
  --panel: #f7f7f6;
  --well: #ececeb;
  --ink: #161616;
  --muted: #5f5f5f;
  --line: rgba(0, 0, 0, 0.1);
  --sage-50: #dbddd8;
  --sage-100: #d5d8d1;
  --sage-200: #c9cec7;
  --sage-ink: #4a5448;
  --sage-strong: #566153;
  --error-ink: #9b1c17;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 16px;
}

.brand {
  margin: 0;
  color: var(--sage-ink);
  font-weight: 650;
}

main {
  max-width: 46rem;
  margin: 0 auto 3rem;
  padding: 1.4rem 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

h1 { margin: 0 0 0.6rem; font-size: 1.5rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 0.5rem; }

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

button {
  min-height: 2.6rem;
  padding: 0.45rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sage-200) 0%, var(--sage-100) 55%, var(--sage-50) 100%);
  box-shadow: inset 0 0 0 1.5px #fafafa, 0 0 0 1px rgba(74, 84, 72, 0.2), 0 4px 10px rgba(60, 70, 58, 0.1);
  color: var(--sage-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(74, 84, 72, 0.3);
}

button:disabled { opacity: 0.55; cursor: default; }

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--sage-strong);
  outline-offset: 2px;
}

label { display: block; margin: 1rem 0 0.4rem; font-weight: 600; }

input {
  width: 10rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #fff;
  font: inherit;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
}

.row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }

dl {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
}

dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }

pre {
  margin: 0;
  padding: 0.8rem;
  background: var(--well);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.tables { overflow-x: auto; }

table { border-collapse: collapse; margin: 0 0 1rem; }
td, th { padding: 0.25rem 0.8rem 0.25rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th.section { padding-top: 0.6rem; color: var(--sage-ink); }

dialog.notice {
  width: min(26rem, calc(100vw - 32px));
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--error-ink);
  background: var(--panel);
}

dialog.notice::backdrop { background: rgba(30, 30, 30, 0.3); }
dialog.notice h2 { margin: 0 0 0.4rem; color: var(--error-ink); }
dialog.notice.info { border-top-color: var(--sage-strong); }
dialog.notice.info h2 { color: var(--sage-ink); }
.actions { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: 0.5rem; }
}

form { margin: 0; }
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  max-width: 24rem;
  font-size: 1rem;
  letter-spacing: normal;
}
input.code { width: 10rem; font-size: 1.3rem; letter-spacing: 0.2em; }
.link { background: none; box-shadow: none; padding: 0; min-height: 0; color: var(--sage-ink); text-decoration: underline; font-weight: 500; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.08em; overflow-wrap: anywhere; background: var(--well); padding: 0.6rem 0.8rem; }
