@import "../shared/navigation-controls.css";
:root {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    "PingFang TC",
    sans-serif;
  color: #172238;
  background: #f5f6f8;
  font-synthesis: none;
  --blue: #0068da;
  --muted: #59677d;
  --line: #dce2eb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--blue);
  text-underline-offset: 4px;
}
.masthead {
  max-width: 1440px;
  margin: auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  color: #15233d;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -1.2px;
  text-decoration: none;
}
.account-navigation {
  width: max-content;
}
.account-navigation > a[aria-current] {
  background:
    linear-gradient(
      165deg,
      #fff 0%,
      #e4efff 75%);
  box-shadow:
    inset 0 1px 1px #fff,
    inset 0 -1px 2px #31598624,
    0 2px 5px #31598624;
  border-color: var(--navigation-edge);
}
.child-layout {
  max-width: 1140px;
  margin: 34px auto 38px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: #5a6b83;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: .1em;
}
h1 {
  font-size: clamp(44px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 750;
  margin: 0 0 16px;
}
h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.035em;
  margin: 24px 0 10px;
}
h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -.02em;
}
p {
  line-height: 1.6;
}
.chinese {
  font-size: 22px;
  margin: 0;
  letter-spacing: -.025em;
}
.intro-note {
  max-width: 390px;
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 17px;
}
.workspace-preview {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.workspace-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.9;
  object-fit: cover;
}
.workspace-preview figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--muted);
}
.workspace-preview strong {
  color: #20334d;
  font-weight: 650;
}
.workspace-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  color: #59677d;
  font-size: 12px;
  font-weight: 600;
}
.workspace-list li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.workspace-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7399c7;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 6px 24px #26344d06;
}
.staging {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: #f3f6fb;
  border: 1px solid #e2e8f1;
  color: #59677d;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
}
.staging::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7399c7;
}
.muted,
.small {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.form-intro {
  color: var(--muted);
  margin: 0 0 5px;
  font-size: 14px;
}
.login-panel #login-form > .muted {
  margin: 0 0 20px;
  font-size: 12px;
}
label,
legend {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 22px 0 9px;
}
label > span,
legend > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #c6d1e0;
  border-radius: 13px;
  padding: 12px 14px;
  font: inherit;
  color: #172238;
  background: #fbfcfe;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input::placeholder {
  color: #748096;
  opacity: 1;
}
input:focus {
  outline: 3px solid #0068da33;
  outline-offset: 2px;
  border-color: var(--blue);
  background: #fff;
}
#class-code {
  font-size: 18px;
  letter-spacing: .035em;
}
button,
.button {
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  border-radius: 14px;
  padding: 13px 18px;
  min-height: 48px;
  cursor: pointer;
  text-align: center;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
button:disabled {
  opacity: .55;
  cursor: wait;
}
.primary {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}
.primary:hover:enabled,
a.primary:hover {
  background: #005bbd;
  border-color: #005bbd;
}
.secondary {
  color: #20334d;
  background: #f7faff;
  border: 1px solid #c5d4e7;
}
.secondary:hover:enabled {
  background: #e2eeff;
  border-color: #a7bfdf;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.login-panel .primary,
.login-panel .secondary {
  width: 100%;
  margin-top: 18px;
  min-height: 52px;
}
.login-panel .small {
  margin-bottom: 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.7;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 22px 0 10px;
  min-width: 0;
}
legend {
  padding: 0;
  margin: 0 0 9px;
}
.word-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.word-fields label {
  margin: 0;
  position: relative;
}
.word-fields label > span {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
}
.word-fields input {
  padding: 23px 10px 8px;
  min-height: 62px;
  font-size: 15px;
}
.notice {
  padding: 18px;
  background: #fff8e9;
  border: 1px solid #e4d1a5;
  border-radius: 16px;
  margin-top: 20px;
}
.notice p {
  font-size: 13px;
}
#status,
#teacher-status {
  font-size: 13px;
  color: #8a4b18;
  overflow-wrap: anywhere;
}
#status:empty,
#teacher-status:empty {
  display: none;
}
footer {
  text-align: center;
  color: var(--muted);
  padding: 22px 24px;
  font-size: 12px;
}
footer span {
  margin-left: 6px;
}
.teacher-layout {
  max-width: 1184px;
  padding: 28px 32px;
  margin: auto;
}
.teacher-layout > .eyebrow {
  margin-bottom: 10px;
}
.teacher-layout > .staging {
  float: right;
}
.teacher-layout h1 {
  font-size: clamp(34px, 4vw, 46px);
  margin-bottom: 14px;
}
.teacher-layout > .muted {
  max-width: 640px;
  font-size: 17px;
}
.teacher-login {
  max-width: 520px;
  margin: 32px 0;
}
.teacher-login h2 {
  margin-top: 0;
}
.teacher-login .muted {
  font-size: 14px;
}
.teacher-login .primary {
  margin-top: 18px;
  width: 100%;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 22px 0;
}
.toolbar h2 {
  margin: 0 auto 0 0;
}
.create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  gap: 16px;
  align-items: end;
}
.create-form label {
  margin-top: 0;
  margin-bottom: 0;
}
.create-form input {
  margin-top: 8px;
}
.class-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}
.class-list button {
  text-align: left;
  color: #20334d;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 180px;
}
.class-list button[aria-pressed=true] {
  border-color: var(--blue);
  background: #edf4ff;
  box-shadow: 0 0 0 1px var(--blue);
}
.class-list span {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 400;
  color: var(--muted);
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid #e2e7ee;
}
td button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12px;
  margin: 3px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.city-card {
  border: 1px solid #c5d4e7;
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  break-inside: avoid;
}
.city-card .eyebrow {
  font-size: 9px;
}
.card-code {
  font-size: 22px;
  font-weight: 750;
  margin: 8px 0;
}
.card-words {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
[hidden] {
  display: none !important;
}
@media (min-width: 801px) and (max-height: 740px) {
  .child-layout {
    margin-top: 18px;
    margin-bottom: 20px;
  }
  .intro h1 {
    font-size: 48px;
  }
  .intro-note {
    margin: 12px 0 18px;
    font-size: 16px;
  }
  .workspace-preview img {
    aspect-ratio: 2.6;
  }
  .login-panel {
    padding: 24px;
  }
  .login-panel h2 {
    margin: 18px 0 8px;
  }
  .login-panel label {
    margin-top: 18px;
  }
  .login-panel .word-fields label {
    margin-top: 0;
  }
  .login-panel fieldset {
    margin-top: 18px;
  }
}
@media (max-width: 800px) {
  .child-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: 26px;
  }
  .panel {
    padding: 24px;
  }
  .workspace-preview figcaption {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .workspace-list {
    gap: 8px 12px;
  }
  .create-form {
    grid-template-columns: minmax(0, 1fr) 100px;
  }
  .create-form button {
    grid-column: 1 / -1;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .masthead {
    padding: 18px 20px;
    gap: 12px;
  }
  .brand {
    font-size: 24px;
  }
  .account-navigation > a {
    padding-inline: 11px;
    font-size: 12px;
  }
  .child-layout {
    margin: 10px auto 12px;
    padding: 0 20px;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .intro .eyebrow {
    margin-bottom: 8px;
  }
  .intro h1 {
    margin-bottom: 10px;
  }
  h1 {
    font-size: 34px;
    line-height: 1.14;
  }
  .intro h1 br {
    display: none;
  }
  .chinese {
    font-size: 19px;
  }
  .intro-note {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    max-width: 340px;
  }
  .workspace-preview,
  .workspace-list {
    display: none;
  }
  .panel {
    border-radius: 22px;
  }
  .login-panel h2 {
    margin-top: 14px;
  }
  .teacher-layout {
    padding: 20px;
  }
  .teacher-layout > .staging {
    float: none;
    margin-bottom: 18px;
  }
  .teacher-layout > .muted {
    font-size: 15px;
  }
  .teacher-login {
    margin: 24px 0;
  }
  footer {
    padding: 20px;
    font-size: 11px;
    line-height: 1.6;
  }
  footer span {
    display: block;
    margin: 3px 0 0;
  }
}
@media (max-width: 380px) {
  .masthead {
    padding-inline: 16px;
    gap: 8px;
  }
  .brand {
    font-size: 22px;
  }
  .account-navigation > a {
    padding-inline: 9px;
    font-size: 11px;
  }
  .child-layout,
  .teacher-layout {
    padding-inline: 16px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  input {
    transition: none;
  }
}
@media (forced-colors: active) {
  .account-navigation > a[aria-current] {
    background: Canvas;
    border-color: Highlight;
    box-shadow: none;
  }
  .primary {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
  }
  input {
    border-color: ButtonText;
  }
}
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .masthead,
  .teacher-layout > :not(#dashboard),
  #dashboard > :not(#cards-section),
  #cards-section > :not(.cards),
  footer {
    display: none !important;
  }
  .teacher-layout {
    padding: 0;
    max-width: none;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .city-card {
    box-shadow: none;
  }
}
