:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #fff;
  --soft: #ecf0f8;
  --ink: #17213d;
  --muted: #59657d;
  --line: #dce2ed;
  --accent: #485bc9;
  --tint: #e9edff;
  --green: #23765e;
  --warn: #9a4d16;
  --shadow: none;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b101b;
  --surface: #121a29;
  --soft: #192337;
  --ink: #ecf0fd;
  --muted: #a5b1cc;
  --line: #2a354b;
  --accent: #a2afff;
  --tint: #202d50;
  --green: #8fe1bf;
  --warn: #ffbf85;
  --shadow: none;
}
.theme-row progress::-webkit-progress-bar {
  background: var(--soft);
  border-radius: 99px;
}
.theme-row progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 99px;
}
.theme-row progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 99px;
}
#video-placeholder {
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  margin: 16px 0;
}
.sidebar {
  min-width: 0;
}
#sessions {
  max-width: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
}
button:hover,
.button:hover {
  background: var(--soft);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
.primary {
  background: #485bc9;
  border-color: #485bc9;
  color: white;
}
.primary:hover {
  background: #384bb6;
}
.danger {
  color: var(--warn);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.button:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 30;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.top,
main,
footer {
  max-width: 1400px;
  margin: auto;
  padding: 0 48px;
}
.top {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.4px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.6px;
  color: var(--muted);
  font-weight: 750;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -1px;
  line-height: 1.08;
  font-weight: 720;
  margin: 0 0 22px;
}
h1 span {
  color: var(--accent);
}
.lead {
  font-size: 17px;
  max-width: 520px;
  color: var(--muted);
  margin: 0;
}
.hero .actions {
  margin-top: 24px;
}
.intro-card {
  align-self: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: var(--shadow);
}
.intro-card h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
}
.intro-card p {
  font-size: 14px;
}
.pill {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--green);
  font-size: 11px;
  background: var(--surface);
}
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.onboarding {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.onboarding li {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.onboarding strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
  font-size: 15px;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.toolbar input[hidden] {
  display: none;
}
#saved {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 14px 0;
  background: var(--tint);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice p {
  margin: 0 0 10px;
}
.warning {
  color: var(--warn);
}
[hidden] {
  display: none !important;
}
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-heading h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
  margin: 0;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.sidebar h2 {
  font-size: 15px;
}
.session-button {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.session-button small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.session-button[aria-current="true"] {
  background: var(--tint);
  border-color: var(--accent);
}
.work-area {
  min-width: 0;
}
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  border-color: transparent;
}
.tabs button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
  border-color: var(--line);
}
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.panel h3 {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.panel p {
  overflow-wrap: anywhere;
}
.panel .section-heading {
  margin-bottom: 14px;
}
.panel .section-heading h2 {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.stat {
  background: var(--soft);
  border-radius: 12px;
  padding: 14px;
}
.stat strong {
  font-size: 23px;
  display: block;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.stat small {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.definition-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.definition-list dt {
  font-size: 11px;
  color: var(--muted);
}
.definition-list dd {
  margin: 2px 0;
  font-size: 16px;
}
.empty {
  padding: 50px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.empty h2 {
  color: var(--ink);
  font-size: 24px;
}
.empty .actions {
  justify-content: center;
}
.moment {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.moment:first-of-type {
  border-top: 0;
}
.moment-header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.moment h3 {
  margin: 0;
  font-size: 15px;
}
.moment p {
  white-space: pre-wrap;
  margin: 10px 0;
  font-size: 14px;
}
.moment .actions button {
  font-size: 11px;
  min-height: 34px;
  padding: 6px 10px;
}
.tag {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 9px;
  color: var(--muted);
}
.theme-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  font-size: 13px;
}
.theme-row progress {
  grid-column: 1/-1;
  width: 100%;
  height: 7px;
  accent-color: var(--accent);
  border: 0;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
}
.field.wide {
  grid-column: 1/-1;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="file"] {
  max-width: 100%;
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.inline-field select {
  width: auto;
}
#video {
  display: block;
  width: 100%;
  max-height: 470px;
  background: #05070d;
  border-radius: 12px;
  margin: 14px 0;
}
#video:not([src]) {
  height: 100px;
}
#video-panel .section-heading h2 {
  font-size: 17px;
}
.task {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.task p {
  white-space: pre-wrap;
}
.task ol {
  padding-left: 22px;
  font-size: 13px;
}
.practice-log {
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 10px;
  margin-top: 10px;
}
.practice-log p {
  margin: 6px 0;
  font-size: 13px;
}
.report-meta {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report-section {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.report-section p {
  white-space: pre-wrap;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 11px;
  color: var(--muted);
}
.details {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 70px;
  padding: 64px 0;
  color: var(--muted);
  font-size: 13px;
}
.details h2 {
  font-size: 28px;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -1px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  max-width: 680px;
  width: calc(100% - 32px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 120px #0005;
}
dialog::backdrop {
  background: #0b102380;
  backdrop-filter: blur(5px);
}
dialog h2 {
  margin-top: 0;
  letter-spacing: -0.6px;
}
dialog .actions {
  margin-top: 22px;
}
#viewer {
  max-width: 900px;
}
#print-output {
  display: none;
}
.guide {
  max-width: 920px;
  padding-top: 44px;
  padding-bottom: 64px;
}
.guide h1 {
  font-size: clamp(34px, 5vw, 54px);
}
.guide h2 {
  margin-top: 36px;
}
.guide p,
.guide li {
  color: var(--muted);
}
.guide strong {
  color: var(--ink);
}
.guide section {
  border-top: 1px solid var(--line);
  margin-top: 30px;
}
.guide li {
  margin-bottom: 12px;
}
.guide .actions {
  margin: 24px 0;
}
.guide code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.guide .table-wrap {
  margin: 24px 0;
}
@media (max-width: 1000px) {
  .top,
  main,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero,
  .details {
    gap: 30px;
  }
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
  }
  .sidebar {
    padding: 14px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .top,
  main,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .top {
    min-height: 80px;
  }
  .brand {
    font-size: 13px;
    gap: 8px;
  }
  .top nav {
    gap: 8px;
  }
  .top nav a {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 30px 0;
    gap: 24px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .intro-card {
    padding: 0;
  }
  .onboarding {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  #sessions {
    display: flex;
    gap: 8px;
    overflow: auto;
  }
  .session-button {
    min-width: 150px;
    max-width: 210px;
  }
  .sidebar .small {
    display: none;
  }
  .panel {
    padding: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .definition-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #saved {
    width: 100%;
    margin-left: 0;
  }
  .toolbar button,
  .toolbar .button {
    font-size: 12px;
  }
  .details {
    grid-template-columns: 1fr;
    padding: 38px 0;
    gap: 4px;
  }
  dialog {
    padding: 20px;
  }
  .actions {
    gap: 6px;
  }
  .guide {
    padding-top: 24px;
  }
}
@page {
  margin: 17mm;
  size: A4;
}
@media print {
  :root,
  :root[data-theme="dark"] {
    color-scheme: light;
    background: white;
    --ink: #17213d;
    --muted: #505d76;
    --line: #d7dce5;
    --soft: #edf0f8;
    --accent: #485bc9;
  }
  body {
    background: white;
    color: #17213d;
    font-size: 10pt;
  }
  body > * {
    display: none !important;
  }
  body > #print-output {
    display: block !important;
  }
  #print-output h1 {
    font-size: 26pt;
    letter-spacing: -1px;
  }
  #print-output h2 {
    font-size: 16pt;
  }
  #print-output h3 {
    font-size: 12pt;
    break-after: avoid;
  }
  #print-output .report-section {
    break-inside: avoid;
  }
  #print-output p {
    orphans: 3;
    widows: 3;
  }
  #print-output .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #print-output button {
    display: none !important;
  }
}

.measurement {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
  background: var(--bg);
  break-inside: avoid;
}
.measurement h4 {
  font-size: 16px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.measurement-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.measurement-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.measurement-stats strong {
  font-size: 25px;
}
.measurement-stats span,
.measurement-stats small {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.measured-log-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .measurement-stats {
    grid-template-columns: 1fr;
  }
  .measurement {
    padding: 14px;
  }
}
@media print {
  .measurement {
    background: white;
  }
  .measurement-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #print-output .report-section:has(.measurement) {
    break-inside: auto;
  }
  .measured-log-detail {
    break-inside: avoid;
  }
}

@media print {
  #print-output .practice-report-log {
    break-inside: avoid;
  }
}
