/* Home page (index.html). Scoped to .home so the shared header, logo and dialogs keep their own styles. */
.home, .home-footer {
  --h-muted: #5d625e;
  --h-surface: #ffffff;
  --h-surface-2: #f0efe9;
  --h-surface-3: #e8e7e0;
  --h-line: rgba(20, 23, 21, .1);
  --h-soft: #3f4540;
  --h-accent-ink: #3f6d17;
  --h-shadow: 0 24px 60px rgba(22, 28, 25, .12);
  --h-tag-lime-bg: rgba(124, 184, 52, .16); --h-tag-lime: #3f6d17;
  --h-tag-blue-bg: rgba(95, 117, 244, .14); --h-tag-blue: #3446b8;
  --h-tag-red-bg: rgba(214, 88, 62, .13); --h-tag-red: #b0412a;
  --h-tag-orange-bg: rgba(240, 140, 80, .17); --h-tag-orange: #94461a;
  --h-tag-yellow-bg: rgba(214, 170, 30, .2); --h-tag-yellow: #7d6208;
  --h-tag-grey-bg: rgba(20, 23, 21, .06); --h-tag-grey: #555b56;
  --h-tag-violet-bg: rgba(130, 100, 230, .14); --h-tag-violet: #5a3fc0;
  color: var(--ink);
}
[data-theme="dark"] .home, [data-theme="dark"] .home-footer {
  --h-muted: #a2a8a2;
  --h-surface: #141916;
  --h-surface-2: #1b211e;
  --h-surface-3: #121613;
  --h-line: rgba(245, 246, 240, .08);
  --h-soft: #c4c9c4;
  --h-accent-ink: #cdf19a;
  --h-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  --h-tag-lime-bg: rgba(184, 238, 112, .14); --h-tag-lime: #cdf19a;
  --h-tag-blue-bg: rgba(95, 117, 244, .22); --h-tag-blue: #c2cbff;
  --h-tag-red-bg: rgba(240, 144, 122, .18); --h-tag-red: #f8b9aa;
  --h-tag-orange-bg: rgba(255, 173, 130, .16); --h-tag-orange: #ffc6a6;
  --h-tag-yellow-bg: rgba(248, 215, 91, .16); --h-tag-yellow: #f7e6a6;
  --h-tag-grey-bg: rgba(245, 246, 240, .08); --h-tag-grey: #c4c9c4;
  --h-tag-violet-bg: rgba(169, 140, 247, .18); --h-tag-violet: #d4c8ff;
}

.home-wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.home-sec { padding-top: 104px; padding-bottom: 104px; }
.home-sec + .home-sec { border-top: 1px solid var(--h-line); }
.home-center { text-align: center; }
.home .m-icon { flex: none; }

