/* No font service or CDN needed. System fonts keep this fast and offline. */
:root {
  color-scheme: dark;
  --bg: #101412;
  --panel: #191e1a;
  --line: #30382f;
  --ink: #f3f5ed;
  --muted: #b0b9ab;
  --lime: #c7f77b;
  --amber: #f0ce7a;
  --red: #ff9992;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.topbar {
  max-width: 1240px;
  margin: auto;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 64px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
}
.accent {
  color: var(--lime);
}
.brand-icon {
  display: inline-flex;
  background: var(--lime);
  color: var(--bg);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  font-size: 29px;
  line-height: 1;
}
.brand-icon span {
  font-size: 19px;
}
.topbar nav {
  display: flex;
  gap: 30px;
  font-size: 13px;
}
.topbar nav a:last-child {
  color: var(--muted);
}
.topbar nav span {
  margin-left: 5px;
}
.local-badge {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 30px;
  white-space: nowrap;
}
.dot,
.legend i,
.plan-key i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
}
.dot,
.safe-dot {
  background: var(--lime);
}
.warning-dot {
  background: var(--amber);
}
.danger-dot {
  background: var(--red);
}
.plan-dot {
  background: #a9bfff;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 0 36px;
}
.hero {
  padding: 64px 0 50px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 36px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 16px;
}
.line {
  display: inline-block;
  width: 24px;
  border-top: 2px solid var(--lime);
  vertical-align: middle;
  margin-right: 8px;
}
h1 {
  font-size: clamp(52px, 6.5vw, 88px);
  line-height: 1.01;
  letter-spacing: -5px;
  margin: 0 0 24px;
  font-weight: 700;
}
h1 span {
  color: var(--lime);
}
.intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.primary {
  background: var(--lime);
  color: #172014;
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  padding: 12px 20px;
  font-weight: 700;
}
.primary:hover {
  background: #dafba7;
}
.text-link {
  font-size: 12px;
  color: var(--ink);
  padding: 12px 0;
}
.hero-visual {
  min-height: 310px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  background: radial-gradient(
    ellipse,
    rgba(199, 247, 123, 0.05),
    transparent 70%
  );
}
.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 290px;
  height: 290px;
  transform: rotate(-25deg);
}
.orbit-one {
  width: 360px;
  height: 210px;
  transform: rotate(-35deg);
  border-style: dashed;
  opacity: 0.6;
}
.orbit-two:after {
  content: "";
  position: absolute;
  right: 21px;
  top: 37px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 25px #c7f77b55;
}
.target {
  width: 236px;
  height: 236px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: conic-gradient(from 36deg, var(--lime) 0 75%, #303a2b 75% 100%);
  position: relative;
}
.target:before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 0;
}
.target > * {
  z-index: 1;
}
.target .eyebrow {
  font-size: 8px;
  margin: 0;
}
.target strong {
  font-size: 76px;
  letter-spacing: -5px;
  line-height: 1.25;
}
.target strong span {
  font-size: 32px;
  letter-spacing: -1px;
}
.target > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.float-label {
  position: absolute;
  bottom: -1px;
  right: 12px;
  border: 1px solid var(--line);
  background: #1d241b;
  padding: 9px 13px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--lime);
  transform: rotate(-4deg);
}
.notice {
  border: 1px solid #394630;
  background: #1d2519;
  border-radius: 8px;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.notice strong {
  color: #d9e1d1;
}
.notice-mark {
  border: 1px solid var(--lime);
  color: var(--lime);
  padding: 0 5px;
  border-radius: 50%;
  margin-right: 6px;
}
.notice button {
  background: none;
  border: 0;
  color: var(--lime);
  font-size: 12px;
  white-space: nowrap;
  min-height: 44px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.2fr;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.stats > div {
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  border: 0;
}
.stat-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  display: block;
  color: var(--muted);
}
.stats strong {
  display: block;
  font-size: 36px;
  letter-spacing: -1.5px;
  line-height: 1.5;
}
.stats > div > span:last-child {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.stats .unit {
  font-size: 19px;
  color: var(--muted);
  letter-spacing: 0;
}
.stat-note {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat-note .spark {
  color: var(--lime);
  font-size: 42px;
}
.stat-note p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.stat-note p strong {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--ink);
}
.section {
  padding-top: 40px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}
.section-heading .eyebrow {
  margin-bottom: 8px;
}
h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin: 0;
}
h2 span {
  color: var(--lime);
}
.legend,
.plan-key {
  display: flex;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.subject-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 21px;
  min-width: 0;
  --status: var(--lime);
}
.subject-card.warning {
  --status: var(--amber);
}
.subject-card.danger {
  --status: var(--red);
}
.subject-card.empty {
  --status: var(--muted);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.subject-code {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #293024;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--status);
}
.status {
  color: var(--status);
  font-size: 10px;
  border: 1px solid color-mix(in srgb, var(--status) 25%, transparent);
  border-radius: 20px;
  padding: 3px 8px;
}
.subject-card h3 {
  font-size: 15px;
  margin: 17px 0 12px;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.attendance-num {
  font-size: 37px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
}
.attendance-num small {
  font-size: 17px;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
}
.class-count {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 16px;
}
.meter {
  height: 5px;
  background: #333a30;
  border-radius: 8px;
  position: relative;
}
.meter-fill {
  height: 100%;
  background: var(--status);
  border-radius: 8px;
}
.meter:after {
  content: "";
  position: absolute;
  left: 75%;
  top: -3px;
  height: 11px;
  width: 2px;
  background: var(--ink);
}
.buffer {
  font-size: 12px;
  min-height: 40px;
  margin: 18px 0 12px;
  color: var(--muted);
}
.buffer strong {
  color: var(--status);
  font-weight: 700;
}
.card-controls {
  display: flex;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}
.card-controls button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  padding: 7px 9px;
  min-height: 38px;
}
.card-controls button:hover {
  border-color: var(--muted);
  color: var(--ink);
}
.card-controls button:first-child {
  color: var(--lime);
}
.card-controls button:last-child {
  margin-left: auto;
}
.small-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 16px;
}
.empty-state {
  border: 1px dashed var(--line);
  padding: 32px;
  border-radius: 12px;
  grid-column: 1/-1;
  color: var(--muted);
}
.planner {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 48px;
  margin-top: 18px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.planner-intro h2 {
  font-size: 34px;
}
.planner-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  max-width: 310px;
}
.planner-intro > p.small-note {
  font-size: 11px;
}
.weeks-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  margin: 22px 0;
}
.weeks-label select {
  border: 1px solid var(--line);
  padding: 9px 12px;
  background: #242d20;
  color: var(--lime);
  border-radius: 6px;
  font-weight: 700;
  min-height: 44px;
}
.plan-key {
  margin: 20px 0;
}
.plan-results {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 22px;
  min-width: 0;
}
.plan-row {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.plan-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.plan-row-title strong {
  overflow-wrap: anywhere;
}
.plan-row-title > span {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.plan-inputs {
  display: flex;
  gap: 16px;
  margin: 11px 0;
}
.plan-inputs label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.plan-inputs input {
  width: 48px;
  min-height: 34px;
  padding: 4px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.project-result {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding-top: 5px;
  flex-wrap: wrap;
}
.project-result:first-child {
  color: var(--lime);
}
.project-result:last-child {
  color: #b8c8ff;
}
.project-result.below strong {
  color: var(--red);
}
.mini-track {
  display: block;
  height: 3px;
  background: #30362e;
  margin-top: 7px;
  width: 100%;
}
.mini-track span {
  display: block;
  background: currentColor;
  height: 100%;
  max-width: 100%;
}
.plan-summary {
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
}
.plan-summary strong {
  color: var(--lime);
}
.plan-summary .bad {
  color: var(--red);
}
.bottom-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 0;
}
.bottom-strip strong {
  font-size: 13px;
}
.bottom-strip p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}
.backup-actions {
  display: flex;
  gap: 8px;
}
.secondary {
  min-height: 44px;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 11px;
}
footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
footer .brand {
  font-size: 18px;
  color: var(--ink);
}
footer p {
  font-size: 11px;
}
footer > span {
  margin-left: auto;
  text-align: right;
  font-size: 9px;
  line-height: 1.7;
}
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 460px;
  width: calc(100% - 32px);
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading h2 {
  font-size: 26px;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  width: 44px;
  height: 44px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
}
form input {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 44px;
  padding: 10px;
  margin-top: 6px;
  color: var(--ink);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid label {
  margin: 0;
}
.error {
  color: var(--red);
  font-size: 12px;
}
form > .primary {
  width: 100%;
}
.delete-subject {
  margin-top: 12px;
  width: 100%;
  min-height: 44px;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #e4efdb;
  color: #172014;
  border-radius: 8px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px #0008;
  font-size: 12px;
  z-index: 5;
  max-width: calc(100% - 24px);
  width: max-content;
}
.toast button {
  margin-left: 14px;
  border: 0;
  background: none;
  font-weight: 700;
  color: #233a18;
  text-decoration: underline;
  min-height: 32px;
}
.toast[hidden],
[hidden] {
  display: none !important;
}
@media (min-width: 1400px) {
  .hero {
    padding-top: 78px;
    padding-bottom: 62px;
  }
}
@media (max-width: 950px) {
  .topbar {
    gap: 32px;
  }
  .hero-actions {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }
  .hero-visual {
    transform: scale(0.85);
  }
  .subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat-note {
    display: none !important;
  }
  .stats > div:nth-child(3) {
    border: 0;
  }
  .planner {
    gap: 24px;
    grid-template-columns: 1fr 1.35fr;
  }
  .plan-inputs {
    gap: 8px;
    flex-wrap: wrap;
  }
  .planner-intro h2 {
    font-size: 29px;
  }
}
@media (max-width: 650px) {
  .topbar {
    padding: 20px;
    gap: 20px;
  }
  .topbar nav {
    margin-left: auto;
  }
  .topbar nav a:first-child,
  .local-badge {
    display: none;
  }
  main {
    padding: 0 20px;
  }
  .hero {
    display: block;
    padding: 40px 0 32px;
  }
  .hero h1 {
    font-size: 64px;
    letter-spacing: -3.5px;
  }
  .hero .intro {
    font-size: 14px;
  }
  .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
  }
  .hero-visual {
    min-height: 265px;
    margin: 14px -10px 0;
    transform: scale(0.85);
  }
  .float-label {
    right: 0;
    bottom: -4px;
  }
  .notice {
    align-items: start;
    flex-direction: column;
    gap: 4px;
    padding: 13px;
  }
  .notice button {
    padding: 0;
    min-height: 32px;
  }
  .stats {
    gap: 10px;
    padding: 24px 0;
  }
  .stat-label {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .stats strong {
    font-size: 30px;
  }
  .stats > div > span:last-child {
    font-size: 9px;
    max-width: 94px;
  }
  .stats .unit {
    font-size: 14px;
  }
  .section {
    padding-top: 30px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  h2 {
    font-size: 30px;
  }
  .subject-grid {
    grid-template-columns: 1fr;
  }
  .subject-card {
    padding: 20px;
  }
  .card-controls button {
    font-size: 11px;
    min-height: 44px;
  }
  .planner {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 0;
  }
  .planner-intro > p:not(.eyebrow) {
    max-width: none;
  }
  .planner-intro h2 {
    font-size: 32px;
  }
  .planner-intro h2 br {
    display: none;
  }
  .plan-results {
    padding: 4px 16px;
  }
  .plan-inputs {
    gap: 18px;
  }
  .plan-inputs input {
    min-height: 44px;
  }
  .bottom-strip {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .backup-actions {
    flex-wrap: wrap;
  }
  footer {
    flex-wrap: wrap;
    gap: 10px 20px;
  }
  footer > span {
    width: 100%;
    text-align: left;
    margin: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid label {
    margin: 8px 0;
  }
  .legend {
    font-size: 11px;
  }
  .hero .eyebrow {
    letter-spacing: 1.5px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.target strong #hero-target {
  font-size: 76px;
  letter-spacing: -5px;
}
.target-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.target-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.target-settings input {
  width: 65px;
  min-height: 44px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--lime);
  font-weight: 700;
}
.target-settings > span {
  color: var(--muted);
  font-size: 11px;
}
.meter:after {
  left: var(--threshold, 75%);
}
@media (max-width: 650px) {
  .target-settings {
    flex-direction: column;
    align-items: start;
  }
}
@media (max-width: 650px) {
  .hero-visual {
    overflow: hidden;
  }
  .orbit-one {
    width: 300px;
    height: 180px;
  }
  .orbit-two {
    width: 260px;
    height: 260px;
  }
}
