.study-main {
  min-width: 0;
}

.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.month-head .btn {
  font-size: 11px;
  height: 25px;
  padding: 0 10px;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 17px 0 25px;
}

.day {
  border: 0;
  background: transparent;
  border-radius: 11px;
  min-width: 0;
  height: 66px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  color: #444;
  font-size: 13px;
}

.day small {
  font-size: 10px;
}

.day.selected {
  background: #272727;
  color: white;
  box-shadow:
  inset 0 1px 1px #ffffff25,
  0 2px 4px #00000012;
}

.day.selected small {
  color: #ddd;
}

.day:hover:not(.selected) {
  background: var(--color-surface-soft);
}

.day .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d6d6d6;
}

.day .done {
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  background: #c8f133;
  border-radius: 50%;
  font-size: 9px;
  color: #282828;
}

.compact .topic-row {
  min-height: 61px;
}

@media (max-width: 640px) {
  .week {
    gap: 3px;
  }
  .day {
    height: 60px;
  }
}

.plan-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.plan-heading h2 {
  font-size: 14px;
  line-height: 1.4;
}

.plan-icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: #ffe76c;
  border-radius: 7px;
  flex-shrink: 0;
  color: #5f531d;
}

.plan-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.plan-actions .btn {
  height: 27px;
  font-size: 11px;
  padding: 0 11px;
}

.plan-actions .split-end .icon {
  filter: invert(1);
  opacity: 0.7;
}

.study-card {
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 0 16px;
  box-shadow: 0 2px 8px #00000005;
  background: var(--color-surface);
}

.study-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.study-card-header > span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #888;
}

.study-card-header small {
  font-size: 11px;
  color: #888;
}

.study-card .topic-list {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.study-card .topic-row {
  min-height: 76px;
  gap: 12px;
}

.study-card .thumbnail {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 21px;
}

.study-card .topic-copy h3 {
  font-size: 12px;
  margin: 0 0 6px;
  line-height: 1.4;
}

.study-card .topic-row .btn {
  margin-left: 9px;
  height: 25px;
  font-size: 10px;
  background: transparent;
  box-shadow: none;
  padding: 0 5px;
  color: #666;
}

.study-card .topic-row .btn:hover {
  background: #f3f3f3;
}

@media (max-width: 1100px) {
  .plan-heading {
    width: 100%;
  }
  .plan-actions {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .plan-heading {
    width: auto;
  }
  .plan-actions {
    width: 100%;
    margin-top: 2px;
  }
  .plan-actions .btn {
    height: 34px;
    font-size: 11px;
  }
  .study-card {
    padding: 0 12px;
    border-radius: 18px;
  }
  .study-card .topic-row {
    gap: 9px;
    padding: 14px 0;
    flex-wrap: wrap;
  }
  .study-card .topic-copy {
    flex: 1;
    min-width: 130px;
  }
  .study-card .topic-copy h3 {
    font-size: 12px;
  }
  .study-card .topic-row .btn {
    margin-left: 45px;
    height: 30px;
    padding: 0 10px;
    background: var(--color-surface-soft);
  }
  .study-card .thumbnail {
    width: 34px;
    height: 34px;
  }
  .study-card-header {
    padding: 13px 0;
  }
}

/* Week picker and topics share one calm study-plan surface. */
.study-main {
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  background: white;
  box-shadow: 0 2px 8px #00000005;
  padding: 18px 18px 0;
  align-self: start;
  overflow: hidden;
}

.study-main .month-head h2 {
  font-size: 14px;
}

.study-main .week {
  padding: 15px 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-line);
  gap: 5px;
}

.study-main .day {
  height: 61px;
  border-radius: 10px;
}

.study-main .plan-icon {
  background: #f2f2f2;
  color: #606060;
  border-radius: 7px;
  width: 25px;
  height: 25px;
}

.study-main .list-heading {
  margin-bottom: 12px;
}

.study-main .study-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.study-main .study-card-header {
  padding: 0 0 12px;
}

.study-main .topic-row:last-child {
  padding-bottom: 18px;
}

.study-main .support {
  border-top: 1px solid #eee;
  margin: 0;
  padding: 13px 0;
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .study-main {
    padding: 16px 12px 0;
    border-radius: 18px;
  }
  .study-main .week {
    gap: 3px;
    padding-top: 14px;
    margin-bottom: 15px;
  }
  .study-main .day {
    height: 58px;
  }
  .study-main .list-heading {
    gap: 10px;
  }
  .study-main .plan-actions {
    margin-top: 0;
    gap: 6px;
  }
  .study-main .plan-actions .btn {
    font-size: 10px;
    padding: 0 10px;
    height: 32px;
  }
  .study-main .topic-copy {
    min-width: 110px;
  }
  .study-main .topic-row {
    gap: 8px;
  }
  .study-main .topic-row .btn {
    margin-left: 42px;
  }
  .study-main .topic-time {
    min-width: 40px;
  }
}

/* Context aligns beside the page introduction with room at the outer edge. */
@media (min-width: 901px) {
  .context-layout #today-view,
  .context-layout #today-view > .workspace {
    display: contents;
  }
  .context-layout .study-main {
    grid-column: 1;
    grid-row: 2;
    margin-top: 27px;
  }
}

