/* The look every portal page shares: linen and gold thread (colours from sebastien-www/public/tokens.css), light and dark,
   the top bar, the button, form fields and the sign-in card. */
:root {
  --bg: #F4EEE3; --surface: #FAF7F0; --band: #E8DCC6; --line: #CDBB9A; --stitch: #B08A3E;
  --accent: #7E5F24; --text: #2A241C; --muted: #5E5244;
  --btn-bg: #2A241C; --btn-fg: #FAF7F0; --btn-hover: #7E5F24; --warn: #8A4B2A;
  --weave: rgba(94, 82, 68, 0.035);
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --label: "Marcellus SC", "Cormorant Garamond", Georgia, serif;
  --body: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1913; --surface: #28221A; --band: #2F281F; --line: #4A4033; --stitch: #C9A45C;
    --accent: #D9B874; --text: #F1EADC; --muted: #BFB29C;
    --btn-bg: #C9A45C; --btn-fg: #2A241C; --btn-hover: #E0C17F; --warn: #E9A57E;
    --weave: rgba(244, 238, 227, 0.025);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background-color: var(--bg); color: var(--text);
  background-image: repeating-linear-gradient(0deg, var(--weave) 0 1px, transparent 1px 4px),
                    repeating-linear-gradient(90deg, var(--weave) 0 1px, transparent 1px 4px);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
a { color: var(--accent); text-decoration: underline dashed var(--stitch); text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--stitch); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 500; margin: 0; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--accent); }
p { margin: 0; }
.eyebrow { font-family: var(--label); font-size: 14px; letter-spacing: 0.18em; color: var(--accent); }
.muted { color: var(--muted); }
.err { color: var(--warn); font-size: 15px; }

.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.top a { font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border: 0; border-radius: 2px; background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--label); font-size: 15px; letter-spacing: 0.14em; cursor: pointer; transition: background .2s;
}
.btn:hover { background: var(--btn-hover); }

input {
  display: block; width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
}
input:focus { outline: none; border-color: var(--stitch); box-shadow: 0 0 0 1px var(--stitch); }

body.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 32px 24px; background: var(--surface); border: 1.5px dashed var(--stitch); border-radius: 2px; }
.signin h1 { font-size: 40px; line-height: 1.05; margin-bottom: 4px; }
.signin .muted { font-size: 15px; }
