/* ---------- courses: a textbook's contents page ---------- */

.contents {
  display: grid;
  gap: 32px;
}
.contents-group-name {
  font-size: 1.375rem;
  line-height: 1.2;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}
.contents-list li {
  padding: 14px 0 14px;
  border-bottom: 1px solid var(--rule);
}
.contents-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}
.contents-title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.contents-line:hover .contents-title {
  text-decoration-color: currentColor;
}
.contents-dots {
  flex: 1 1 16px;
  min-width: 16px;
  border-bottom: 2px dotted var(--rule-strong);
  transform: translateY(-5px);
}
.contents-fee {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--graphite);
  text-align: right;
}
.contents-fee .per {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
}
.contents-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9688rem;
  line-height: 1.45;
  max-width: 60ch;
}

/* ---------- timetable: one line per batch, grouped by course ---------- */

.timetable,
.sheet,
.week {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.timetable,
.timetable tbody,
.timetable tr {
  display: block;
}
.timetable thead,
.sheet thead {
  display: none;
}
.timetable tbody + tbody {
  margin-top: 24px;
}
.tt-course th {
  display: block;
  padding: 0 0 8px;
  border-bottom: 2px solid var(--ink);
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}
.tt-course a {
  text-decoration: none;
}
.tt-course a:hover {
  text-decoration: underline;
}
.timetable .tt-row {
  display: grid;
  grid-template-columns: 7.75rem minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.tt-row > * {
  display: block;
  padding: 0;
  text-align: left;
}
.tt-time {
  grid-column: 1;
  grid-row: 1;
  font-weight: 600;
  color: var(--ink);
}
.tt-days {
  grid-column: 2;
  grid-row: 1;
}
.tt-seats {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
  font-weight: 600;
}
.timetable .tt-batch {
  grid-column: 1 / 3;
  grid-row: 2;
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--muted);
}
.timetable .tt-branch {
  grid-column: 3;
  grid-row: 2;
  text-align: right;
  font-size: 0.9375rem;
  color: var(--muted);
}
.tt-starts {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
}
.tt-row.is-full .tt-seats,
.tt-row.is-full .tt-time {
  color: var(--muted);
}

/* the mark sheet, as rows of four figures on a phone */
.sheet tbody {
  display: grid;
  gap: 12px;
}
.sheet tr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 14px 14px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}
.sheet th,
.sheet td {
  display: block;
  padding: 0;
  text-align: left;
}
.sheet th[scope="row"] {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
}
.sheet td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.75rem;
  line-height: 1.25;
  min-height: 2.5em;
  color: var(--muted);
}

/* ---------- results: the mark sheet ---------- */

.sheet-wrap {
  margin-bottom: 32px;
}
.sheet td:first-child {
  display: none;
}
.sheet .num {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--graphite);
}
.sheet .pct {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}
.sheet-note {
  margin-top: 16px;
  color: var(--muted);
  max-width: 62ch;
}
.year-label {
  font-size: 1.75rem;
  margin: 8px 0 12px;
}
.toppers-year + .toppers-year {
  margin-top: 40px;
}

.toppers {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.topper {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 4px 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.face {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
}
.face-initials {
  display: grid;
  place-items: center;
  background: var(--leaf);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.25rem;
  background-image: linear-gradient(to right, transparent 7px, var(--red) 7px, var(--red) 8.5px, transparent 8.5px);
}
.topper-name {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.25;
}
.topper-exam,
.topper-since {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.35;
}
.topper-score {
  text-align: right;
  font-size: 1.5rem;
  line-height: 1;
}
.topper-highlight {
  display: block;
  margin-top: 6px;
  font-family: var(--hand);
  font-size: 0.9375rem;
  line-height: 1.2;
  color: var(--red);
  font-stretch: 100%;
}
.topper-quote {
  grid-column: 2 / -1;
  margin-top: 8px;
  font-size: 1rem;
  color: var(--graphite);
  max-width: 56ch;
}
.topper-quote::before {
  content: "“";
}
.topper-quote::after {
  content: "”";
}

/* ---------- faculty: the staff register ---------- */

.register {
  border-top: 2px solid var(--ink);
}
.teacher {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.teacher-name {
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.25;
}
.teacher-subject {
  color: var(--ink);
  font-weight: 600;
}
.teacher-subject span {
  color: var(--muted);
  font-weight: 400;
}
.teacher-about {
  margin-top: 8px;
  max-width: 58ch;
}
.teacher-facts {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.9375rem;
}
.teacher-facts div {
  display: flex;
  gap: 6px;
}
.teacher-facts dt {
  color: var(--muted);
}
.teacher-facts dd {
  font-weight: 600;
}

/* ---------- steps (a real sequence) ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 14px 52px;
  min-height: 56px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 36px;
  font-stretch: 75%;
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
  text-align: center;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 44px;
  bottom: 0;
  border-left: 2px dotted var(--rule-strong);
}
.step-title {
  font-size: 1.25rem;
  line-height: 1.2;
}
.step-text {
  margin-top: 4px;
  max-width: 46ch;
}

/* ---------- demo and forms ---------- */

.demo-grid {
  display: grid;
  gap: 32px;
}
.demo-page h1 {
  margin-bottom: 16px;
}
.form-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 16px 24px;
}
.form-aside {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule-strong);
  font-size: 1rem;
}
.ticks {
  display: grid;
  gap: 10px;
  margin: 8px 0 24px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  max-width: 56ch;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg);
}

