@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/inter.woff2) format('woff2');
}

:root {
  --ink: #171715;
  --ink-soft: #57534c;
  --parchment: #f3efe7;
  --paper: #faf8f3;
  --stone: #e6e0d6;
  --line: #d8d2c8;
  --bronze: #9a603a;
  --bronze-deep: #7d4c2d;
  --error: #9b2c22;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--parchment);
  color: var(--ink);
  font: 15px/1.55 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.top { width: 100%; max-width: 440px; padding: 40px 20px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.01em; }
.mark { width: 22px; height: 22px; }

.card {
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgb(23 23 21 / 4%);
}
.card:focus { outline: none; }

h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0 0 14px; text-wrap: pretty; }
.requester, .hint, .sent { color: var(--ink-soft); font-size: 14px; }
.requester strong { color: var(--ink); font-weight: 600; }

.stack { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
label { font-weight: 600; font-size: 14px; }
input {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
input:focus-visible { outline: 2px solid var(--bronze); outline-offset: 1px; border-color: var(--bronze); }
#code { font-size: 20px; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }

button {
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
}
button:hover:not(:disabled) { background: #2b2a27; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--bronze); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: progress; }
button.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
button.secondary:hover:not(:disabled) { background: var(--stone); }
button.link { padding: 4px 0; color: var(--bronze-deep); background: none; border: 0; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover:not(:disabled) { background: none; color: var(--ink); }
button.link.quiet { align-self: center; margin-top: 4px; color: var(--ink-soft); font-size: 14px; }

.row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.actions button { flex: 1; }

.permissions, .apps { margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--stone); }
.permissions li, .apps li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--stone); position: relative; }
.permissions li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 8px; height: 8px; border-radius: 2px; background: var(--bronze); }
.apps li { padding-left: 0; }
.apps a { color: var(--ink); font-weight: 600; text-decoration: none; }
.apps a::after { content: ' →'; color: var(--bronze); }

.message { margin: 16px 0 0; padding: 10px 12px; color: var(--error); background: #f8ebe7; border-radius: 8px; font-size: 14px; }

a { color: var(--bronze-deep); text-underline-offset: 3px; }

.foot { width: 100%; max-width: 440px; padding: 28px 20px 40px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.foot p { margin: 0 0 6px; }
.foot nav { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.foot a { color: var(--ink-soft); }

[hidden] { display: none !important; }
