/* Shared paper, type and navigation for the student journal. */
body[data-student-view] {
  --journal-display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  --journal-numbers: Georgia, "Times New Roman", var(--journal-display);
  --paper: #fffef8;
  --ink: #222a24;
  --muted: #526057;
  --border: color-mix(in srgb, var(--forest) 20%, #f3eee1);
  --shadow: none;
  --journal-width: min(1120px, calc(100% - 64px));
  background: var(--page, #f7f4eb);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100svh;
}
body[data-student-view] :where(.header-inner, .nav-inner, main) {
  width: var(--journal-width);
}
body[data-student-view] .site-header {
  background: var(--paper);
  border-top: 3px solid var(--forest);
  border-bottom: 1px solid var(--border);
}
body[data-student-view] .header-inner { min-height: 65px; }
body[data-student-view] .brand { gap: 10px; }
body[data-student-view] .brand-name {
  font: 700 1.37rem/1.2 var(--journal-display);
  letter-spacing: .04em;
}
body[data-student-view] .brand-mark {
  display: inline-block;
  width: 26px;
  height: 32px;
  border-radius: 1px 4px 3px 1px;
  border-left: 3px double var(--paper);
  background: var(--forest);
  box-shadow: -2px 0 0 var(--forest);
}
body[data-student-view] .brand-mark::before {
  inset: 7px 4px auto 5px;
  height: 7px;
  border: 0;
  border-radius: 0;
  background: #ede9d9;
}
body[data-student-view] .brand-mark::after {
  left: auto;
  right: 4px;
  top: 25px;
  height: 9px;
  width: 4px;
  background: #af553b;
  box-shadow: none;
}
body[data-student-view] .identity .button {
  border-radius: 3px;
  min-height: 42px;
}
body[data-student-view] .identity .nickname-edit span { font-weight: 700; color: var(--ink); }
body[data-student-view] .student-nav-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
body[data-student-view] .navigation { background: var(--paper); }
body[data-student-view] .nav-inner { gap: 7px; }
body[data-student-view] .nav-link {
  gap: 7px;
  min-height: 47px;
  padding: 4px 12px 2px;
  font-weight: 640;
}
body[data-student-view] .nav-link[aria-current="page"] { color: var(--forest); }
body[data-student-view] .nav-link:hover { background: color-mix(in srgb, var(--forest) 5%, var(--paper)); }
body[data-student-view] main:not(.auth-main) { padding-top: clamp(20px, 3vw, 40px); }
body[data-student-view] :is(.page-heading, .journal-dateline) :where(h1) {
  font: 700 clamp(1.75rem, 3.8vw, 2.65rem)/1.3 var(--journal-display);
  letter-spacing: .025em;
}
body[data-student-view] .eyebrow { font-variant-numeric: tabular-nums; letter-spacing: .09em; }
body[data-student-view] .card { box-shadow: none; }
body[data-student-view] .button { border-radius: 5px; }
body[data-student-view] :where(input, select) { border-radius: 4px; }
body[data-student-view] :is(input, select, button, a, summary):focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
}
body[data-student-view] dialog {
  border: 1px solid var(--border);
  border-top: 4px solid var(--forest);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
body[data-student-view] dialog h2 { font-family: var(--journal-display); font-weight: 700; }
body[data-student-view] .notice:not(:empty) {
  border-radius: 5px;
  border-inline-start: 4px solid var(--forest);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 22px #1d2e2126;
}
body[data-student-view] .notice-praise { color: var(--forest); }

@media (min-width: 1120px) {
  body[data-student-view] .navigation {
    position: absolute;
    left: 50%;
    top: 3px;
    transform: translateX(-50%);
    background: transparent;
    border: none;
  }
  body[data-student-view] .nav-inner { width: max-content; gap: 0; }
  body[data-student-view] .nav-link { min-height: 65px; }
  body[data-student-view] .identity span { max-width: 128px; }
}

/* The form is a page of the same book as the photographic cover. */
body[data-student-view] main.auth-main {
  width: min(1000px, calc(100% - 64px));
  padding-block: clamp(30px, 5vw, 70px);
}
body[data-student-view] .auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1fr);
  grid-template-areas: "cover form";
  gap: 0;
  max-width: none;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--paper);
  border-radius: 3px 9px 9px 3px;
  box-shadow: 0 3px 0 -1px var(--paper), 0 4px 0 -1px var(--border), 0 16px 36px -22px #282b2040;
}
body[data-student-view] .journal-cover {
  grid-area: cover;
  background: #334e40 url('/images/journal-desk.webp') center center / cover no-repeat;
}
body[data-student-view] .auth-panel {
  grid-area: form;
  align-self: center;
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: clamp(24px, 4vw, 56px);
}
body[data-student-view] .auth-panel h1 {
  font: 700 clamp(1.8rem, 3.1vw, 2.4rem)/1.35 var(--journal-display);
  letter-spacing: .035em;
}
body[data-student-view] .auth-role {
  border-radius: 0;
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
}
body[data-student-view] .auth-role button {
  background: transparent;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  box-shadow: none;
}
body[data-student-view] .auth-role button[aria-pressed="true"] {
  border-bottom-color: var(--forest);
  color: var(--forest);
}
body[data-student-view] .auth-panel .form-stack { gap: 13px; }
body[data-student-view] .auth-panel input { min-height: 47px; background: #fff; border-color: #9ca79a; }
body[data-student-view] .auth-panel [data-action="id-keyboard"] {
  padding-inline: 0;
  text-decoration: underline;
  text-underline-offset: .2em;
  justify-self: start;
  min-height: 32px;
  margin-block: -8px -4px;
}
body[data-student-view] .first-registration {
  background: color-mix(in srgb, var(--forest) 6%, var(--paper));
  border-inline-start: 2px solid var(--forest);
  padding-inline: 12px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .85rem;
}
body[data-student-view] .first-registration a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  min-height: 44px;
  text-underline-offset: .22em;
}
body[data-student-view] .auth-panel .button.primary { min-height: 46px; }
body[data-student-view] .auth-actions a { display: inline-flex; align-items: center; min-height: 42px; }
@media (max-width: 780px) {
  body[data-student-view] { --journal-width: calc(100% - 32px); }
  body[data-student-view] .auth-layout { grid-template-columns: 1fr; grid-template-areas: "cover" "form"; max-width: 490px; }
  body[data-student-view] .journal-cover { height: clamp(75px, 20vw, 140px); background-position: 50% 65%; }
  body[data-student-view] main.auth-main { width: var(--journal-width); padding-block: 20px 32px; }
  body[data-student-view] .auth-panel { padding: 20px clamp(17px, 5vw, 32px) 14px; }
}
@media (max-width: 660px) {
  body[data-student-view] .header-inner { min-height: 54px; gap: 8px; }
  body[data-student-view] .brand-name { font-size: 1.1rem; }
  body[data-student-view] .brand-mark { transform: scale(.86); }
  body[data-student-view] .identity { gap: 0; }
  body[data-student-view] .identity .button { font-size: .76rem; padding-inline: 5px; }
  body[data-student-view] main:not(.auth-main) { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  body[data-student-view] .navigation {
    position: fixed;
    z-index: 4;
    inset: auto 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--border);
  }
  body[data-student-view] .nav-inner { width: 100%; display: flex; gap: 0; padding-inline: 3px; }
  body[data-student-view] .nav-link {
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
    gap: 3px;
    padding: 5px 0;
    border-bottom: 0;
    border-top: 3px solid transparent;
    font-size: clamp(.67rem, 2.9vw, .78rem);
    letter-spacing: 0;
  }
  body[data-student-view] .nav-link[aria-current="page"] {
    border-top-color: var(--forest);
    background: color-mix(in srgb, var(--forest) 6%, var(--paper));
  }
  body[data-student-view] .notice { bottom: calc(72px + env(safe-area-inset-bottom)); }
  html:has(body[data-student-view] .navigation:not([hidden])) { scroll-padding-block-end: calc(70px + env(safe-area-inset-bottom)); }
}
