body.notebook-login, body.notebook-help, body.notebook-calendar {
  background-image: linear-gradient(90deg, transparent 51px, var(--margin-rule) 51px, var(--margin-rule) 52px, transparent 52px),
    repeating-linear-gradient(transparent 0, transparent 31px, var(--rule) 31px, var(--rule) 32px);
}
.notebook-login { padding: 1.5rem; font-size: 1.375rem; }
.notebook-login .card {
  width: min(420px, 100%); padding: 2rem; border: 1px solid var(--border);
  border-radius: 4px; background: var(--bg); box-shadow: var(--paper-shadow);
}
.notebook-login .icon {
  background: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 50%; box-shadow: none;
}
.notebook-login h1 { font-size: 2.5rem; }
.notebook-login p.sub { font-size: 1.3rem; }
.notebook-login label { font-size: 1.2rem; }
.notebook-login input {
  border: 1px solid var(--border); border-radius: 3px; background: var(--surface);
  box-shadow: none; font-family: ui-monospace, monospace; font-size: 1rem;
}
.notebook-login input:focus { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.notebook-login button {
  background: var(--accent); color: var(--ink-on-accent); border-radius: 3px;
  font: 700 1.4rem var(--handwriting); box-shadow: none;
}
.notebook-login p.error { color: var(--danger); border: 1px solid var(--danger); background: var(--surface); font-size: 1.2rem; border-radius: 3px; }
.notebook-help header, .notebook-calendar header { background: var(--bg); padding: 0.8rem 1.5rem; font-size: 1.2rem; }
.notebook-help header a { font-size: 1.2rem; }
.notebook-help header .name, .notebook-calendar header span { font-size: 1.6rem; }
.notebook-help main { max-width: 832px; padding: 2rem 2rem 4rem 4.5rem; line-height: 1.5; overflow-wrap: anywhere; }
.notebook-help h1 { font-size: 2.5rem; }
.notebook-help h2 { font-size: 1.9rem; margin-top: 2.5rem; }
.notebook-help h3 { font-size: 1.6rem; color: var(--text); }
.notebook-help p, .notebook-help ul, .notebook-help ol { font-size: 1.4rem; }
.notebook-help code { font-size: 0.7em; }
.notebook-help pre { border-radius: 3px; font-size: 0.95rem; line-height: 1.6; }
.notebook-help pre code { font-size: inherit; }
.notebook-calendar { font-family: var(--handwriting); font-size: 1.3rem; }
.notebook-calendar main { padding-left: 4.5rem; }
.notebook-calendar h1 { font-size: 2.7rem; }
.notebook-calendar h2 { font-size: 1.5rem; }
.notebook-calendar .panel { background: var(--bg); border-radius: 3px; box-shadow: 2px 3px 0 var(--paper-edge); }
.notebook-calendar button { border-radius: 3px; }
.notebook-calendar .hint { font-size: 1.15rem; }
.notebook-calendar code { font-size: 0.7em; }
.notebook-calendar #task-calendar { background: var(--bg); }
.notebook-calendar .fc { font-family: var(--handwriting); }
.notebook-calendar .fc .fc-toolbar-title { font-size: 1.9rem; }
.notebook-calendar .fc .fc-button { font-family: inherit; font-size: 1.15rem; }
.notebook-calendar .fc .fc-daygrid-event, .notebook-calendar .fc .fc-list-event { font-size: 1.15rem; }
.notebook-calendar .fc .fc-col-header-cell-cushion { color: var(--text); }
.notebook-calendar .fc .fc-daygrid-day-number { color: var(--accent); }
.notebook-calendar .fc .task-open { background: var(--accent); border-color: var(--accent); color: var(--ink-on-accent); }
.notebook-calendar .fc .task-completed { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.notebook-calendar .fc .fc-event-main { color: inherit; }
.notebook-calendar .fc .fc-list-event-dot { border-color: var(--accent); }
.notebook-calendar .fc .task-completed .fc-list-event-dot { border-color: var(--muted); }
.notebook-calendar #task-status.error { color: var(--danger); }
.task-form, .notebook-calendar .controls, .notebook-calendar #task-status,
.notebook-calendar #task-details, .notebook-calendar .hint, .task-list {
  font-family: var(--interface-font); font-size: 0.9rem; line-height: 1.5;
}
.task-form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem;
  margin-bottom: 1.5rem; padding: 1rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: 3px;
}
.task-form label { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.task-form label:first-child { flex: 1; min-width: min(220px, 100%); }
.task-form input:not([type="checkbox"]), .task-form textarea {
  width: 100%; padding: 0.5rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 3px; font-family: var(--interface-font); font-size: 1rem;
}
.task-form label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; }
#edit-task-form { padding: 0; border: none; flex-direction: column; align-items: stretch; }
#edit-task-form label:first-child { min-width: 0; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--border); }
.task-list button { text-align: left; flex: 1; background: var(--bg); border: none; overflow-wrap: anywhere; }
.notebook-calendar nav { display: flex; gap: 1rem; font-family: var(--interface-font); font-size: 0.9rem; }
.notebook-calendar[data-view="tasks"] .layout { grid-template-columns: minmax(0, 1fr) 320px; }
.notebook-calendar .task-form button { font-family: var(--interface-font); }
.notebook-calendar #undated-tasks button { width: auto; font-family: var(--interface-font); font-size: 0.9rem; }
@media (max-width: 1000px) {
  .notebook-calendar[data-view="tasks"] .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .notebook-calendar header { flex-wrap: wrap; }
  .task-form { padding: 0.75rem; }
}
@media (max-width: 560px) {
  body.notebook-login, body.notebook-help, body.notebook-calendar {
    background-image: linear-gradient(90deg, transparent 19px, var(--margin-rule) 19px, var(--margin-rule) 20px, transparent 20px),
      repeating-linear-gradient(transparent 0, transparent 31px, var(--rule) 31px, var(--rule) 32px);
  }
  .notebook-login .card { padding: 1.5rem; }
  .notebook-help header, .notebook-calendar header { padding: 0.6rem 0.85rem; }
  .notebook-help main, .notebook-calendar main { padding: 1.5rem 0.85rem 3rem 2rem; }
  .notebook-calendar .fc .fc-daygrid-event { font-size: 0.95rem; }
  .notebook-calendar .fc .fc-col-header-cell-cushion { font-size: 1rem; }
}
