/* Mirattic Auth. Tokens follow Mirattic Flow (globals.css): neutral greys, ink primary button,
   blue only for links and focus. Pretendard, self-hosted (OFL 1.1, fonts/LICENSE.txt). */
@font-face {
  font-family: "Pretendard";
  src: url("/fonts/PretendardStdVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --canvas: #f7f7f8;
  --surface: #ffffff;
  --raised: #f1f1f3;
  --line: #e4e4e7;
  --line-strong: #d3d3d8;
  --ink: #18181b;
  --ink-soft: #5c5c66;
  --ink-faint: #9b9ba4;
  --accent: #2f6feb;
  --accent-soft: #eef3fe;
  --danger: #d63b30;
  --danger-soft: #fdf1f0;
  --done: #15803d;
  --done-soft: #edf7ef;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -8px rgb(0 0 0 / 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c0c0d;
    --surface: #151517;
    --raised: #1f1f23;
    --line: #27272b;
    --line-strong: #3a3a41;
    --ink: #f2f2f3;
    --ink-soft: #a3a3ac;
    --ink-faint: #6f6f78;
    --accent: #7aa2ff;
    --accent-soft: #172038;
    --danger: #f0736a;
    --danger-soft: #2a1614;
    --done: #5fcf87;
    --done-soft: #10241a;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.55 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand span { color: var(--ink-faint); font-weight: 500; }

/* content column: upper third, not dead centre */
main {
  flex: 1;
  width: 100%;
  max-width: 400px;
  margin: 6vh auto 48px;
  padding: 0 16px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
}
@media (max-width: 480px) {
  main { margin-top: 2vh; }
  .panel { border: 0; box-shadow: none; background: transparent; padding: 8px 4px; }
}

h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lede { margin: 6px 0 22px; color: var(--ink-soft); font-size: 14px; }
.lede strong { color: var(--ink); font-weight: 600; }

/* notices */
.note {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.note.error { background: var(--danger-soft); color: var(--danger); }
.note.ok { background: var(--done-soft); color: var(--done); }

/* fields */
.field { margin-bottom: 14px; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.field label a, .field label small { font-weight: 500; font-size: 13px; }
.field label small { color: var(--ink-faint); }
.input { position: relative; }
input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder { color: var(--ink-faint); }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input input[type="password"], .input input[data-peek] { padding-right: 56px; }
.peek {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 32px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.peek:hover { background: var(--raised); }

/* buttons */
.primary {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  font: inherit;
  font-weight: 600;
  color: var(--canvas);
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.primary:hover { opacity: 0.88; }
.primary:focus-visible, .peek:focus-visible, .text-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.text-button {
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  cursor: pointer;
}
.text-button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.alt {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

/* account page */
.facts { margin: 0 0 8px; font-size: 14px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { flex-shrink: 0; color: var(--ink-soft); white-space: nowrap; }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.facts code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-soft); }
section + section { margin-top: 26px; }
h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.row .primary { width: auto; margin: 0; padding: 0 18px; }

footer {
  padding: 20px 24px 28px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
}

h1.spaced { margin-bottom: 22px; }

/* login: big logo lockup instead of a heading */
main.landing { margin-top: 9vh; }
.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 28px;
}
.lockup img { width: 128px; height: 128px; }
.wordmark {
  margin-top: 2px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--ink);
}
/* dotless ı + our own dot, so the dot can take the brand blue */
.wordmark .i { position: relative; }
.wordmark .dot {
  position: absolute;
  left: 50%;
  top: 0.195em;
  width: 0.165em;
  height: 0.165em;
  margin-left: -0.0825em;
  border-radius: 50%;
  background: #3D7BFF;
}
.lede.context { margin: 0 0 18px; text-align: center; }
@media (max-width: 480px) {
  main.landing { margin-top: 5vh; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
