html[data-progress-loading] body {
  display: block;
  margin: 0;
  min-height: 100vh;
  background: var(--prep-canvas);
}
html[data-progress-loading] #practiceHome,
html[data-progress-loading] #homeProgressMain { display: block !important; }
html[data-progress-loading] body > .app-shell,
html[data-progress-loading] #homeLanding { display: none !important; }

body[data-practice-home="on"] {
  display: block;
  margin: 0;
  min-height: 100vh;
  background: var(--prep-canvas);
}
body[data-practice-home="on"] > .app-shell,
body[data-practice-home="on"] > #mobilePractice { display: none !important; }

#practiceHome {
  --home-ink: var(--prep-ink);
  --home-muted: var(--prep-muted);
  --home-line: var(--prep-line);
  --home-green: var(--prep-accent);
  color: var(--home-ink);
  font: 15px/1.55 var(--prep-font);
}
#practiceHome :is(a,button):focus-visible { outline: 2px solid var(--prep-accent); outline-offset: 3px; }
#practiceHome .home-main { max-width: var(--prep-width); margin: auto; padding: 46px var(--prep-gutter) 42px; }
#practiceHome .home-intro { margin-bottom: 30px; }
#practiceHome h1 { margin: 0 0 8px; font-size: clamp(34px,5.4vw,58px); font-weight: 650; line-height: 1.08; letter-spacing: -.038em; }
#practiceHome .home-intro p { margin: 0; color: var(--home-muted); font-size: 17px; }
#practiceHome .home-workspace { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 10px 18px; }
#practiceHome .home-primary { padding: 26px; background: var(--prep-soft); border-radius: var(--prep-panel-radius); }
#practiceHome .home-workspace .home-primary { grid-row: span 2; }
#practiceHome .home-option { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 13px 42px 13px 16px; border: 1px solid var(--prep-surface-line); border-radius: 14px; background: #fff; color: var(--home-green); text-decoration: none; }
#practiceHome .home-option::after { content: "→"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
#practiceHome .home-option:hover { border-color: var(--home-green); }
#practiceHome .home-option:hover strong { text-decoration: underline; text-underline-offset: .2em; }
#practiceHome .home-option strong { color: var(--home-ink); font-size: 20px; font-weight: 620; line-height: 1.2; }
#practiceHome .home-option span { color: var(--home-muted); }
#practiceHome .home-quick-link { display: inline-block; margin: 8px 0 0; min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--home-green); font: inherit; text-decoration: underline; cursor: pointer; }
#practiceHome h2 { font-size: clamp(22px,2.5vw,30px); font-weight: 640; line-height: 1.16; letter-spacing: -.028em; margin: 0 0 8px; }
#practiceHome .home-description { max-width: 45ch; color: var(--home-muted); margin: 0 0 18px; }
#practiceHome .home-action {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 49px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--prep-control-radius);
  background: var(--home-green);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
#practiceHome .home-action:disabled { opacity: .65; cursor: wait; }
#practiceHome .home-action:not(:disabled):hover { background: var(--prep-accent-hover); }
#practiceHome .home-note { margin: 12px 0 0; color: #405d50; font-size: 13px; }
#practiceHome .home-message { color: #743126; margin: 10px 0 0; }
#practiceHome .home-message:empty { margin: 0; }
#practiceHome .home-progress { margin: 0 0 17px; max-width: 350px; }
#practiceHome .home-progress label { display: block; font-size: 13px; font-weight: 750; margin: 0 0 6px; }
#practiceHome progress { display: block; width: 100%; height: 7px; accent-color: #438266; }
#practiceHome .home-foot {
  max-width: calc(var(--prep-width) - var(--prep-gutter) - var(--prep-gutter));
  margin: auto;
  border-top: 1px solid var(--home-line);
  padding: 17px 0 24px;
  color: var(--home-muted);
  display: flex;
  gap: 10px 24px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
}
#practiceHome .home-foot p { margin: 0; }
#practiceHome .home-foot a { color: inherit; text-underline-offset: .2em; }
#practiceHome .home-policy-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#practiceHome .home-progress-main { max-width: var(--prep-width); }
#practiceHome .home-progress-main h1 { margin-bottom: 22px; }
#practiceHome .home-progress-panel { max-width: 720px; padding: 20px 22px; background: #fff; border: 1px solid var(--prep-surface-line); border-radius: var(--prep-panel-radius); }
#practiceHome .home-progress-panel:has(#progressRecords:empty) { background: var(--prep-soft); border-color: transparent; }
#practiceHome #progressSummary:empty { display: none; }
#practiceHome #progressRecords h2 { font-size: 23px; }
#practiceHome .home-record-list { list-style: none; padding: 0; margin: 0 0 20px; }
#practiceHome .home-record-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px solid var(--home-line);
  padding: 12px 0;
}
#practiceHome .home-record-list p { margin: 2px 0 0; color: var(--home-muted); }
#practiceHome .home-record-action {
  background: var(--prep-soft);
  color: var(--home-green);
  border: 1px solid var(--home-line);
  padding: 9px 12px;
  min-height: 44px;
  border-radius: var(--prep-control-radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#practiceHome .home-record-action:disabled { opacity: .65; cursor: wait; }
#practiceHome #progressManage { color: var(--home-muted); }
#practiceHome #progressManage summary { cursor: pointer; padding-block: 10px; }

@media(max-width:1104px) { #practiceHome .home-foot { margin-inline: var(--prep-gutter); } }
@media(max-width:680px) {
  #practiceHome .home-main { padding: 20px var(--prep-gutter) 28px; }
  #practiceHome .home-intro { margin-bottom: 16px; }
  #practiceHome .home-intro p { font-size: 15px; }
  #practiceHome h1 { font-size: 34px; }
  #practiceHome .home-workspace { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #practiceHome .home-workspace .home-primary { grid-row: auto; padding: 16px; }
  #practiceHome .home-option { padding-block: 11px; }
  #practiceHome .home-option strong { font-size: 17px; }
  #practiceHome .home-description { margin-bottom: 10px; }
  #practiceHome .home-action { width: 100%; }
  #practiceHome .home-progress-panel { padding: 16px; }
}
@media(max-width:350px) { #practiceHome h1 { font-size: 30px; } }