.home h1.home-title {
  max-width: 920px;
  margin: 22px auto 20px;
  font-size: clamp(42px, 6.2vw, 74px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.home h1.home-title em, .home .home-h2 em { color: var(--h-accent-ink); }
[data-theme="dark"] .home h1.home-title em { color: var(--accent); }
.home .home-h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -.03em;
}
.home-lead { margin: 0; color: var(--h-soft); font-size: 18px; line-height: 1.65; }
.home-lead a { color: var(--h-accent-ink); font-weight: 600; }

.home-pill, .home-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  background: var(--h-surface);
  color: var(--h-soft);
}
.home-pill { min-height: 34px; padding: 0 14px; font-size: 13px; }
.home-pill .m-icon, .home-chip .m-icon { color: var(--h-accent-ink); font-size: 16px; }
.home-chip { min-height: 44px; padding: 0 16px; font-size: 15px; transition: border-color .15s, color .15s; }
.home-chip:hover { border-color: var(--h-accent-ink); color: var(--ink); }
.home-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 600 16px "DM Sans", Arial, sans-serif;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.home-btn:active { transform: translateY(1px); }
.home-btn-primary { background: var(--accent); color: #1f3423; }
.home-btn-primary:hover { background: #c8f48a; }
.home-btn-ghost { border-color: var(--h-line); background: transparent; color: var(--ink); }
.home-btn-ghost:hover { border-color: var(--h-muted); }

.home-hero { padding-top: 84px; text-align: center; }
.home-hero .home-lead { max-width: 660px; margin: 0 auto 32px; font-size: 20px; }

/* Search over notes and files students published (public-search.js, /search-index.json). */
.home-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.home-search { position: relative; width: min(600px, 100%); margin: 28px auto 0; text-align: left; }
.home-search-field { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 16px; border: 1px solid var(--h-line); border-radius: 14px; background: var(--h-surface); color: var(--h-muted); cursor: text; transition: border-color .15s, box-shadow .15s; }
.home-search-field:focus-within { border-color: var(--h-accent-ink); box-shadow: 0 0 0 3px var(--h-tag-lime-bg); }
.home-search-field .m-icon { font-size: 18px; }
.home .home-search-field input { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 400 16px "DM Sans", Arial, sans-serif; outline: none; box-shadow: none; }
.home .home-search-field input:focus-visible { outline: none; }
.home-search-field input::placeholder { color: var(--h-muted); opacity: 1; }
.home-search-note { margin: 10px 0 0; color: var(--h-muted); font-size: 13px; text-align: center; }
.home-search-note a { color: var(--h-accent-ink); font-weight: 600; }
.home-search-results { position: absolute; top: 60px; right: 0; left: 0; z-index: 20; max-height: min(460px, 70vh); overflow-y: auto; padding: 6px; border: 1px solid var(--h-line); border-radius: 14px; background: var(--h-surface); box-shadow: var(--h-shadow); }
.home-search-results[hidden] { display: none; }
.home-search-results .search-list, .home-search-results .search-people { margin: 0; padding: 0; list-style: none; }
.home-search-results .search-people { display: grid; gap: 2px; margin-bottom: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--h-line); }
.home-search-results .search-person, .home-search-results .search-result { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.home-search-results .search-result { grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 12px; }
.home-search-results .search-person:hover, .home-search-results .search-result:hover, .home-search-results a:focus-visible { background: var(--h-surface-2); outline-offset: -2px; }
.home-search-results .search-person-name { font-size: 15px; font-weight: 600; }
.home-search-results .search-person small, .home-search-results .search-result-copy small { color: var(--h-muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.home-search-results .search-result-copy { display: grid; gap: 2px; min-width: 0; }
.home-search-results .search-result-copy strong { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.home-search-results .search-kind { display: inline-flex; align-items: center; justify-self: start; min-height: 22px; margin-top: 1px; padding: 0 8px; border-radius: 6px; background: var(--h-tag-blue-bg); color: var(--h-tag-blue); font: 600 12px "DM Sans", Arial, sans-serif; white-space: nowrap; }
.home-search-results .search-kind.green { background: var(--h-tag-lime-bg); color: var(--h-tag-lime); }
.home-search-results .search-kind.orange { background: var(--h-tag-orange-bg); color: var(--h-tag-orange); }
.home-search-results mark { padding: 0 1px; border-radius: 3px; background: var(--h-tag-yellow-bg); color: inherit; }
.home-search-results .search-footer { display: grid; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--h-line); }
.home-search-results .search-more { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--h-accent-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.home-search-results .search-more:hover { background: var(--h-surface-2); }
.home-search-results .search-note { margin: 0; padding: 12px; color: var(--h-muted); font-size: 14px; line-height: 1.5; }
.home-search-results .search-note a { color: var(--h-accent-ink); font-weight: 600; }

/* Product windows */
.home-window {
  overflow: hidden;
  border: 1px solid var(--h-line);
  border-radius: 18px;
  background: var(--h-surface);
  box-shadow: var(--h-shadow);
  text-align: left;
}
.home-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 9px 14px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--h-line);
  background: var(--h-surface-3);
  color: var(--h-muted);
  font-size: 12px;
}
.home-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--h-line); }
.home-window-bar span { margin-left: 8px; }
.home-pane { padding: 20px; }
.home-hero-window { margin-top: 64px; }
.home-app { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 500px; }
.home-app-main { min-width: 0; }
.home-app-side { display: grid; align-content: start; gap: 2px; padding: 16px 12px; border-right: 1px solid var(--h-line); background: var(--h-surface-3); }
.home-app-side span { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--h-muted); font-size: 13px; }
.home-app-side span.is-on { background: var(--h-surface-2); color: var(--ink); }
.home-app-side .m-icon { font-size: 16px; }
.home-app-main { padding: 26px 28px; }
.home-app-date { margin: 0; color: var(--h-muted); font-size: 13px; }
.home-app-hello { margin: 2px 0 20px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.home-tiles { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.home-tile { padding: 16px; border-radius: 14px; background: var(--h-surface-2); }
.home-tile small { display: block; margin-bottom: 6px; color: var(--h-muted); font-size: 12px; }
.home-tile strong { display: block; font-size: 17px; }
.home-tile p { margin: 4px 0 0; color: var(--h-muted); font-size: 13px; }
.home-tile.is-next { background: linear-gradient(135deg, rgba(184, 238, 112, .22), var(--h-surface-2) 70%); }
.home-tile .home-big { color: var(--h-accent-ink); font-size: 26px; }
.home-label { margin: 0 0 4px; color: var(--h-muted); font-size: 13px; }

.home-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--h-line);
  font-size: 14px;
}
.home-row:last-child { border-bottom: 0; }
.home-row-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-row-l > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-muted { color: var(--h-muted); }
.home-done { color: var(--h-muted); text-decoration: line-through; }
.home-box { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 5px; }
.home-box.is-on { border-color: var(--accent); background: var(--accent); }
.home-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.home-dot.blue { background: #8fd0f0; }
.home-dot.orange { background: #ffad82; }
.home-dot.lime { background: #b8ee70; }
.home-dot.yellow { background: #f8d75b; }
.home-dot.red { background: #f0907a; }
.home-dot.violet { background: #a98cf7; }
.home-dot.grey { background: var(--muted); }

.home-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.home-tag.lime { background: var(--h-tag-lime-bg); color: var(--h-tag-lime); }
.home-tag.blue { background: var(--h-tag-blue-bg); color: var(--h-tag-blue); }
.home-tag.red { background: var(--h-tag-red-bg); color: var(--h-tag-red); }
.home-tag.orange { background: var(--h-tag-orange-bg); color: var(--h-tag-orange); }
.home-tag.yellow { background: var(--h-tag-yellow-bg); color: var(--h-tag-yellow); }
.home-tag.grey { background: var(--h-tag-grey-bg); color: var(--h-tag-grey); }
.home-tag.violet { background: var(--h-tag-violet-bg); color: var(--h-tag-violet); }

/* Value triad */
.home-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; text-align: left; }
.home-value { display: grid; align-content: start; gap: 12px; padding: 28px; border-radius: 20px; background: var(--h-surface); border: 1px solid var(--h-line); }
.home-value b { color: var(--h-accent-ink); font-size: 38px; font-weight: 700; letter-spacing: -.03em; }
.home-value h3 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.home-value p { margin: 0; color: var(--h-muted); font-size: 16px; line-height: 1.6; }

/* Feature sections */
.home-feature { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.home-feature.is-flip > .home-copy { order: 2; }
.home-copy .home-h2 { margin-top: 14px; font-size: clamp(28px, 3.4vw, 40px); }
.home-copy > p { margin: 0 0 20px; color: var(--h-soft); font-size: 17px; line-height: 1.65; }
.home-points { display: grid; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.home-points li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; color: var(--ink); font-size: 15px; line-height: 1.55; }
.home-points .m-icon { margin-top: 3px; color: var(--h-accent-ink); font-size: 18px; }
.home-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--h-accent-ink); font-weight: 600; font-size: 15px; }
.home-more .m-icon { font-size: 16px; transition: transform .15s; }
.home-more:hover .m-icon { transform: translateX(3px); }

.home-planner-number { margin: 2px 0 14px; color: var(--h-accent-ink); font-size: 56px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.home-formula { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--h-surface-2); color: var(--h-muted); font: 500 13px "DM Mono", monospace; }

.home-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-file { display: grid; align-content: space-between; gap: 18px; min-height: 104px; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.home-file small { display: block; font-weight: 500; }
.home-file .m-icon { font-size: 22px; }
.home-file.blue { background: linear-gradient(160deg, #b4e3f7, #8fd0f0); color: #0b2733; }
.home-file.lime { background: linear-gradient(160deg, #d2f6a2, #b8ee70); color: #1f3423; }
.home-file.orange { background: linear-gradient(160deg, #ffcbad, #ffad82); color: #3b1d0e; }
.home-file.violet { background: linear-gradient(160deg, #cbbdfb, #a98cf7); color: #1d1540; }
.home-file-row { grid-column: 1 / -1; }
.home-note { grid-column: 1 / -1; padding: 14px; border-radius: 12px; background: var(--h-surface-2); }
.home-note strong { display: block; margin-bottom: 6px; font-size: 14px; }
.home-note code { color: var(--ink); font: 500 14px "DM Mono", monospace; }

.home-calculator .calculator-device { margin: 0; }
.home-calculator .calculator-top { box-sizing: border-box; padding-top: 10px; padding-bottom: 10px; }
.home-calculator .calc-tabs { font-size: 12px; }
.home-calculator .calc-toolbar { font-size: 11px; }
.home-calculator .calc-toolbar .m-icon { font-size: 11px; }
.home-calculator .calc-history > div { font-size: 12px; }
.home-calculator .calc-history li small { font-size: 11px; }

.home-soon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 48px; border: 1px solid var(--h-line); border-radius: 24px; background: var(--h-surface); }
.home-lesson p { margin: 0 0 10px; color: var(--ink); font-size: 15px; line-height: 1.75; }
.home-mark-lime { padding: 0 2px; border-radius: 3px; background: rgba(184, 238, 112, .35); color: inherit; }
.home-mark-coral { padding: 0 2px; border-radius: 3px; background: rgba(240, 144, 122, .35); color: inherit; }

.home-devices { position: relative; max-width: 860px; height: 360px; margin: 48px auto 0; }
.home-device { position: absolute; display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid var(--h-line); background: var(--h-surface); box-shadow: var(--h-shadow); box-sizing: border-box; }
.home-device i { display: block; height: 44px; border-radius: 12px; background: var(--h-surface-2); }
.home-device i.is-title { width: 45%; height: 14px; border-radius: 5px; }
.home-device i.is-big { height: 80px; }
.home-device.is-laptop { left: 0; top: 0; width: 560px; height: 330px; border-radius: 18px; padding-left: 128px; }
.home-device.is-laptop::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 110px; border-right: 1px solid var(--h-line); background: var(--h-surface-3); }
.home-device.is-tablet { right: 120px; bottom: 0; width: 250px; height: 300px; border-radius: 22px; }
.home-device.is-phone { right: 0; bottom: 20px; width: 140px; height: 270px; border-radius: 26px; padding: 14px 12px; }
.home-device.is-phone i { height: 28px; }
.home-device.is-phone i.is-big { height: 54px; }
.home-device-nav { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-around; color: var(--h-muted); font-size: 14px; }
.home-device-nav .m-icon:first-child { color: var(--h-accent-ink); }

.home-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 44px; text-align: left; }
.home-trust article { display: grid; align-content: start; gap: 10px; padding: 24px; border: 1px solid var(--h-line); border-radius: 18px; background: var(--h-surface); }
.home-trust .m-icon { color: var(--h-accent-ink); font-size: 22px; }
.home-trust h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.home-trust p { margin: 0; color: var(--h-muted); font-size: 15px; line-height: 1.6; }

.home-faq { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: start; }
.home-faq details { border-bottom: 1px solid var(--h-line); }
.home-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 8px 0; list-style: none; cursor: pointer; font-size: 17px; font-weight: 600; line-height: 1.35; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary .m-icon { color: var(--h-muted); font-size: 20px; transition: transform .15s; }
.home-faq details[open] summary .m-icon { transform: rotate(180deg); }
.home-faq details p { margin: 0 0 20px; color: var(--h-soft); font-size: 16px; line-height: 1.7; }
.home-faq h3 { margin: 0; font-size: inherit; font-weight: inherit; }

.home-cta { padding: 72px 48px; border-radius: 28px; text-align: center; background: radial-gradient(circle at 50% 120%, rgba(184, 238, 112, .28), transparent 60%), var(--h-surface); border: 1px solid var(--h-line); }
.home-cta .home-lead { max-width: 560px; margin: 0 auto 30px; }

.home-footer { border-top: 1px solid var(--line); background: var(--page-alt); }
.home-footer-grid { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: 56px; padding-bottom: 40px; }
.home-footer-about { display: grid; align-content: start; gap: 12px; }
.home-footer-about p { margin: 0; color: var(--h-muted); font-size: 14px; line-height: 1.6; }
.home-footer-title { margin: 0 0 10px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.home-footer nav a { display: flex; align-items: center; min-height: 34px; color: var(--h-muted); font-size: 14px; }
.home-footer nav a:hover { color: var(--ink); }
.home-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--h-muted); font-size: 13px; }
.home-footer-bottom a { color: var(--h-muted); text-decoration: underline; text-underline-offset: 3px; }

.home :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 1000px) {
  .home-feature, .home-soon, .home-faq { grid-template-columns: 1fr; gap: 36px; }
  .home-feature.is-flip > .home-copy { order: 0; }
  .home-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-footer-about { grid-column: 1 / -1; }
  .home-devices { transform: scale(.8); transform-origin: top center; height: 300px; }
}

@media (max-width: 760px) {
  .home-wrap { width: calc(100% - 32px); }
  .home-sec { padding-top: 64px; padding-bottom: 64px; }
  .home-hero { padding-top: 44px; }
  .home-hero .home-lead { font-size: 17px; margin-bottom: 26px; }
  .home-actions { display: grid; grid-template-columns: 1fr; }
  .home-btn { width: 100%; min-width: 0; }
  .home-search { margin-top: 22px; }
  .home-search-results .search-result { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .home-hero-window { margin-top: 40px; border-radius: 22px; }
  .home-hero-window .home-window-bar { display: none; }
  .home-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .home-app-side { display: none; }
  .home-app-main { min-width: 0; padding: 18px 16px 12px; }
  .home-calculator .calc-keypad { gap: 6px; }
  .home-calculator .calc-keypad button { min-height: 42px; font-size: 14px; }
  .home-app-hello { font-size: 24px; margin-bottom: 14px; }
  .home-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .home-tiles .is-next { grid-column: 1 / -1; }
  .home-chip { min-height: 40px; padding: 0 13px; font-size: 14px; }
  .home-values, .home-trust { grid-template-columns: 1fr; }
  .home-value { padding: 22px; }
  .home-pane { padding: 14px; }
  .home-row { font-size: 13.5px; }
  .home-planner-number { font-size: 44px; }
  .home-soon { padding: 24px 18px; }
  .home-devices { display: none; }
  .home-cta { padding: 44px 20px; border-radius: 22px; }
  .home-footer-grid { grid-template-columns: 1fr 1fr; padding-top: 36px; padding-bottom: 24px; }
}