.briefing-next {
  display: inline-block;
  margin-top: 3px;
  color: #8a8a8a;
}

.hero-copy .daily-reminder {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px !important;
  font-size: 11px;
  color: #858585;
  line-height: 1.5;
}

.daily-reminder:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b6c7d8;
  flex-shrink: 0;
}

.today-content > .hero {
  min-height: 0;
  padding-bottom: 8px;
}

.today-content #today-view > .workspace {
  padding-top: 16px;
}

@media (min-width: 901px) {
  .context-layout .today-content {
    grid-template-rows: max-content 1fr;
  }
  .context-layout .today-content .study-main {
    margin-top: 16px;
    align-self: stretch;
  }
  .today-content #today-context {
    align-self: stretch;
  }
  .today-content #today-context > .detail-section:last-child {
    padding-bottom: 0;
  }
  .today-content #today-context .detail-event:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .hero-copy .daily-reminder {
    font-size: 10px;
  }
}

.welcome-details {
  display: flex;
  gap: 24px;
  margin-top: 17px;
  padding-top: 0;
}

.welcome-details > div {
  padding-left: 12px;
  border-left: 1px solid #e5e5e5;
}

.welcome-label {
  display: block;
  font-size: 10px;
  color: #999;
  margin-bottom: 5px;
}

.welcome-details strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .welcome-details {
    gap: 20px;
    margin-top: 18px;
  }
  .welcome-details strong {
    font-size: 11px;
  }
}

.day .done {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-copy .welcome-details {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  min-width: 0;
}

.welcome-stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f7f7f7;
  box-shadow: inset 0 1px 0 var(--color-surface);
  font-size: 11px;
  color: #555;
  line-height: 1.3;
}

.welcome-stat svg {
  color: #999;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .hero-copy .welcome-details {
    margin-top: 15px;
  }
  .welcome-stat {
    font-size: 11px;
  }
}

.context .next-class-reminder,
.detail-sidebar .next-class-reminder {
  display: grid;
  gap: 12px;
}

.next-class-reminder h3 {
  margin: 0;
}

.next-class-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.next-class-details .next-class-course {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

.next-class-details time {
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-muted);
}

.next-class-reminder > .btn {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  height: auto;
  min-height: 29px;
  padding-block: 6px;
}

.study-rest {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 8px 32px;
}

.study-rest-copy {
  min-width: 0;
  max-width: 46ch;
}

.study-rest h2 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.study-rest p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-muted);
}

.study-rest-link {
  margin-top: 12px;
}

.study-main .month-head {
  min-height: 25px;
  flex-shrink: 0;
}

.study-main--rest {
  display: flex;
  flex-direction: column;
}

.study-main--rest > .study-card {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.study-main--rest > .study-card > .topic-list {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.study-main--rest .study-rest {
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  padding: 32px 16px;
  text-align: center;
}

@media (max-width: 640px) {
  .study-rest {
    gap: 12px;
    padding: 20px 0 28px;
  }
}

.exam-heading {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.exam-heading h2 {
  margin: 0;
}

.exam-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 3px;
}

.context-block .exam-course {
  font-size: 11px;
  color: #888;
  margin: 0;
}

.exam-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.exam-countdown {
  font-size: 10px;
  background: var(--color-surface-soft);
  color: var(--color-muted);
  border-radius: 5px;
  padding: 3px 6px;
  margin-left: auto;
}

.exam-date-row .detail-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.action-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.action-topic span {
  flex: 1;
}

.action-topic button {
  border: 1px solid #e5e5e5;
  background: white;
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
}

.action-topic input {
  accent-color: #333;
}

.topic-origin {
  display: block;
  line-height: 1.5;
  margin-top: 5px;
}

@scope (body[data-design]) {
  .pricing-plan-description,
  .pricing-card-footnote,
  .pricing-shared-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--color-muted);
  }
}

/* Daily study */
/* First value, source checks, and the second-course decision share the app's visual language. */
@scope (body[data-design]) {
  .study-eyebrow {
    margin: 0 0 10px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 500;
  }
  .next-study-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 22px 0 28px;
    padding: 26px 28px;
    border: 1px solid #d5dfb5;
    border-radius: 16px;
    background: #f7faed;
  }
  .next-study-copy {
    min-width: 0;
  }
  .next-study-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
  }
  .next-study-copy > p:not(.study-eyebrow) {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
  }
  .next-study-copy .study-resume-note {
    max-width: 55ch;
    margin-top: 12px !important;
    color: #606751;
  }
  .next-study-action {
    flex-shrink: 0;
  }
  .next-study-action .btn {
    min-height: 44px;
  }
  @media (max-width: 700px) {
    .next-study-step {
      align-items: stretch;
      flex-direction: column;
      gap: 20px;
      padding: 22px;
    }
    .next-study-action .btn {
      width: 100%;
    }
  }
}
