:root {
  --ink: #17211f;
  --muted: #51615e;
  --line: #c8d2d0;
  --panel: #ffffff;
  --page: #eef2f1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.shell {
  width: min(1060px, calc(100vw - 24px));
  margin: 18px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(18px, 3vw, 34px);
  min-height: calc(100vh - 36px);
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  border: 1px solid #cfe0dc;
  border-radius: 18px;
  background: #f3faf8;
  padding: clamp(16px, 2.5vw, 24px);
}

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.back-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #9fb0ac;
  background: #263532;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; color: #183b36; }
h2 { margin: 0 0 16px; font-size: 28px; }
.sub { margin-top: 8px; color: var(--muted); font-size: clamp(18px, 2.4vw, 24px); }
.clock { text-align: right; white-space: nowrap; }
.clock-day { color: var(--muted); font-size: clamp(16px, 2.2vw, 22px); font-weight: 700; margin-bottom: 2px; }
.clock-time { color: #183b36; font-size: clamp(26px, 5vw, 42px); font-weight: 700; }

.nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid #bac6c3;
  background: #f7f9f8;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #f7f9f8;
  padding: clamp(18px, 3vw, 30px);
  margin-bottom: 22px;
}

.landing-hero {
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid #bed0cc;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.78) 0%, rgba(23, 33, 31, 0.52) 38%, rgba(23, 33, 31, 0.08) 72%),
    url("./assets/landing-background.png") center / cover no-repeat;
  display: flex;
  align-items: center;
  padding: clamp(22px, 5vw, 54px);
  margin-bottom: 18px;
}

.landing-copy {
  max-width: 560px;
  color: #ffffff;
}

.landing-copy h1 {
  color: #ffffff;
  font-size: clamp(44px, 8vw, 74px);
  margin: 0 0 14px;
}

.landing-copy p {
  margin: 0;
  font-size: clamp(19px, 2.6vw, 27px);
  line-height: 1.28;
}

.landing-kicker {
  color: #dcebe8;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.role-card {
  min-height: 150px;
  border-radius: 16px;
  border: 1px solid #b7c7c4;
  padding: 20px;
  background: #f7f9f8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.role-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.role-actions .button {
  flex: 1 1 96px;
}

.role-card span {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
}

.role-card small {
  color: #40504d;
  font-size: 16px;
  line-height: 1.28;
  margin-top: 16px;
}

