/* Hand-written from tokens captured off the real Ontario.ca sign-in page.
   No CDN and no vendored design system: the cluster may have no egress, and a
   demo's appearance should not depend on a live third-party government site.
   apps/pip/app/static/style.css sets the same precedent. */

:root {
  --on-header: #333333;
  --on-page:   #f9f9f9;
  --on-primary:#1d77d2;
  --on-border: #cbcbcb;
  --on-footer: #ededed;
  --on-ink:    #272727;
  --on-hint:   #5a5a5a;
  --on-error:  #cd0000;
  --radius: 6px;
}

/* The provider realm is deliberately NOT Ontario-branded -- it is a health
   network, and two realms that look identical would undercut the point. */
.theme-health {
  --on-header: #14405c;
  --on-primary:#0a6b7c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--on-page);
  color: var(--on-ink);
  font-family: Raleway, "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.demo-ribbon {
  background: #b10e1e;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.55rem 1rem;
}

.masthead {
  background: var(--on-header);
  color: #fff;
  height: 64px;
  display: flex;
  align-items: center;
}

.masthead-inner {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; }
.wordmark-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.wordmark-text.small { font-size: 1.35rem; color: var(--on-ink); }
.trillium { width: 34px; height: 34px; }

.lang { color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
.lang[aria-disabled="true"] { opacity: 0.85; cursor: default; }

main {
  flex: 1;
  display: flex;
  justify-content: center;
  /* Not the default `stretch`: that makes the card fill the viewport height
     and leaves a tall empty box under the form. */
  align-items: flex-start;
  padding: 2.5rem 1rem;
}

.card {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: var(--radius);
}

.card-head {
  text-align: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #ececec;
}

.card-body { padding: 1.5rem; }

h1 { font-size: 2.06rem; font-weight: 700; margin: 0 0 1.25rem; }

label { display: block; font-weight: 700; margin-top: 1rem; }
.hint { margin: 0.15rem 0 0.4rem; font-size: 0.85rem; color: var(--on-hint); }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.8rem 0.85rem;
  font: inherit;
  color: var(--on-ink);
  border: 1px solid var(--on-border);
  border-radius: var(--radius);
  background: #fff;
}

input:focus-visible {
  outline: 3px solid var(--on-primary);
  outline-offset: 1px;
}

button.primary {
  width: 100%;
  margin-top: 1.4rem;
  padding: 0.86rem 1.14rem;
  font: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--on-primary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

button.primary:hover { filter: brightness(0.94); }

.or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0 1rem;
  color: var(--on-hint);
  font-size: 0.9rem;
}
.or::before, .or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e2e2;
}

button.secondary {
  width: 100%;
  padding: 0.86rem 1.14rem;
  font: inherit;
  color: var(--on-ink);
  background: transparent;
  border: 1px solid var(--on-border);
  border-radius: var(--radius);
}

/* Rendered and visibly out of scope. A dead link reads as a bug on stage; a
   disabled control with a reason reads as scope. */
button.secondary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.disabled-note {
  margin: 0.3rem 0 0.9rem;
  font-size: 0.78rem;
  color: var(--on-hint);
}

.error {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-left: 4px solid var(--on-error);
  background: #fdf2f2;
  color: #8a0000;
  font-size: 0.92rem;
}

.links { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.links li { margin: 0.45rem 0; }
.links a { color: var(--on-primary); }
.links a[aria-disabled="true"] { opacity: 0.7; }

.accounts {
  margin-top: 1.5rem;
  border-top: 1px solid #ececec;
  padding-top: 1rem;
  font-size: 0.85rem;
}
.accounts summary { cursor: pointer; color: var(--on-hint); }
.accounts ul { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.accounts li { margin: 0.2rem 0; }

button.account {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
button.account:hover { background: #f2f7fc; border-color: #dbe7f3; }
button.account code { color: var(--on-primary); }
button.account span { color: var(--on-hint); }

footer {
  background: var(--on-footer);
  padding: 1.4rem 1.5rem 1.8rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 0.9rem; }
footer a { color: var(--on-primary); font-size: 0.9rem; }
footer .copy {
  margin: 0;
  max-width: 48rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--on-hint);
}

@media (max-width: 30rem) {
  .masthead-inner { padding: 0 1rem; }
  main { padding: 1.5rem 1rem; }
  h1 { font-size: 1.7rem; }
}
