/*
    styled using css-grid:
    1. https://css-tricks.com/snippets/css/complete-guide-grid/
    2. https://www.w3.org/TR/css-align-3/#overview
    3. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
    4. https://stackoverflow.com/questions/56463897/css-grid-align-vertically-and-horizontally-without-disturbing-background-color-o
    5. https://www.youtube.com/watch?v=rg7Fvvl3taU
    6. https://ishadeed.com/article/css-grid-area/
    7. https://cssgridgarden.com/
 
    more docs:
    - https://www.swyx.io/css-100-bytes
    - https://news.ycombinator.com/item?id=32972768
    - https://github.com/andybrewer/mvp
    - https://www.joshwcomeau.com/css/full-bleed/
    - https://www.joshwcomeau.com/css/custom-css-reset/
    - https://elad2412.github.io/the-new-css-reset/ (MIT)
    - https://unpkg.com/mvp.css@1.12/mvp.css
*/

/*
  We can do the import like this.
  But we want this file to also be cached by browsers using `benbjohnson/hashfs`
  Hence we have the html files importing this file instead.
@import "css_reset.css";
*/

:root {
  color-scheme: light;
  --paper: #fdfdfb;
  --surface: #ffffff;
  --ink: #20211f;
  --muted: #5f625c;
  --line: #d7d9d2;
  --line-strong: #a9aca4;
  --soft: #f2f2ed;
  --link: #24558a;
  --link-hover: #173b61;
  --focus: #20211f;
  --success: #21643d;
  --success-bg: #edf6f0;
  --danger: #a12922;
  --danger-bg: #fff3f1;
  --measure: 72ch;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.58;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
input[type="submit"],
input[type="button"] {
  cursor: pointer;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
blockquote,
pre {
  margin-top: 0;
}

h1 {
  max-width: 24ch;
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

small,
.small {
  font-size: 0.875rem;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 60;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: white;
  transform: translateY(0);
}

.wordmark {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
  text-decoration: underline;
}

.button,
button.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0.55rem 0.9rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.15;
  text-decoration: none;
}

.button:hover,
button.button:hover {
  border-color: var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.button-primary,
button.button-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.button-primary:hover,
button.button-primary:hover {
  background: #000000;
  color: white;
}

.button-danger,
button.button-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
}

.button-danger:hover,
button.button-danger:hover {
  background: #7f1e19;
  color: white;
}

.public-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.public-header-inner,
.public-main,
.public-footer-inner {
  width: min(70rem, calc(100% - 3rem));
  margin-inline: auto;
}

.public-header-inner {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.public-nav,
.public-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.public-nav a,
.public-actions>a:not(.button) {
  color: var(--ink);
}

.hero {
  max-width: 54rem;
  padding: clamp(4rem, 9vw, 7rem) 0 4rem;
}

.hero>p {
  max-width: 48rem;
  font-size: 1.2rem;
}

.hero-actions,
.page-actions,
.form-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-facts>div {
  min-height: 7.5rem;
  border-right: 1px solid var(--line);
  padding: 1.25rem;
}

.product-facts>div:last-child {
  border-right: 0;
}

.product-facts dt {
  margin-bottom: 0.35rem;
  font-weight: 720;
}

.product-facts dd {
  margin: 0;
  color: var(--muted);
}

.product-example {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  margin: 4rem 0;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.example-nav {
  border-right: 1px solid var(--line);
  padding: 1.25rem;
}

.example-nav strong {
  display: block;
  margin-bottom: 1rem;
}

.example-nav span {
  display: block;
  padding: 0.22rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.example-nav .example-subitem {
  border-left: 1px solid var(--line);
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  color: var(--ink);
}

.example-main {
  padding: 1.5rem;
}

.example-main h2 {
  margin-bottom: 1rem;
}

.example-due {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.example-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  padding-top: 1rem;
}

.public-section {
  max-width: var(--measure);
  padding: 1rem 0 4rem;
}

.public-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}

.public-footer-inner {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 12rem minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 1.5rem 1rem;
  background: var(--paper);
}

.sidebar .wordmark {
  margin: 0 0.65rem 1.5rem;
}

.app-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-nav li {
  margin: 0.1rem 0;
}

.app-nav a {
  display: flex;
  min-height: 2.65rem;
  align-items: center;
  border-left: 3px solid transparent;
  padding: 0.42rem 0.65rem;
  color: var(--ink);
  font-size: 0.94rem;
  text-decoration: none;
}

.app-nav a:hover {
  background: var(--soft);
  text-decoration: underline;
}

.app-nav a[aria-current="page"] {
  border-left-color: var(--ink);
  background: var(--soft);
  font-weight: 720;
}

.nav-group>summary {
  min-height: 2.65rem;
  border-left: 3px solid transparent;
  padding: 0.55rem 0.45rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
  cursor: pointer;
}

.nav-group>summary:hover {
  background: var(--soft);
  text-decoration: underline;
}

.nav-group.current-section>summary {
  border-left-color: var(--ink);
  background: var(--soft);
  font-weight: 720;
}

.app-nav .nav-subitems {
  margin: 0 0 0.35rem 0.75rem;
  border-left: 1px solid var(--line);
}

.app-nav .nav-subitems li {
  margin: 0;
}

.app-nav .nav-subitems a {
  min-height: 2.75rem;
  border-left: 0;
  padding: 0.3rem 0.55rem;
  font-size: 0.86rem;
}

.app-nav .nav-subitems a[aria-current="page"] {
  border-left: 3px solid var(--ink);
  margin-left: -1px;
}

.nav-section {
  margin: 1.4rem 0.65rem 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 650;
}

.sidebar-account {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.sign-out-form {
  margin: 0;
}

.sign-out-form button {
  width: 100%;
  min-height: 2.65rem;
  border: 0;
  border-left: 3px solid transparent;
  padding: 0.42rem 0.65rem;
  background: transparent;
  color: var(--link);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.mobile-header {
  display: none;
}

.app-content {
  width: 100%;
  min-width: 0;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 3rem;
}

/* The gutter belongs to .app-content so that pages of different measures
   all start at the same left edge. Do not centre the page containers. */
.page {
  width: 100%;
  max-width: 70rem;
  padding: 3rem 0 5rem;
}

.page-narrow {
  max-width: 48rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
}

.page-header p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
}

.notice {
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--line-strong);
  padding: 0.8rem 1rem;
  background: var(--soft);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice-success {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.notice-danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.task-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 1.35rem 0;
}

.task-line h2,
.task-line p {
  margin-bottom: 0;
}

.due-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 2.75rem;
  border-bottom: 1px solid var(--line);
}

.due-list>div {
  padding: 0.85rem 0.75rem 0.85rem 0;
}

.due-list dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.due-list dd {
  margin: 0.1rem 0 0;
  font-size: 1.1rem;
  font-weight: 720;
}

.dashboard-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.link-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-rows li {
  border-bottom: 1px solid var(--line);
}

.link-rows a {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.link-rows a:hover {
  color: var(--link);
  text-decoration: underline;
}

.link-rows span {
  color: var(--muted);
  font-size: 0.875rem;
}

.page-diagnostics {
  margin-top: 3rem;
}

form {
  margin: 0;
}

.field {
  margin-bottom: 1.35rem;
}

.field label,
.field-label,
fieldset legend {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 680;
}

.field-help,
.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
}

.field-help {
  color: var(--muted);
}

.field-error {
  color: var(--danger);
  font-weight: 650;
}

input[type="email"],
input[type="file"],
input[type="number"],
input[type="password"],
input[type="text"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.58rem 0.68rem;
  background: var(--surface);
  color: var(--ink);
}

input[type="file"] {
  padding: 0.45rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

textarea.textarea-large {
  min-height: 15rem;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border: 2px solid var(--danger);
}

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.disclosure {
  margin: 0.4rem 0 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.disclosure>summary {
  min-height: 2.75rem;
  padding: 0.6rem 0;
  font-weight: 680;
}

.disclosure-content {
  padding: 0.8rem 0 0.2rem;
}

.form-actions {
  margin-top: 1.75rem;
}

.item-list,
.feed-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.item-list>li,
.feed-list>li {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.item-head,
.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.item-head> :first-child,
.feed-head> :first-child {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.item-title,
.feed-title {
  color: var(--ink);
  overflow-wrap: anywhere;
  font-size: 1.02rem;
  font-weight: 720;
}

.item-description,
.feed-summary {
  max-width: var(--measure);
  margin: 0.4rem 0 0;
  color: #3f423d;
}

.item-description> :last-child {
  margin-bottom: 0;
}

.item-meta,
.feed-meta {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.85rem;
  font-size: 0.9rem;
}

.feed-title {
  display: inline-block;
  margin-top: 0.18rem;
  text-decoration: none;
}

.feed-title:hover {
  text-decoration: underline;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.empty-state {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0;
}

.empty-state p {
  max-width: 50ch;
}

.note-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(13rem, 15rem);
  justify-content: space-between;
  gap: 3.5rem;
}

.note-layout>* {
  min-width: 0;
}

.markdown-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.markdown-content> :last-child {
  margin-bottom: 0;
}

.markdown-content pre {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: normal;
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--soft);
  font-size: 0.9rem;
}

.markdown-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.markdown-content img,
.markdown-content video {
  max-width: 100%;
  height: auto;
}

.note-body h2 {
  margin-top: 2rem;
}

.note-body>h2:first-child {
  margin-top: 0;
}

.metadata {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.8rem;
  font-size: 0.9rem;
}

.metadata dl {
  margin-bottom: 1rem;
}

.metadata dt {
  color: var(--muted);
}

.metadata dd {
  margin: 0 0 0.8rem;
  overflow-wrap: anywhere;
}

.metadata-action {
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.mobile-metadata {
  display: none;
}

.review-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.study-card {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.study-question,
.study-answer {
  padding: 2rem 0;
}

.study-label {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 680;
}

.study-question-content {
  max-width: 38ch;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}

.study-question-content strong {
  font-weight: 720;
}

.card-comments,
.answer-flow {
  border-top: 1px solid var(--line);
}

.card-comments>summary,
.answer-flow>summary {
  min-height: 3.25rem;
  padding: 0.72rem 0;
  color: var(--link);
  font-weight: 720;
}

.comment-body,
.study-answer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
}

.comment-body {
  overflow-wrap: anywhere;
}

.rating-form {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.rating-option {
  display: flex;
  min-height: 3.5rem;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.65rem;
}

.rating-option:has(input:checked) {
  border: 2px solid var(--ink);
  padding: calc(0.65rem - 1px);
  background: var(--soft);
}

.rating-option input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.18rem 0 0;
}

.rating-option strong,
.rating-option span {
  display: block;
}

.rating-option strong {
  color: var(--ink);
}

.rating-option span {
  color: var(--muted);
  font-size: 0.875rem;
}

.rating-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.danger-zone {
  border-top: 2px solid var(--danger);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0 1.5rem;
}

.resource-preview {
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--line-strong);
  padding-left: 1rem;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.import-grid>section {
  border-top: 1px solid var(--line-strong);
  padding-top: 1rem;
}

.auth-main {
  display: grid;
  min-height: calc(100vh - 9.25rem);
  place-items: start center;
  padding: 4rem 1.5rem;
}

.auth-panel {
  width: min(27rem, 100%);
}

.auth-panel h1 {
  font-size: 2.2rem;
}

.auth-links {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.legal-document {
  max-width: 72ch;
}

.legal-document h2 {
  margin-top: 2.4rem;
}

.legal-document h3 {
  margin-top: 1.7rem;
}

.mobile-menu {
  position: relative;
}

.mobile-menu>summary {
  min-width: 4.5rem;
  min-height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.45rem 0.7rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  list-style-position: inside;
  text-align: center;
}

.menu-panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(18rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  padding: 0.5rem;
  background: var(--surface);
}

.menu-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-panel a,
.menu-panel button {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  border: 0;
  border-left: 3px solid transparent;
  padding: 0.45rem 0.6rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.menu-panel a[aria-current="page"] {
  border-left-color: var(--ink);
  background: var(--soft);
  font-weight: 720;
}

.menu-panel .nav-group>summary {
  min-height: 2.75rem;
  padding: 0.55rem 0.6rem;
}

.menu-panel .nav-subitems {
  margin-left: 0.8rem;
  border-left: 1px solid var(--line);
}

.menu-panel .nav-subitems a {
  min-height: 2.75rem;
  padding-left: 0.85rem;
}

.menu-panel .nav-group.current-section>summary {
  border-left-color: var(--ink);
  background: var(--soft);
}

@media (max-width: 1000px) {
  .note-layout {
    display: block;
  }

  .desktop-metadata {
    display: none;
  }

  .mobile-metadata {
    display: block;
    margin-top: 2rem;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .public-header-inner,
  .public-main,
  .public-footer-inner {
    width: calc(100% - 2rem);
  }

  .public-header-inner {
    min-height: 4rem;
  }

  .public-nav,
  .public-actions .button {
    display: none;
  }

  .hero {
    padding: 3.3rem 0 2.5rem;
  }

  .hero>p {
    font-size: 1.05rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .product-facts {
    grid-template-columns: 1fr;
  }

  .product-facts>div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }

  .product-facts>div:last-child {
    border-bottom: 0;
  }

  .product-example {
    grid-template-columns: 1fr;
    margin: 3rem 0;
  }

  .example-nav {
    display: none;
  }

  .example-main {
    padding: 1rem;
  }

  .example-due {
    align-items: flex-start;
    flex-direction: column;
  }

  .example-links {
    grid-template-columns: 1fr;
  }

  .public-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 4rem;
    margin-inline: -1rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 1rem;
    background: var(--paper);
  }

  .app-content {
    max-width: none;
    padding-inline: 1rem;
  }

  .page,
  .page-narrow {
    width: 100%;
    max-width: none;
    padding: 1.5rem 0 3.5rem;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .button {
    flex: 1 1 auto;
  }

  .task-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .task-line .button {
    width: 100%;
  }

  .due-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-sections,
  .import-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  .item-head,
  .feed-head {
    flex-direction: column;
    gap: 0.6rem;
  }

  .item-actions {
    min-height: 2.75rem;
    align-items: center;
  }

  .study-question,
  .study-answer {
    padding: 1.25rem 0;
  }

  .rating-options {
    grid-template-columns: 1fr;
  }

  .rating-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .rating-actions .button {
    width: 100%;
  }

  .auth-main {
    min-height: auto;
    padding: 3rem 1rem;
  }

}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

.check-field {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.check-field input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.check-field label {
  font-weight: 680;
}

.danger-link {
  color: var(--danger);
}

.resource-preview {
  overflow-wrap: anywhere;
}

.resource-preview.study-card {
  margin-bottom: 1.5rem;
  padding: 0;
}

.resource-preview.study-card .study-question {
  padding-inline: 1rem;
}

.resource-preview.study-card .answer-flow,
.resource-preview.study-card .card-comments {
  padding-inline: 1rem;
}

.resource-url {
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  font-weight: 650;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-bar .field {
  width: min(28rem, 100%);
  margin-bottom: 0;
}

.selection-panel {
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.selection-panel>.disclosure {
  margin: 0;
  border-bottom: 0;
}

.selection-summary p {
  margin: 0.25rem 0 0;
}

.next-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.clipping-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.clipping-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}

.clipping-list article> :first-child {
  max-width: var(--measure);
  margin-bottom: 0.5rem;
}

.clipping-meta {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.instruction-section {
  max-width: var(--measure);
  margin-top: 3rem;
  border-top: 1px solid var(--line-strong);
  padding-top: 2rem;
}

.instruction-section ol {
  padding-left: 1.4rem;
}

.admin-header {
  border-bottom: 1px solid var(--line);
}

.admin-header>div,
.admin-main {
  width: min(62rem, calc(100% - 4rem));
  margin-inline: auto;
}

.admin-header>div {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-header span {
  color: var(--muted);
  font-size: 0.875rem;
}

.admin-main {
  padding: 3rem 0 5rem;
}

.query-history {
  margin-bottom: 0.8rem;
  padding-left: 1.25rem;
}

.query-history code {
  overflow-wrap: anywhere;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.9rem;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--soft);
}

@media (max-width: 760px) {
  .filter-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .filter-bar,
  .selection-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar .field {
    width: 100%;
  }

  .filter-bar .button,
  .selection-summary .button,
  .next-form .button {
    width: 100%;
  }

  .admin-header>div,
  .admin-main {
    width: calc(100% - 2rem);
  }

  .admin-main {
    padding: 2rem 0 3.5rem;
  }
}