/* Notes, reading view, screenshots */
.sample { flex: none; padding: 4px 10px; border-radius: 999px; background: #feefc6; color: #574500; font-size: 0.72rem; }
.notes__bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.notes__bar .input { flex: 1 1 200px; max-width: 520px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--neutral); font-size: 0.85rem; }
.chip.is-active { background: var(--active); }

.note--yellow { background: #feefc6; }
.note--green { background: #e1f6e0; }
.note--blue { background: #e3e9ff; }
.note--peach { background: #ffe6da; }

/* Navigation with labels */
.rail a { align-content: center; gap: 3px; width: 72px; height: 62px; border-radius: 20px; font-size: 0.72rem; }

/* Dashboard */
.content > .hero, .content > .stats, .content > .tiles, .content > .charts, .content > .upnext { max-width: 1080px; margin-left: auto; margin-right: auto; }
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 24px 28px; border-radius: 28px; background: linear-gradient(120deg, #e3e9ff, var(--neutral)); }
.ring { --done: 0%; --track: #e3e9ff; --hole: var(--panel); display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--blue) var(--done), var(--track) 0); }
.ring > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--hole); font-weight: 500; font-size: 0.95rem; }
.hero__ring { --track: #c3d0f5; width: 124px; height: 124px; }
.hero__ring > span { width: 100px; height: 100px; font-size: 1.6rem; }
.hero__text { display: flex; flex-direction: column; gap: 6px; margin-right: auto; color: var(--muted); }
.hero__text strong { color: var(--ink); font-size: 1.7rem; font-weight: 500; }
.hero__start { display: flex; align-items: center; gap: 8px; }
.hero__start .icon { width: 18px; height: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.stat { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; padding: 16px; border: 1px solid #e6e9f0; border-radius: 18px; }
.stat:hover { background: var(--surface); }
.stat .icon { grid-row: span 2; width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: #e3e9ff; color: var(--blue); }
.stat strong { font-size: 1.7rem; font-weight: 500; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.8rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.cat { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; padding: 18px; border-radius: 22px; }
.cat:hover { filter: brightness(0.97); }
.cat__ring { --track: rgba(0, 0, 0, 0.08); width: 58px; height: 58px; }
.cat__ring > span { width: 46px; height: 46px; }
.cat__count { justify-self: end; font-size: 2.4rem; font-weight: 500; line-height: 1; }
.cat__name { grid-column: 1 / -1; margin-top: 14px; font-weight: 500; }
.cat__meta { grid-column: 1 / -1; color: var(--muted); font-size: 0.78rem; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid #e6e9f0; border-radius: 22px; }
.card__title { font-size: 1.05rem; font-weight: 500; }
.card__note { margin: 2px 0 16px; color: var(--muted); font-size: 0.8rem; }
.columns { display: flex; flex: 1; gap: 2px; min-height: 180px; }
.column { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 8px; border-radius: 10px; }
.column:hover { background: var(--surface); }
.column__plot { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: center; width: 100%; padding-top: 4px; border-bottom: 1px solid #c4c7c5; }
.column__value { font-size: 0.8rem; margin-bottom: 4px; }
.column__bar { flex: none; width: 24px; max-height: calc(100% - 24px); border-radius: 4px 4px 0 0; background: var(--blue); }
.column__label { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.map { display: flex; flex-wrap: wrap; gap: 6px; }
.map__cell { display: block; width: 26px; height: 26px; border-radius: 7px; background: #e3e9ff; box-shadow: inset 0 0 0 1px #8ea8e8; }
.map__cell.is-done { background: var(--blue); box-shadow: none; }
a.map__cell:hover { transform: scale(1.15); box-shadow: inset 0 0 0 2px var(--blue); }
.legend { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 0.78rem; }
.legend .map__cell { width: 14px; height: 14px; border-radius: 4px; }
.legend .map__cell.is-done { margin-left: 10px; }
.map__caption { min-height: 2.8em; margin-top: 10px; font-size: 0.82rem; line-height: 1.4; }

.upnext { margin-top: 28px; }
.board__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 8px; }
.board__head .section__title, .board__head .chips { margin: 0; }
.board__head .chip { padding: 6px 14px; }

.tasks { border: 1px solid #e6e9f0; border-radius: 18px; overflow: hidden; }
.task { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.task + .task { border-top: 1px solid #e6e9f0; }
.task:hover { background: var(--surface); }
.task__link { display: flex; flex: 1; align-items: center; gap: 14px; min-width: 0; padding: 14px; }
.task__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; }
.task__icon .icon { width: 22px; height: 22px; }
.task__title { font-weight: 500; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task__meta { color: var(--muted); font-size: 0.78rem; }
.task__check { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1.5px solid #c4c7c5; border-radius: 50%; color: transparent; }
.task__check .icon { width: 18px; height: 18px; }
.task__check:hover { color: var(--muted); }
.task__check[aria-pressed="true"] { background: #0d652d; border-color: #0d652d; color: #fff; }
.task.is-read .task__title { color: var(--muted); text-decoration: line-through; }

.points { list-style: disc; padding-left: 20px; line-height: 1.7; }
.code { padding: 16px 18px; overflow-x: auto; border-radius: 18px; background: #202124; color: #e8eaed; font-size: 0.85rem; line-height: 1.6; overflow-wrap: normal; }
.rows a { color: var(--blue); }
.tag { flex: none; align-self: center; color: var(--muted); font-size: 0.8rem; }
.check { padding: 14px 18px; border-radius: 18px; background: #feefc6; line-height: 1.5; }
.editor__body { width: 100%; padding: 14px 18px; font: inherit; line-height: 1.45; color: inherit; border: 1px solid #c4c7c5; border-radius: 18px; resize: vertical; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.shot { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; min-height: 170px; padding: 12px; border-radius: 20px; background: var(--neutral); font-size: 0.8rem; text-align: center; }
.shot--large { min-height: 320px; }
.action { margin-top: 16px; }
.steps { padding-left: 22px; line-height: 2; color: var(--muted); }
.steps .is-current { color: var(--blue); font-weight: 500; }
.steps .is-done { color: #0d652d; }
.steps .is-done::after { content: " ✓"; }

@media (max-width: 1023px) { .charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 699px) {
  .sample { display: none; }
  .rail a { width: 64px; height: 50px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hero { gap: 16px; padding: 18px; }
  .hero__ring { width: 92px; height: 92px; }
  .hero__ring > span { width: 74px; height: 74px; font-size: 1.2rem; }
  .hero__text { flex: 1; }
  .hero__text strong { font-size: 1.3rem; }
  .hero__start { width: 100%; justify-content: center; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cat { padding: 14px; }
  .task__title { white-space: normal; }
}
@media (max-height: 520px) { .rail a { height: 48px; } }

.note--plain, .task__icon.note--plain { background: var(--neutral); }
.shot { padding: 0; overflow: hidden; height: 220px; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hint { margin: 0 8px 14px; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.action { margin: 0 0 24px; }
.action .button { display: inline-block; }
.task__summary { margin: 2px 0; font-size: 0.84rem; line-height: 1.35; }
/* Sign in: the whole window, without the header and rail */
.app.is-signed-out { display: block; }
.is-signed-out .header, .is-signed-out .rail { display: none; }
.is-signed-out .content { height: 100%; margin: 0; padding: 0; border-radius: 0; background: var(--neutral); }
.auth { display: flex; flex-direction: column; justify-content: safe center; gap: 32px; min-height: 100%; padding: 32px 20px; }
.auth__hero, .auth__panel { width: 100%; max-width: 400px; margin: 0 auto; }
.auth__badge { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 18px; background: var(--blue); color: #fff; }
.auth__badge .icon { width: 28px; height: 28px; }
.auth__title { margin-bottom: 8px; font-size: 2.6rem; font-weight: 500; letter-spacing: -1px; line-height: 1.1; }
.auth__sub { color: var(--muted); font-size: 1.05rem; line-height: 1.45; }
.auth__topics { display: none; }
.auth__topic { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; font-size: 0.9rem; }
.login { display: flex; flex-direction: column; gap: 14px; }
.login h2 { font-size: 1.5rem; font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { color: var(--muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.field .input { flex: none; width: 100%; padding: 15px 18px; border-color: transparent; border-radius: 14px; }
.field .input:focus { border-color: var(--blue); outline: none; }
.login__error { min-height: 20px; color: #b3261e; font-size: 0.88rem; }
.login .button { padding: 16px; }
.login .button:disabled { opacity: 0.6; cursor: default; }
.login__note { color: var(--muted); font-size: 0.8rem; line-height: 1.5; text-align: center; }
.farewell { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 360px; margin: 56px auto; text-align: center; }
.farewell h2 { font-weight: 500; }
.farewell p { color: var(--muted); line-height: 1.5; }
.farewell__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #e3e9ff; color: var(--blue); }
.farewell__icon .icon { width: 38px; height: 38px; }
.farewell__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.auth .farewell { margin: 0 auto; }
.account { display: inline-block; }

/* Wide screens: the two halves side by side */
@media (min-width: 900px) {
  .auth { display: grid; grid-template-columns: 1fr 1fr; align-content: safe center; align-items: center; column-gap: 72px; padding: 48px 7vw; }
  .auth__hero { max-width: 520px; margin: 0 0 0 auto; }
  .auth__panel { margin: 0 auto 0 0; }
  .auth__title { font-size: 3.75rem; letter-spacing: -2px; }
  .auth__sub { font-size: 1.2rem; }
  .auth__topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
}