.parent-role { background: #eef7f4; }
.student-role { background: #f3f0ff; }
.sna-role { background: #fff8e8; }

.demo-strip {
  border: 1px solid #c8d2d0;
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo-strip strong,
.demo-strip span {
  display: block;
}

.demo-strip strong {
  font-size: 20px;
  margin-bottom: 4px;
}

.demo-strip span {
  color: var(--muted);
  font-size: 16px;
}

.demo-students {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fact {
  border: 1px solid #b9c8c4;
  border-radius: 16px;
  background: #f2f6f5;
  padding: 14px 18px;
  margin-bottom: 18px;
  color: #263532;
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: 1.25;
}

.fact strong { display: block; font-size: 15px; color: #51615e; margin-bottom: 4px; }

.student-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.student-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #f7f9f8;
  padding: 22px;
}

.student-name { font-size: clamp(34px, 5vw, 54px); font-weight: 700; line-height: 1; }

.install-card {
  border: 1px solid #bac6c3;
  border-radius: 16px;
  background: #f7f9f8;
  padding: 16px;
  margin: 18px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.install-title { font-size: 20px; font-weight: 700; margin-bottom: 3px; }
.install-help { color: var(--muted); font-size: 16px; line-height: 1.25; }
.eyebrow { font-size: 17px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.hero-title { font-size: clamp(36px, 7vw, 70px); font-weight: 700; line-height: 1; margin: 0 0 14px; }
.detail { font-size: clamp(20px, 3vw, 30px); color: #263532; line-height: 1.25; }
.next-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.list { display: grid; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 112px 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 14px;
}

a.row { transition: transform 120ms ease, box-shadow 120ms ease; }
a.row:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(23, 33, 31, 0.10); }
.time { font-size: 18px; font-weight: 700; color: #263532; }
.subject { font-size: 25px; font-weight: 700; }
.folder { color: #40504d; font-size: 17px; white-space: nowrap; }
.subject-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(23, 33, 31, 0.12);
  background: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 2px 8px rgba(23, 33, 31, 0.08);
}

.subject-icon.large {
  width: clamp(72px, 12vw, 104px);
  height: clamp(72px, 12vw, 104px);
  border-radius: 22px;
  font-size: clamp(38px, 6vw, 62px);
  flex: 0 0 auto;
}

.subject-title {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

.maths { background: #dfeeff; border-color: #8cb8ec; color: #17446f; }
.english { background: #fff0f0; border-color: #df7777; color: #8f1f1f; }
.science { background: #e9f7ea; border-color: #9ccd9f; color: #246635; }
.history { background: #fff9df; border-color: #dbc970; color: #75610d; }
.pe { background: #f2e9ff; border-color: #bba3e6; color: #5b3b8c; }
.homeec { background: #ffe8d6; border-color: #dc9d73; color: #7b3e18; }
.irish { background: #e6f5ff; border-color: #7fb9d9; color: #155579; }
.sphe { background: #eef1ff; border-color: #9ca8e8; color: #37418f; }
.art { background: #ffeaf5; border-color: #dc88b5; color: #86345d; }
.religion { background: #edf7dd; border-color: #9dc96a; color: #4f721d; }
.german { background: #fff4c9; border-color: #d9b84f; color: #6c5511; }
.cspe { background: #e6f1ee; border-color: #8db7ae; color: #21564d; }
.geog { background: #e8f4dc; border-color: #8fbd68; color: #3f6723; }
.tutor { background: #e8edf0; border-color: #7e8f98; color: #273940; }
.home { background: #f0f1f1; border-color: #aeb7b5; color: #40504d; }
.break,
.lunch {
  background: #263532;
  border-color: #263532;
  color: #ffffff;
  box-shadow: inset 0 0 0 3px #ffffff, 0 0 0 1px #263532;
}
.break .time,
.break .folder,
.break .subject-icon,
.lunch .time,
.lunch .folder,
.lunch .subject-icon { color: #ffffff; }
.neutral { background: #f5f7f7; border-color: #d7dfdd; color: #51615e; }

.week {
  display: grid;
  grid-template-columns: 96px repeat(5, minmax(110px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.week-head, .week-time, .week-cell {
  min-height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.week-head { color: #263532; background: #f7f9f8; }
.week-time { color: #51615e; font-size: 15px; }
.week-cell {
  padding: 7px 8px;
  text-align: center;
  flex-direction: column;
  gap: 3px;
  line-height: 1.08;
}

.week-cell small {
  color: #40504d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.break small,
.lunch small { color: #ffffff; }

.books {
  border-radius: 16px;
  border: 1px solid #d7dfdd;
  background: #fffdf7;
  padding: 22px;
}

.books h2 { margin: 0 0 16px; font-size: 32px; }
.books h3 { margin: 20px 0 10px; font-size: 20px; color: #40504d; }
.books ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.books li { font-size: 22px; color: #263532; }
.books li:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border-radius: 5px;
  background: #2d6fb7;
  vertical-align: -2px;
}

.checkin {
  border-radius: 18px;
  border: 2px solid #9fb0ac;
  background: #fffdf7;
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 22px;
}

.checkin h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 42px); }
.checkin p { margin: 0 0 16px; font-size: clamp(19px, 2.5vw, 26px); color: #263532; line-height: 1.25; }
.checkin-group { margin-top: 16px; }
.checkin-label { font-size: 18px; font-weight: 700; color: #40504d; margin-bottom: 8px; }
.checkin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.checkin-actions .button[aria-pressed="true"] { background: #263532; border-color: #263532; color: #ffffff; }

.auth-panel,
.setup-panel {
  border-radius: 18px;
  border: 1px solid #c8d2d0;
  background: #f7f9f8;
  padding: clamp(18px, 3vw, 30px);
}

form { display: grid; gap: 14px; max-width: 520px; }
label { display: grid; gap: 6px; color: #263532; font-weight: 700; }
input { min-height: 44px; font-size: 18px; padding: 8px 10px; border: 1px solid #bac6c3; border-radius: 9px; }

.primary-button {
  background: #263532;
  border-color: #263532;
  color: #ffffff;
}

.quiet-link {
  color: #51615e;
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-note {
  margin: 0;
  color: #51615e;
  font-size: 16px;
  line-height: 1.35;
}

.error-note { color: #8f1f1f; }

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.timetable-draft {
  grid-column: 1 / -1;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.plain-list li {
  border-left: 6px solid #7eada5;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 20px;
  color: #263532;
}

@media (max-width: 720px) {
  .shell { width: min(100vw - 14px, 1060px); margin: 7px auto; border-radius: 18px; }
  .landing-hero { min-height: 380px; background-position: 62% center; }
  .top { display: block; }
  .clock { margin-top: 10px; text-align: left; }
  .install-card { display: block; }
  .install-card .button { width: 100%; margin-top: 12px; }
  .grid { grid-template-columns: 1fr; }
  .role-grid,
  .setup-grid { grid-template-columns: 1fr; }
  .demo-strip { display: block; }
  .demo-students { margin-top: 14px; }
  .demo-students .button { flex: 1 1 84px; }
  .student-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 96px 52px minmax(0, 1fr); }
  .folder { grid-column: 3; white-space: normal; }
  .subject-icon { width: 48px; height: 48px; font-size: 26px; }
  .week-cell small { font-size: 10px; }
}
