/* Tokens lifted from the Industry design system (the project's source of
   truth). Only the parts this app uses are copied -- an app should not carry
   a whole system's component library to render one screen. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  /* The Industry system's structure -- Barlow type, blueprint registration
     marks, square edges -- on a dark ground. The system is token-driven, so
     this is a palette swap, not a fork of the design.
     Contrast checked: text 14.8:1, muted 6.2:1, accent on ground 11.4:1. */
  --color-bg: #161b22;
  --color-surface: #0d1117;
  --color-text: #e6edf3;
  --color-accent: #7ee787;
  --color-accent-600: #6bd177;
  --color-accent-700: #9ff0a6;   /* lighter, not darker: on a dark ground the
                                    active state has to move toward the light */
  --color-neutral-900: #010409;
  --color-divider: color-mix(in srgb, #e6edf3 18%, transparent);

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --radius-md: 4px;
  --shadow-lg: 0 12px 32px color-mix(in srgb, #010409 55%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  /* Tells the browser to render form controls and scrollbars dark. */
  color-scheme: dark;
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* — blueprint frame: registration marks drawn outside the box — */
.blueprint { position: relative; border: 1px solid var(--color-divider); border-radius: 0; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; font-family: var(--font-heading); font-weight: 600;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: var(--space-2) calc(var(--space-3) * 1.2); border-radius: 0;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-neutral-900); border-color: var(--color-accent); }
.btn-primary:active:not(:disabled) { background: var(--color-accent-700); }
.btn-ghost { color: var(--color-accent); border-color: transparent; padding-inline: 3.4px; }

/* — forms — */
.field > label { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  /* 16px, not the system's 14px: anything smaller makes iOS Safari zoom the
     whole page on focus, which on a phone reads as a bug. */
  font-size: 16px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: 0;
}
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--color-divider); border-radius: 0; }
.seg-opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); background: transparent; border: 1px solid var(--color-divider); border-radius: 0; }
.muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.nums { font-variant-numeric: tabular-nums; }
.heading { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.01em; }
.kicker { font-family: var(--font-heading); font-weight: 600; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); }
.error { color: #ff7b72; font-size: .9rem; min-height: 1.4rem; margin: 0 0 var(--space-2); }

/* — the sign-in screen — */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.panel { width: 100%; max-width: 21rem; display: flex; flex-direction: column; gap: 2px; }
.panel h1 { font-size: 34px; line-height: 1; margin: 0 0 4px; letter-spacing: .01em; }
.panel form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.panel .btn { height: 44px; font-size: 15px; letter-spacing: .06em; }
