.ins-head, .me-title, .ins-subhead {
  position: sticky; top: 0; z-index: 2;
  margin: -14px calc(-1 * var(--gutter)) 14px; background: white; border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter);
}
.ins-head-main, .ins-card-head, .ins-account { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ins-head h1 { font-size: 24px; font-weight: 500; letter-spacing: -.5px; }
.ins-head small, .ins-head-main .ins-period { font-size: 12px; color: var(--secondary); }
.ins-switch { display: inline-flex; background: #f4f4f4; padding: 3px; border-radius: 24px; }
.ins-switch button { border: 0; background: transparent; color: var(--secondary); border-radius: inherit; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.ins-switch button[aria-pressed=true] { background: var(--orange); color: white; }
.ins-period { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ins-period button, .ins-subhead a { border: 0; background: transparent; color: var(--secondary); font-size: 21px; line-height: 1; padding: 4px; }
.ins-head > .ins-period { margin-top: 8px; font-size: 14px; font-weight: 600; }
.ins-head-main .ins-period { gap: 3px; margin-left: -4px; }
.ins-head-main .ins-period button { font-size: 16px; padding: 1px 4px; }
.ins-week, .me-page { display: grid; gap: 14px; }
.ins-month { display: grid; gap: 9px; }
.ins-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ins-card { padding: 16px; }
.ins-card-head b { color: var(--body); font-size: 12px; }
.ins-week-stat { padding: 14px; display: grid; align-content: start; gap: 2px; }
.ins-week-stat strong { font-size: 25px; font-weight: 600; }
.ins-week-stat small, .ins-week-stat span, .ins-stat span { font-size: 11px; color: var(--secondary); }
.ins-week-stat span { color: #007830; }
.ins-week-stat span.decline { color: #a54b19; }
.ins-chart, .ins-heatmap { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ins-chart { height: 104px; gap: 9px; margin: 14px 0 0; }
.ins-chart li { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 6px; }
.ins-chart li i { width: min(20px,100%); min-height: 2px; border-radius: 5px; background: var(--peach); }
.ins-chart li[aria-current] i { background: var(--orange); }
.ins-chart small, .ins-key { color: var(--muted); font-size: 10px; }
.ins-donut { width: 84px; height: 84px; border-radius: 50%; margin: 8px auto; background: conic-gradient(from 90deg, #00c950 var(--accuracy), #eef0ef 0); display: grid; place-items: center; }
.ins-donut b { width: 62px; height: 62px; border-radius: 50%; background: white; display: grid; place-items: center; font-size: 19px; }
.ins-caption { color: var(--secondary); font-size: 11px; text-align: center; }
.ins-stack { margin: 10px 0; display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #eef0ef; }
.stage-new { background: #9de4ff; } .stage-learning { background: var(--peach); } .stage-reviewing { background: #f7a25f; } .stage-mastered { background: var(--orange); }
.ins-legend { margin: 0; display: grid; gap: 5px; font-size: 12px; }
.ins-legend div, .ins-legend dt { display: flex; align-items: center; gap: 7px; }
.ins-legend dt { text-transform: capitalize; color: var(--secondary); }
.ins-legend i { width: 8px; height: 8px; border-radius: 2px; }
.ins-legend dd { margin: 0 0 0 auto; font-weight: 600; }
.ins-stat-row { display: flex; padding: 13px 5px; }
.ins-stat { flex: 1; text-align: center; display: grid; align-content: center; min-width: 0; }
.ins-stat + .ins-stat { border-left: 1px solid var(--line); }
.ins-stat strong { font-size: clamp(18px,5.8vw,23px); font-weight: 600; }
.ins-month .ins-stat:nth-child(3) strong { color: var(--green); }
.ins-month .ins-stat:nth-child(4) strong { color: var(--orange); }
.ins-key { display: inline-flex; gap: 4px; align-items: center; }
.ins-key i { width: 9px; height: 9px; border-radius: 2px; }
.ins-heatmap { gap: 6px; margin: 9px 0 0; }
.ins-heatmap li { aspect-ratio: 1; border-radius: 4px; }
.ins-heatmap li:first-child { grid-column-start: var(--first); }
.heat-0 { background: #f3e9e2; } .heat-1 { background: var(--peach); } .heat-2 { background: #f7a25f; } .heat-3 { background: var(--orange); }
.ins-deck { display: flex; align-items: center; gap: 11px; margin-top: 12px; font-size: 13px; }
.ins-deck > span { width: 32px; height: 32px; border-radius: 9px; background: var(--tint); color: var(--secondary); display: grid; place-items: center; }
.ins-deck > div { flex: 1; }
.ins-deck progress { appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; margin-top: 4px; color: var(--orange); background: #f1efed; overflow: hidden; }
.ins-deck progress::-webkit-progress-bar { background: #f1efed; }
.ins-deck progress::-webkit-progress-value { background: var(--orange); }
.ins-deck progress::-moz-progress-bar { background: var(--orange); }
.ins-comparison { background: var(--tint); border-radius: 14px; padding: 10px 14px; color: var(--body); font-size: 13px; }
.ins-empty { margin-top: 10px; font-size: 13px; color: var(--secondary); }
.me-title { text-align: center; background: rgb(248 248 248 / 92%); border: none; margin-bottom: 0; }
.me-title h1 { font-size: 17px; font-weight: 600; }
.me-card { padding: 16px 0 8px; display: grid; justify-items: center; text-align: center; gap: 8px; }
.me-avatar { background: var(--orange); width: 72px; height: 72px; color: white; border-radius: 50%; font-size: 32px; font-weight: 600; display: grid; place-items: center; }
.me-card h2 { font-size: 20px; } .me-card p { font-size: 13px; color: var(--secondary); }
.me-page .ins-stat-row { padding: 16px 10px; }
.me-menu { padding: 0 16px; }
.me-menu a, .me-menu button { border: 0; width: 100%; background: white; display: flex; align-items: center; text-align: left; gap: 12px; padding: 14px 0; font-size: 15px; }
.me-menu > :is(a,button) + :is(a,button) { border-top: 1px solid var(--line); }
.me-menu .ui-icon:first-child { color: var(--orange); width: 24px; height: 18px; }
.me-menu > :nth-child(4) .ui-icon:first-child { color: #00aeef; } .me-menu > :nth-child(5) .ui-icon:first-child { color: #9810fa; } .me-menu > :nth-child(6) .ui-icon:first-child { color: var(--secondary); }
.me-menu .ui-icon:last-child { width: 13px; height: 13px; margin-left: auto; color: var(--quiet); }
.me-info h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.me-info h3 .ui-icon { width: 17px; height: 17px; color: var(--orange); }
.me-info p { font-size: 12px; color: var(--secondary); line-height: 1.5; margin-top: 6px; }
.ins-subhead { display: flex; align-items: center; gap: 12px; }
.ins-subhead h1 { font-size: 18px; }
.reminders-page { display: grid; gap: 16px; }
.reminders-page .section-label { margin-bottom: 8px; }
.reminder-line { display: flex; align-items: center; gap: 11px; padding: 14px 16px; font-size: 15px; }
.reminder-line + .reminder-line { border-top: 1px solid var(--line); }
.reminder-line small { display: block; color: var(--secondary); font-size: 12px; }
.reminder-line > b, .reminder-line button { margin-left: auto; flex: none; }
.reminder-line .ui-icon { width: 18px; height: 18px; color: var(--secondary); }
.reminder-line:first-child .ui-icon { color: var(--orange); }
.reminder-toggle { padding: 16px; }
.reminder-toggle button { width: 44px; height: 27px; background: #e0e0e0; border: 0; border-radius: 16px; padding: 3px; display: flex; }
.reminder-toggle button i { width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #0004; }
.reminder-toggle button[aria-checked=true] { justify-content: flex-end; background: var(--orange); }
.reminder-week { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 7px; }
.reminder-week button { border-radius: 10px; font-size: 12px; font-weight: 600; padding: 9px 0; border: 1px solid var(--line); background: white; color: var(--secondary); }
.reminder-week button[aria-pressed=true] { background: var(--orange); color: white; border-color: var(--orange); }
.ins-settings {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: var(--shell);
  height: calc(100dvh - max(60px, env(safe-area-inset-top)));
  max-height: none;
  border: 0;
  border-radius: 36px 36px 0 0;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: #f2f2f7;
  color: #111;
}
.ins-settings::backdrop { background: rgb(0 0 0 / 22%); }
.ins-settings form { display: flex; flex-direction: column; min-height: 100%; }
.ins-settings header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.ins-settings h2 { font-size: 17px; font-weight: 600; }
.ins-settings header button {
  border: 0;
  border-radius: 25px;
  background: #fafafe;
  color: #b6510b;
  padding: 0 16px;
  min-height: 44px;
  box-shadow: 0 5px 16px #00000008;
}
.ins-settings [data-cancel] { justify-self: start; }
.ins-settings [type=submit] { justify-self: end; font-weight: 600; }
.settings-fields { margin-top: 44px; background: #fff; border-radius: 26px; padding: 0 16px; }
.settings-fields input { font: inherit; border: 0; border-radius: 0; color: inherit; background: transparent; padding: 0; }
.settings-fields [name=name] { display: block; width: 100%; height: 52px; border-bottom: 1px solid var(--line); }
.settings-limit { min-height: 52px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.settings-limit input { width: 3.3ch; min-height: 38px; appearance: textfield; -moz-appearance: textfield; }
.settings-limit input::-webkit-inner-spin-button,
.settings-limit input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.settings-stepper { margin-left: auto; display: flex; align-items: center; }
.settings-stepper button { position: relative; isolation: isolate; border: 0; background: transparent; padding: 0; width: 46px; min-height: 44px; font-size: 23px; font-weight: 400; }
.settings-stepper button::before { content: ''; position: absolute; inset: 6px 0; z-index: -1; background: #eee; }
.settings-stepper button:first-child::before { border-radius: 20px 0 0 20px; }
.settings-stepper button:last-child::before { border-radius: 0 20px 20px 0; }
.settings-stepper button + button::after { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: #c4c4c4; }
.ins-settings [role=alert] { font-size: 14px; margin: 12px 16px; }
.ins-settings [role=alert]:empty { display: none; }
.ins-account { margin: auto 16px 0; padding-top: 24px; font-size: 13px; color: var(--secondary); }
.ins-account button { border: 0; padding: 0 8px; min-height: 44px; background: transparent; color: var(--body); }
@media (min-width: 600px) {
  .ins-settings { inset: 0; margin: auto; max-width: 540px; height: min(620px, 90dvh); border-radius: 36px; }
}
