:root {
  color-scheme: light;
  --ink: #173d36;
  --ink-deep: #0f2c28;
  --ink-soft: #47635e;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --line: #d9ddd5;
  --line-strong: #bdc9c2;
  --mint: #d9ebe3;
  --mint-bright: #8ecbb3;
  --gold: #e5b85c;
  --gold-soft: #f4e6bd;
  --coral: #d98369;
  --blue: #789eae;
  --violet: #998bae;
  --danger: #a43d31;
  --shadow: 0 22px 60px rgb(23 61 54 / 10%);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-deep);
  background:
    radial-gradient(circle at 10% 4%, rgb(217 235 227 / 70%), transparent 25rem),
    var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: white;
  background: var(--ink-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  padding: 1.6rem 0;
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.8rem;
  color: var(--surface);
  background: var(--ink);
  font-weight: 800;
  box-shadow: inset 0 -3px rgb(0 0 0 / 10%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.header-link {
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.header-link:hover {
  color: var(--ink-deep);
  border-color: var(--ink);
}

.hero {
  width: min(calc(100% - 3rem), 920px);
  margin: 5.5rem auto 4.75rem;
  text-align: center;
}

.hero__eyebrow,
.kicker {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__eyebrow {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
}

.hero__eyebrow span {
  width: 1.7rem;
  height: 2px;
  background: var(--gold);
}

.hero h1 {
  max-width: 810px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero > p {
  max-width: 660px;
  margin: 1.8rem auto 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.hero__facts {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 248 / 68%);
  box-shadow: 0 8px 25px rgb(23 61 54 / 5%);
}

.hero__facts span {
  padding: 0.65rem 1rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.hero__facts span + span {
  border-left: 1px solid var(--line);
}

.hero__facts strong {
  margin-right: 0.25rem;
  color: var(--ink-deep);
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgb(23 61 54 / 8%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.config-panel,
.results-panel {
  padding: clamp(2rem, 5vw, 3.4rem);
}

.config-panel {
  padding: clamp(1.75rem, 3.5vw, 2.6rem);
}

.section-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2.4rem;
}

.section-heading--wide {
  width: min(100%, var(--content-width));
  margin-right: auto;
  margin-left: auto;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.section-heading h2,
.results-panel h2,
.lesson-section h2,
.faq-section h2,
.method-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.form-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field + .form-field {
  margin-top: 2.3rem;
  padding-top: 2.3rem;
  border-top: 1px solid var(--line);
}

.configuration-form {
  display: grid;
  gap: 1.15rem;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-field--school {
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.form-field--compact,
.form-field--assignment {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
}

.config-grid .form-field + .form-field,
.form-field--assignment + .form-field--assignment {
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 1.15rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.form-section > legend {
  padding: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.form-section__intro {
  margin: 0.3rem 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.assignment-grid__generated {
  display: contents;
}

.form-field--assignment .field-heading {
  gap: 0.55rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.form-field--assignment .field-heading > label {
  padding-top: 0.25rem;
  font-size: 0.76rem;
  line-height: 1.25;
}

.form-field--assignment .number-suffix input {
  width: 3.4rem;
  padding: 0.28rem 0.1rem 0.28rem 0.35rem;
  font-size: 0.78rem;
}

.form-field--assignment .number-suffix span {
  padding-right: 0.4rem;
  font-size: 0.66rem;
}

.form-field--assignment .range {
  margin-top: 0.45rem;
}

.form-field--assignment .range-labels {
  margin-top: 0.3rem;
  font-size: 0.62rem;
}

.form-field--assignment .field-help,
.form-field--assignment .field-error {
  margin-top: 0.3rem;
  font-size: 0.65rem;
}

.form-field--vacation {
  margin: 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
}

.area-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  margin-left: 0.25rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  color: var(--ink);
  background: var(--mint);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.area-badge--relief {
  color: #7d3428;
  background: #f4d7cf;
}

.form-field legend,
.field-heading > label {
  margin-bottom: 0.9rem;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 750;
}

.field-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.field-heading > label {
  margin: 0;
}

.school-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.school-option {
  position: relative;
  cursor: pointer;
}

.school-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.school-option__content {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 4.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: 160ms ease;
}

.school-option input:checked + .school-option__content {
  border-color: var(--ink);
  background: var(--mint);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.school-option input:focus-visible + .school-option__content {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.school-option__icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.7rem;
  font-weight: 850;
}

.school-option input:checked + .school-option__content .school-option__icon {
  color: white;
  background: var(--ink);
}

.school-option strong,
.school-option small {
  display: block;
}

.school-option strong {
  font-size: 0.88rem;
}

.school-option small {
  margin-top: 0.12rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.number-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: #fff;
}

.number-suffix:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--mint);
}

.number-suffix input {
  width: 5rem;
  padding: 0.45rem 0.2rem 0.45rem 0.65rem;
  border: 0;
  outline: 0;
  color: var(--ink-deep);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: right;
}

.number-suffix span {
  padding-right: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.range {
  width: 100%;
  height: 0.4rem;
  margin: 0.65rem 0 0;
  border-radius: 999px;
  outline: 0;
  background: var(--mint);
  accent-color: var(--ink);
  cursor: pointer;
  appearance: none;
}

.range::-webkit-slider-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 3px 8px rgb(23 61 54 / 25%);
  appearance: none;
}

.range::-moz-range-thumb {
  width: 0.8rem;
  height: 0.8rem;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 3px 8px rgb(23 61 54 / 25%);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.field-help,
.field-context,
.field-error {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
}

.field-help {
  color: var(--ink-soft);
}

.field-context {
  padding-left: 0.65rem;
  border-left: 2px solid var(--gold);
  color: var(--ink);
}

.field-context--summary {
  margin: -0.45rem 0 0;
}

.field-error--summary:empty {
  display: none;
}

.field-error {
  min-height: 1.1em;
  color: var(--danger);
  font-weight: 700;
}

input[aria-invalid="true"] {
  color: var(--danger);
}

.reset-button {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 1.6rem;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.reset-button:hover {
  color: var(--ink-deep);
  border-color: var(--ink);
}

.results-panel {
  position: relative;
  color: white;
  background:
    radial-gradient(circle at 100% 0, rgb(142 203 179 / 22%), transparent 18rem),
    linear-gradient(145deg, #1c4a41, var(--ink-deep));
}

.results-panel::after {
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.results-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.kicker--light {
  color: #b8d5ca;
}

.result-status {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 999px;
  color: #c6ddd5;
  background: rgb(255 255 255 / 5%);
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.result-status span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 0 3px rgb(142 203 179 / 14%);
}

.weekly-result {
  position: relative;
  z-index: 1;
  margin: clamp(3rem, 8vw, 5.4rem) 0 0.3rem;
}

.weekly-result strong,
.weekly-result span {
  display: block;
}

.weekly-result strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
}

.weekly-result span {
  margin-top: 0.65rem;
  color: #b8d5ca;
  font-size: 0.88rem;
}

.vacation-context {
  display: inline-flex;
  position: relative;
  z-index: 1;
  margin: 1.15rem 0 2.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  color: var(--gold-soft);
  background: rgb(229 184 92 / 10%);
  font-size: 0.72rem;
  font-weight: 700;
}

.distribution {
  position: relative;
  z-index: 1;
}

.distribution__bar {
  display: flex;
  gap: 3px;
  height: 0.6rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
}

.distribution__teaching,
.distribution__other,
.distribution__relief {
  display: block;
  transition: width 250ms ease;
}

.distribution__teaching {
  background: var(--mint-bright);
}

.distribution__other {
  background: var(--gold);
}

.distribution__relief {
  background: var(--coral);
}

.distribution__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  color: #b8d5ca;
  font-size: 0.67rem;
}

.dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  border-radius: 50%;
}

.dot--teaching {
  background: var(--mint-bright);
}

.dot--other {
  background: var(--gold);
}

.dot--relief {
  background: var(--coral);
}

.result-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2.5rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgb(255 255 255 / 13%);
}

.result-facts div + div {
  padding-left: 1.5rem;
  border-left: 1px solid rgb(255 255 255 / 13%);
}

.result-facts dt {
  color: #9fc1b5;
  font-size: 0.68rem;
}

.result-facts dd {
  margin: 0.25rem 0 0;
  color: white;
  font-size: 0.96rem;
  font-weight: 750;
}

.invalid-message {
  display: none;
  position: relative;
  z-index: 2;
  margin: 3rem 0 0;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 7%);
}

.results--unavailable .weekly-result,
.results--unavailable .vacation-context,
.results--unavailable .distribution,
.results--unavailable .result-facts {
  display: none;
}

.results--unavailable .invalid-message {
  display: block;
}

.has-invalid-config .category-list,
.has-invalid-config .lesson-card {
  opacity: 0.38;
  filter: grayscale(0.8);
  pointer-events: none;
}

.details-section,
.faq-section,
.method-section {
  width: min(calc(100% - 3rem), var(--content-width));
  margin: clamp(6rem, 11vw, 9rem) auto;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.faq-grid article {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.faq-grid h3 {
  margin: 0;
  font-size: 0.92rem;
}

.faq-grid p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.category-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 7.5rem;
  padding: 1.35rem 1.6rem 1.35rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgb(23 61 54 / 7%);
}

.category__marker {
  align-self: stretch;
  border-radius: 0 5px 5px 0;
  background: var(--mint-bright);
}

.category--consulting .category__marker {
  background: var(--gold);
}

.category--school-development .category__marker {
  background: var(--blue);
}

.category--training .category__marker {
  background: var(--violet);
}

.category--relief .category__marker {
  background: var(--coral);
}

.category__heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.category h3 {
  margin: 0;
  font-size: 0.96rem;
}

.category__share {
  padding: 0.17rem 0.45rem;
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 0.65rem;
  font-weight: 800;
}

.category__content p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.category__values {
  min-width: 12.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  text-align: right;
}

.category__values strong,
.category__values span {
  display: block;
}

.category__values strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.category__values span {
  color: var(--ink-soft);
  font-size: 0.67rem;
}

.lesson-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(540px, 1.3fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  width: min(calc(100% - 3rem), var(--content-width));
  margin: clamp(6rem, 11vw, 9rem) auto;
  padding: clamp(2.2rem, 6vw, 4rem);
  border-radius: var(--radius-lg);
  background: var(--gold-soft);
}

.lesson-section__intro > p:last-child {
  max-width: 32rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.lesson-card {
  padding: 1.8rem;
  border: 1px solid rgb(23 61 54 / 12%);
  border-radius: var(--radius-md);
  background: rgb(255 253 248 / 72%);
  box-shadow: 0 15px 35px rgb(91 73 29 / 8%);
}

.lesson-card__calculation {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.lesson-card__calculation > div > span,
.lesson-card__time-values span,
.lesson-card strong,
.lesson-card small {
  display: block;
}

.lesson-card__calculation > div > span,
.lesson-card__time-values span {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.lesson-card strong {
  margin: 0.35rem 0 0.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.lesson-card small {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.lesson-card__operator {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-weight: 800;
}

.lesson-card__time-values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgb(23 61 54 / 12%);
}

.lesson-card__time-values > div:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid rgb(23 61 54 / 12%);
}

.lesson-card__time-values > div:nth-child(n + 3) {
  margin-top: 0.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(23 61 54 / 12%);
}

.lesson-card__time-values strong {
  font-size: 1.15rem;
}

.lesson-card__note {
  margin: 1.1rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  color: var(--ink-soft);
  background: rgb(229 184 92 / 15%);
  font-size: 0.7rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.method-grid article {
  padding: 1.6rem;
  border-top: 2px solid var(--ink);
  background: rgb(255 253 248 / 55%);
}

.method-number {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.method-grid h3 {
  margin: 1.3rem 0 0.45rem;
  font-size: 0.92rem;
}

.method-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.source-note {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid #d6c38e;
  border-radius: var(--radius-md);
  background: #fbf2d9;
}

.source-note__icon {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.source-note h3,
.sources h3 {
  margin: 0;
  font-size: 0.9rem;
}

.source-note p {
  margin: 0.35rem 0 0;
  color: #5d5336;
  font-size: 0.78rem;
}

.source-note--green {
  margin-top: 0.8rem;
  border-color: var(--line-strong);
  background: var(--mint);
}

.source-note--green p {
  color: var(--ink-soft);
}

.source-note--green .source-note__icon {
  font-family: inherit;
  font-size: 0.62rem;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.3rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sources h3 {
  margin-right: auto;
}

.sources a {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  text-underline-offset: 0.2rem;
}

.sources a:hover {
  color: var(--coral);
}

.sources p {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.66rem;
}

footer {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
}

footer p {
  max-width: 34rem;
  margin: 0;
}

footer div p + p {
  margin-top: 0.35rem;
}

footer a {
  color: var(--ink-deep);
  text-underline-offset: 0.16em;
}

footer a:hover {
  color: var(--coral);
}

.footer-contact {
  flex: 0 0 auto;
  text-align: right;
}

@media (max-width: 900px) {
  .calculator-shell {
    grid-template-columns: 1fr;
  }

  .lesson-section {
    grid-template-columns: 1fr;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1rem;
  }

  .method-number {
    grid-row: 1 / 3;
  }

  .method-grid h3 {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .calculator-shell,
  .details-section,
  .lesson-section,
  .faq-section,
  .method-section,
  footer {
    width: min(calc(100% - 1.5rem), var(--content-width));
  }

  .site-header {
    padding: 1rem 0;
  }

  .header-link {
    display: none;
  }

  .hero {
    margin-top: 3.5rem;
    margin-bottom: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .hero__facts {
    display: grid;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .hero__facts span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .config-panel,
  .results-panel {
    padding: 1.6rem 1.25rem;
  }

  .school-options {
    grid-template-columns: 1fr;
  }

  .config-grid,
  .assignment-grid {
    grid-template-columns: 1fr;
  }

  .results-panel__header {
    display: block;
  }

  .result-status {
    margin-top: 0.9rem;
  }

  .weekly-result {
    margin-top: 3.2rem;
  }

  .weekly-result strong {
    font-size: clamp(2.25rem, 11.5vw, 3rem);
  }

  .distribution__labels {
    display: grid;
    gap: 0.3rem;
  }

  .result-facts {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .result-facts div + div {
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid rgb(255 255 255 / 13%);
    border-left: 0;
  }

  .details-section,
  .lesson-section,
  .faq-section,
  .method-section {
    margin-top: 5rem;
    margin-bottom: 5rem;
  }

  .category {
    grid-template-columns: 4px 1fr;
    gap: 0.9rem;
    padding-right: 1rem;
  }

  .category__marker {
    grid-row: 1 / 3;
  }

  .category__values {
    grid-column: 2;
    min-width: 0;
    padding-top: 0.75rem;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .lesson-section {
    padding: 1.5rem;
  }

  .lesson-card {
    padding: 1.2rem;
  }

  .lesson-card__calculation {
    grid-template-columns: 1fr;
  }

  .lesson-card__operator {
    transform: rotate(90deg);
  }

  .lesson-card__time-values {
    grid-template-columns: 1fr;
  }

  .lesson-card__time-values > div + div {
    margin-top: 0;
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid rgb(23 61 54 / 12%);
    border-left: 0;
  }

  .source-note {
    display: block;
  }

  .source-note__icon {
    margin-bottom: 0.8rem;
  }

  .sources {
    display: grid;
  }

  footer {
    display: grid;
    gap: 0.5rem;
  }

  .footer-contact {
    margin-top: 0.5rem;
    text-align: left;
  }
}

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