/* The platform renders every form; these are its classes. */
.form .unrigid-field {
  margin-bottom: 18px;
}
.form label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--graphite);
}
.form .unrigid-required {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.875rem;
}
.form input[type="text"],
.form input[type="tel"],
.form input[type="email"],
.form input[type="date"],
.form input[type="number"],
.form input[type="url"],
.form select,
.form textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--graphite);
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
}
.form textarea {
  min-height: 110px;
  resize: vertical;
}
.form select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%231e3a94' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}
.form .unrigid-help {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.4;
}
.form input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--ink);
}
.form .unrigid-field-checkbox,
.form .unrigid-field-consent {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}
.form .unrigid-field-checkbox label,
.form .unrigid-field-consent label {
  flex: 1 1 0;
  font-weight: 400;
  margin: 0;
}
.form button[type="submit"] {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 20px;
  font: inherit;
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.form button[type="submit"]:hover:not([disabled]) {
  background: var(--ink-deep);
}
.form .unrigid-success-message {
  color: var(--ink);
}

/* ---------- voices ---------- */

.voices {
  display: grid;
  gap: 28px;
}
.voices blockquote p {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--graphite);
  max-width: 40ch;
}
.voices blockquote p::before {
  content: "“";
}
.voices blockquote p::after {
  content: "”";
}
.voice-by {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- notices, questions ---------- */

.notices {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}
.notice {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.notice-date {
  font-size: 0.875rem;
  color: var(--muted);
}
.notice-title {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  margin-top: 2px;
}
.notice-text {
  margin-top: 4px;
  max-width: 58ch;
}
.faq {
  border-top: 2px solid var(--ink);
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  position: relative;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  cursor: pointer;
  color: var(--graphite);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 14px no-repeat;
}
.faq details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat;
}
.faq details p {
  padding: 0 0 18px;
  max-width: 62ch;
}

/* ---------- visit ---------- */

.branches {
  display: grid;
  gap: 24px;
}
.branch {
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}
.branch h3 {
  font-stretch: 75%;
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.branch p + p {
  margin-top: 4px;
}
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- course page ---------- */

.facts {
  display: grid;
  gap: 0;
  margin-top: var(--line);
  border-top: 1px solid var(--rule-strong);
  max-width: 44rem;
}
.facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  font-weight: 400;
}
.fact-fee strong {
  font-size: 1.25rem;
  color: var(--ink);
}
.fact-note {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9375rem;
}
.batch-list {
  display: grid;
  gap: 12px;
}
.batch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 16px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
}
.batch-name {
  font-weight: 600;
  font-size: 1.125rem;
}
.batch-when {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.batch-time {
  font-weight: 600;
  color: var(--ink);
}
.batch-where {
  color: var(--muted);
}
.batch-seats {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  font-weight: 600;
}
.batch.is-full {
  border-left-color: var(--rule-strong);
}
.batch.is-full .batch-seats {
  color: var(--muted);
}
.week th {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px 10px 0;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.week td {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.fee-notes {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  max-width: 64ch;
}
.fee-notes strong {
  color: var(--ink);
}

/* ---------- thanks ---------- */

.thanks {
  padding-top: 48px;
}
.thanks-tick {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 16px;
}
.thanks h1 {
  margin-bottom: 16px;
}

/* ---------- footer: the notebook's back cover ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--ink-deep);
  color: #e8edf8;
  padding: 48px 0 24px;
}
.site-footer a {
  color: #fff;
}
.site-footer .muted {
  color: #b9c4dc;
}
.site-footer h2 {
  color: #fff;
  font-size: 1.375rem;
  margin-bottom: 8px;
}
.footer-grid {
  display: grid;
  gap: 32px;
}
.site-footer .logo-name {
  color: #fff;
}
.site-footer .logo-place {
  display: block;
  color: #b9c4dc;
}
.footer-id p {
  margin-top: 12px;
}
.footer-promise {
  font-size: 1.125rem;
}
.footer-links ul {
  display: grid;
  gap: 6px;
}
.footer-social {
  margin-top: 16px;
}
.footer-base {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
  color: #b9c4dc;
  display: grid;
  gap: 4px;
}

/* ---------- phone action bar ---------- */

.action-bar {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.5fr;
  gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--rule-strong);
  box-shadow: 0 -6px 18px rgba(20, 39, 95, 0.1);
}
.action-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  color: var(--ink);
}
.action-bar .ab-wa {
  background: var(--wa);
  border-color: var(--wa);
  color: #fff;
}
.action-bar .ab-demo {
  background: var(--ink);
  color: #fff;
}
