@font-face {
  font-family: "Egghead Display";
  src: url("assets/fonts/SuperMindset.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #171717;
  --paper: #f2efe7;
  --card: #fffdf8;
  --soft: #fbfaf6;
  --muted: #77736b;
  --blue: #dce8ed;
  --green: #dfe9db;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(23, 23, 23, .065) 1px, transparent 1px),
    var(--paper);
  background-size: 22px 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 8px 8px 0 var(--ink);
}

.login-stripe {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #f4cb53 0 33.333%, #81b8d6 33.333% 66.666%, #75bd85 66.666% 100%);
}

.login-header {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 31px 32px 21px;
  text-align: center;
}

.login-header img {
  display: block;
  width: 138px;
  height: auto;
}

.login-header h1 {
  margin: 0;
  font-family: "Egghead Display", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 35px;
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1;
}

.login-body {
  padding: 23px 32px 27px;
  border-top: 2px solid var(--ink);
  background: var(--soft);
}

.login-google,
.login-submit {
  display: flex;
  width: calc(100% - 3px);
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  font: 950 10px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: box-shadow .12s ease, transform .12s ease, opacity .12s ease;
}

.login-google {
  color: var(--ink);
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}

.login-google svg {
  width: 19px;
  height: 19px;
}

.login-google:not(:disabled):hover {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 19px 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  height: 0;
  flex: 1;
  border-top: 1.5px dashed #aaa59b;
  content: "";
}

#loginForm {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-field label,
.login-field-heading > label {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-field-heading > button {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 2px 0;
  border: 0;
  color: #413e38;
  background: transparent;
  font: 900 8px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.login-field-heading > button:not(:disabled):is(:hover, :focus-visible) {
  color: #866400;
}

.login-control {
  display: flex;
  width: calc(100% - 2px);
  align-items: stretch;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: #f4f2ec;
  box-shadow: 2px 2px 0 var(--ink);
  transition: background .12s ease, box-shadow .12s ease, transform .12s ease;
}

.login-control:focus-within {
  background: #fff;
  box-shadow: 3px 3px 0 #81b8d6;
  transform: translate(-1px, -1px);
}

.login-control > svg {
  width: 43px;
  height: 48px;
  flex: 0 0 43px;
  padding: 12px;
  border-right: 1.5px solid var(--ink);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  background: var(--blue);
}

.login-control-password > svg {
  background: var(--green);
}

.login-control > input {
  width: 100%;
  height: 48px;
  min-width: 0;
  margin: 0;
  padding: 0 13px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 750 11px/1 Inter, ui-sans-serif, system-ui, sans-serif;
}

.login-control > input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.login-submit {
  width: calc(100% - 4px);
  min-height: 49px;
  margin-top: 2px;
  color: #fff;
  background: #20202a;
  box-shadow: 4px 4px 0 #77736b;
}

.login-submit:not(:disabled):hover {
  box-shadow: 2px 2px 0 #77736b;
  transform: translate(2px, 2px);
}

button:disabled {
  cursor: wait;
  opacity: .58;
}

.login-message {
  min-height: 0;
  margin: 0;
  padding: 14px 0 0;
  color: #9c2828;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.45;
}

.login-message:empty {
  display: none;
}

.login-message.is-success {
  color: #28683a;
}

.login-footer {
  padding: 13px 19px 14px;
  border-top: 1.5px solid var(--ink);
  background: #efede6;
}

.login-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 13px;
}

.login-footer a {
  color: #4f4c46;
  font-size: 8px;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.login-footer a:is(:hover, :focus-visible) {
  color: #171717;
}

html[data-egghead-theme="dark"] {
  color-scheme: dark;
}

html[data-egghead-theme="dark"] body {
  color: #e8e4da;
  background:
    radial-gradient(circle at 1px 1px, rgba(232, 228, 218, .075) 1px, transparent 1px),
    #181a1f;
  background-size: 22px 22px;
}

html[data-egghead-theme="dark"] .login-card {
  border-color: #0d0e11;
  background: #23262d;
  box-shadow: 8px 8px 0 #0d0e11;
}

html[data-egghead-theme="dark"] :is(.login-header, .login-body) {
  border-color: #0d0e11;
  background: #23262d;
}

html[data-egghead-theme="dark"] .login-google {
  color: #171717;
  background: #f4f1e9;
}

html[data-egghead-theme="dark"] .login-control {
  color: #171717;
  background: #d7d3c9;
}

html[data-egghead-theme="dark"] .login-control > input {
  color: #171717;
}

html[data-egghead-theme="dark"] .login-field-heading > button,
html[data-egghead-theme="dark"] .login-divider {
  color: #beb9af;
}

html[data-egghead-theme="dark"] .login-footer {
  border-color: #0d0e11;
  background: #1d2026;
}

html[data-egghead-theme="dark"] .login-footer a {
  color: #c9c4ba;
}

html[data-egghead-theme="dark"] .login-message.is-success {
  color: #85ca94;
}

@media (max-width: 520px) {
  .login-main {
    padding: 15px;
  }

  .login-card {
    width: min(430px, calc(100vw - 26px));
    border-radius: 11px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .login-header {
    padding: 28px 23px 19px;
  }

  .login-header img {
    width: 126px;
  }

  .login-header h1 {
    font-size: 32px;
  }

  .login-body {
    padding: 21px 23px 24px;
  }

  html[data-egghead-theme="dark"] .login-card {
    box-shadow: 6px 6px 0 #0d0e11;
  }
}

@media (max-height: 650px) {
  .login-main {
    align-items: start;
    padding-block: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Composição editorial do login: um único card, com identidade e formulário. */
body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 210px;
  height: 210px;
  border: 3px solid var(--ink);
  content: "";
  pointer-events: none;
}

body::before {
  top: -128px;
  left: -92px;
  rotate: 12deg;
  background: #f4cb53;
}

body::after {
  right: -118px;
  bottom: -142px;
  border-radius: 50%;
  background: #b9d9e7;
}

.login-main {
  padding: 38px 28px;
}

.login-card {
  display: grid;
  width: min(720px, calc(100vw - 48px));
  min-height: 570px;
  grid-template-columns: 154px minmax(0, 1fr);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 14px 14px 0 var(--ink);
}

.login-identity {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 570px;
  place-items: center;
  overflow: hidden;
  border-right: 3px solid var(--ink);
  background:
    linear-gradient(rgba(23, 23, 23, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, .08) 1px, transparent 1px),
    #f4cb53;
  background-size: 24px 24px;
}

.login-identity::before {
  position: absolute;
  top: 28px;
  left: 26px;
  width: 58px;
  height: 15px;
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--ink) 0 4px, transparent 4px 8px);
  content: "";
}

.login-identity::after {
  position: absolute;
  right: 25px;
  bottom: 31px;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fdfaf2;
  box-shadow: 5px 5px 0 var(--ink);
  content: "";
}

.login-shape,
.login-spark,
.login-color-key {
  position: absolute;
}

.login-shape-blue {
  top: 118px;
  left: -50px;
  width: 190px;
  height: 128px;
  rotate: -9deg;
  border: 3px solid var(--ink);
  background: #99cbe0;
}

.login-shape-green {
  right: -45px;
  bottom: 121px;
  width: 148px;
  height: 148px;
  rotate: 18deg;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #83c98f;
}

.login-shape-grid {
  right: 28px;
  top: 76px;
  width: 72px;
  height: 72px;
  border: 0;
  background: radial-gradient(circle, var(--ink) 2px, transparent 2.5px);
  background-size: 12px 12px;
}

.login-spark {
  z-index: 3;
  color: var(--ink);
  font-size: 37px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 2px 2px 0 #fff8d7;
}

.login-spark-one {
  top: 120px;
  right: 23px;
  rotate: 11deg;
}

.login-spark-two {
  bottom: 151px;
  left: 27px;
  rotate: -18deg;
  font-size: 26px;
}

.login-color-key {
  z-index: 5;
  top: 30px;
  right: 27px;
  display: flex;
  gap: 5px;
}

.login-color-key i {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.login-color-key i:nth-child(1) { background: #f0746b; }
.login-color-key i:nth-child(2) { background: #99cbe0; }
.login-color-key i:nth-child(3) { background: #83c98f; }

.login-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--card);
}

.login-header {
  display: block;
  padding: 18px 42px 9px;
  gap: 0;
  justify-items: normal;
  text-align: left;
}

.login-brand-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.login-brand-row > img {
  width: min(100%, 330px);
  height: auto;
}

.login-header h1 {
  position: relative;
  z-index: 0;
  display: inline-block;
  isolation: isolate;
  margin: 9px 0 4px;
  font-size: 42px;
  letter-spacing: -.035em;
}

.login-header h1::after {
  position: absolute;
  z-index: -1;
  right: -7px;
  bottom: 2px;
  left: -5px;
  height: 12px;
  rotate: -1deg;
  background: #f4cb53;
  content: "";
}

.login-header p {
  width: 100%;
  margin: 0;
  color: #5e5a54;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.login-body {
  padding: 8px 42px 14px;
  border: 0;
  background: var(--card);
}

.login-google,
.login-submit {
  width: 100%;
  min-height: 50px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.25;
}

.login-google {
  justify-content: flex-start;
  padding: 6px 13px 6px 7px;
  gap: 11px;
  box-shadow: 4px 4px 0 var(--ink);
}

.login-google-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: #fff4c5;
}

.login-google-mark svg {
  width: 20px;
  height: 20px;
}

.login-button-arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-google:not(:disabled):hover {
  box-shadow: 2px 2px 0 var(--ink);
}

.login-first-access {
  margin: 8px 3px 0;
  color: #5e5a54;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.login-first-access strong {
  color: var(--ink);
  font-weight: 900;
}

.login-divider {
  margin: 10px 0;
  font-size: 12px;
  letter-spacing: .025em;
  line-height: 1.3;
  text-align: center;
}

#loginForm {
  gap: 12px;
}

.login-field {
  gap: 6px;
}

.login-field label,
.login-field-heading > label {
  font-size: 13px;
  letter-spacing: .06em;
}

.login-field-heading > button {
  min-height: 24px;
  padding: 4px 0;
  font-size: 12px;
}

.login-control {
  width: 100%;
  min-height: 50px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 3px 3px 0 var(--ink);
}

.login-control-icon {
  display: grid;
  width: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-right: 2px solid var(--ink);
  background: var(--blue);
}

.login-control-password .login-control-icon {
  background: var(--green);
}

.login-control-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-control > input {
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
}

.login-password-toggle {
  display: grid;
  width: 44px;
  min-height: 48px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1.5px dashed #8c887f;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.login-password-toggle:hover {
  background: #fff4c5;
}

.login-password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-password-toggle .login-eye-closed,
.login-password-toggle[aria-pressed="true"] .login-eye-open {
  display: none;
}

.login-password-toggle[aria-pressed="true"] .login-eye-closed {
  display: block;
}

.login-submit {
  justify-content: space-between;
  margin-top: 1px;
  padding: 0 17px 0 21px;
  box-shadow: 5px 5px 0 #77736b;
  font-size: 14px;
}

.login-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.login-submit:not(:disabled):hover {
  box-shadow: 2px 2px 0 #77736b;
}

.login-message {
  padding-top: 16px;
  font-size: 13px;
}

.login-footer {
  margin-top: auto;
  padding: 8px 42px 10px;
  border-top: 1.5px solid var(--ink);
}

.login-footer nav {
  justify-content: flex-start;
  gap: 8px 16px;
}

.login-footer a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

:is(.login-google, .login-submit, .login-password-toggle, .login-field-heading > button, .login-footer a):focus-visible {
  outline: 3px solid #4c95bf;
  outline-offset: 3px;
}

html[data-egghead-theme="dark"] body::before,
html[data-egghead-theme="dark"] body::after {
  border-color: #0d0e11;
}

html[data-egghead-theme="dark"] .login-card {
  border-color: #0d0e11;
  box-shadow: 14px 14px 0 #0d0e11;
}

html[data-egghead-theme="dark"] .login-identity {
  border-color: #0d0e11;
}

html[data-egghead-theme="dark"] .login-panel,
html[data-egghead-theme="dark"] :is(.login-header, .login-body) {
  background: #23262d;
}

html[data-egghead-theme="dark"] .login-header p {
  color: #b9b4aa;
}

html[data-egghead-theme="dark"] .login-first-access {
  color: #b9b4aa;
}

html[data-egghead-theme="dark"] .login-first-access strong {
  color: #e8e4da;
}

html[data-egghead-theme="dark"] .login-password-toggle {
  color: #171717;
}

@media (max-width: 720px) {
  body::before {
    top: -155px;
    left: -135px;
  }

  body::after {
    right: -155px;
    bottom: -165px;
  }

  .login-main {
    align-items: start;
    padding: 12px 10px 22px;
  }

  .login-card {
    width: min(470px, calc(100vw - 18px));
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 15px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .login-identity {
    display: block;
    min-height: 92px;
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }

  .login-identity::before {
    top: 14px;
    left: auto;
    right: 20px;
    width: 46px;
    height: 12px;
  }

  .login-identity::after {
    right: 23px;
    bottom: 13px;
    width: 30px;
    height: 30px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .login-shape-blue {
    top: 6px;
    left: -35px;
    width: 137px;
    height: 76px;
  }

  .login-shape-green {
    right: 66px;
    bottom: -61px;
    width: 105px;
    height: 105px;
  }

  .login-shape-grid {
    top: 39px;
    right: 15px;
    width: 51px;
    height: 44px;
    background-size: 10px 10px;
  }

  .login-spark-one {
    top: 49px;
    right: 82px;
    font-size: 26px;
  }

  .login-spark-two {
    display: none;
  }

  .login-color-key {
    top: auto;
    right: auto;
    bottom: 10px;
    left: 20px;
  }

  .login-header {
    padding: 15px 20px 10px;
  }

  .login-brand-row > img {
    width: min(100%, 230px);
  }

  .login-header h1 {
    margin-top: 8px;
    font-size: 34px;
  }

  .login-header p {
    font-size: 14px;
  }

  .login-body {
    padding: 8px 20px 18px;
  }

  .login-google,
  .login-submit {
    min-height: 50px;
  }

  .login-google {
    padding-right: 10px;
  }

  .login-first-access {
    margin-top: 10px;
  }

  .login-divider {
    margin-block: 12px;
  }

  #loginForm {
    gap: 12px;
  }

  .login-field {
    gap: 6px;
  }

  .login-control,
  .login-control-icon,
  .login-password-toggle {
    min-height: 50px;
  }

  .login-control-icon {
    width: 48px;
    flex-basis: 48px;
  }

  .login-control > input {
    height: 48px;
  }

  .login-password-toggle {
    width: 44px;
    flex-basis: 44px;
  }

  .login-footer {
    padding: 10px 18px 12px;
  }

  .login-footer nav {
    justify-content: center;
  }

  html[data-egghead-theme="dark"] .login-card {
    box-shadow: 6px 6px 0 #0d0e11;
  }
}

@media (max-width: 720px) and (max-height: 650px) {
  .login-main {
    padding-block: 8px 14px;
  }

  .login-identity {
    display: none;
  }

  .login-header {
    padding-top: 11px;
  }

  .login-brand-row > img {
    width: min(100%, 195px);
  }

  .login-header h1 {
    margin-top: 5px;
    font-size: 30px;
  }

  .login-body {
    padding-top: 5px;
  }

  .login-footer {
    padding-bottom: 7px;
  }
}
