/*
 * Meadow - A clean, Medium-inspired WriteFreely theme
 *
 * Features:
 * - Light/dark mode via .light/.dark body classes
 * - Typography: Nunito (body), Playfair Display (headings), Source Code Pro (code)
 * - Clean, content-focused layout with generous whitespace
 *
 * License: MIT
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Code+Pro:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'Source Code Pro', 'SF Mono', 'Fira Code', Consolas, monospace;

  --content-width: 680px;
  --spacing-base: 1.5rem;
}

body,
body.light {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-code: #f4f4f5;

  --text-primary: #1a1a1a;
  --text-secondary: #525252;
  --text-tertiary: #737373;

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-subtle: #e0e7ff;

  --border: #e5e5e5;
  --border-strong: #d4d4d4;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark {
  --bg-primary: #0f0f0f;
  --bg-secondary: #171717;
  --bg-code: #262626;

  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;

  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-subtle: #1e1b4b;

  --border: #262626;
  --border-strong: #404040;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

body.dark img {
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

body.dark img:hover {
  opacity: 1;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
#blog-title,
.post-title,
article h2#title {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

#blog-title a,
#blog-title a:link,
#blog-title a:visited {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

#blog-title a:hover {
  color: var(--accent);
}

header p.description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: normal;
  margin-top: 0.5rem;
}

header nav a {
  font-family: var(--font-body);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: var(--accent);
}

body#post article,
body#collection article,
body#subpage article {
  max-width: var(--content-width);
}

body#post article h2#title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

@media (max-width: 680px) {
  body#post article h2#title {
    font-size: 1.875rem;
  }
}

body#post article time.dt-published,
body#collection article time.dt-published,
body#subpage article time.dt-published {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

article .e-content {
  margin-top: var(--spacing-base);
}

article .e-content p {
  margin-bottom: 1.5em;
  color: var(--text-primary);
}

article .e-content h2,
article .e-content h3,
article .e-content h4,
article .e-content h5,
article .e-content h6 {
  font-family: var(--font-heading);
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  color: var(--text-primary);
}

article .e-content h2 {
  font-size: 1.75rem;
}

article .e-content h3 {
  font-size: 1.375rem;
}

article .e-content h4 {
  font-size: 1.125rem;
}

article .e-content a,
article .e-content a:link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

article .e-content a:visited {
  color: var(--accent);
}

article .e-content a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

article .e-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

article .e-content blockquote p {
  color: var(--text-secondary);
}

article .e-content ul,
article .e-content ol {
  margin: 1.5em 0;
  padding-left: 1.5rem;
}

article .e-content li {
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

article .e-content code,
body#post code,
body#collection code,
body#subpage code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-code);
  color: var(--text-primary);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-weight: 400;
}

article .e-content pre,
body#post pre,
body#collection pre,
body#subpage pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  background-color: var(--bg-code);
  color: var(--text-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

article .e-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

article .e-content hr {
  border: none;
  height: 1px;
  background-color: var(--border);
  margin: 3rem 0;
}

article .e-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

article .e-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

article .e-content th {
  font-family: var(--font-body);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  background-color: var(--bg-code);
  border-bottom: 2px solid var(--border-strong);
  color: var(--text-primary);
}

article .e-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.post-title a,
.post-title a:link,
.post-title a:visited {
  font-family: var(--font-heading);
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: var(--accent);
}

body#collection a.read-more,
body#subpage a.read-more {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

body#collection a.read-more:hover,
body#subpage a.read-more:hover {
  color: var(--accent-hover);
}

a.hashtag {
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 600;
}

a.hashtag:hover {
  color: var(--accent);
}

footer nav {
  font-family: var(--font-body);
  color: var(--text-tertiary);
}

footer nav a,
footer nav a:link,
footer nav a:visited {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer nav a:hover {
  color: var(--accent);
}

nav#manage ul {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

nav#manage ul li {
  border-bottom: 1px solid var(--border);
}

nav#manage ul li:last-child {
  border-bottom: none;
}

nav#manage ul a {
  font-family: var(--font-body);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  display: block;
  transition: background-color 0.2s ease;
}

nav#manage ul a:hover {
  background-color: var(--bg-code);
}

/* Click-based dropdown (disable hover, use .open class from menu.js) */
.dropdown-nav ul ul {
  display: none !important;
}

.dropdown-nav ul li.has-submenu.open > ul {
  display: block !important;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  right: 0;
  left: auto;
}

.dropdown-nav ul a {
  font-family: var(--font-body);
  color: var(--text-primary);
}

/* Post byline with avatar */
.post-byline {
  margin: 0.75rem 0 0.5rem 0;
}

.post-byline .byline-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.post-byline .byline-author:hover {
  color: var(--accent);
}

.post-byline .byline-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

a.user.hidden.action,
.hidden.user.action {
  font-family: var(--font-body);
  color: var(--text-tertiary);
  opacity: 1;
  font-size: 0.875rem;
}

a.btn,
button,
input[type="submit"] {
  font-family: var(--font-body);
  font-weight: 600;
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

a.btn:hover,
button:hover,
input[type="submit"]:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  font-family: var(--font-body);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  outline: none;
}

::selection {
  background-color: var(--accent-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert {
  font-family: var(--font-body);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  line-height: 1.5;
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 0.5rem;
}

.alert.info {
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent);
  color: var(--text-primary);
}

.alert.success {
  background-color: #dcfce7;
  border: 1px solid #22c55e;
  color: #166534;
}

body.dark .alert.success {
  background-color: #14532d;
  border-color: #22c55e;
  color: #bbf7d0;
}

.alert.danger,
.alert.error {
  background-color: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

body.dark .alert.danger,
body.dark .alert.error {
  background-color: #450a0a;
  border-color: #ef4444;
  color: #fecaca;
}

.alert.warning {
  background-color: #fefce8;
  border: 1px solid #eab308;
  color: #854d0e;
}

body.dark .alert.warning {
  background-color: #422006;
  border-color: #eab308;
  color: #fef08a;
}

.alert h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.alert p.dismiss {
  font-size: 0.875rem;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

ul.errors {
  padding: 0;
  list-style: none;
}

ul.errors li.urgent {
  font-style: italic;
  text-align: center;
  color: #eab308;
}

ul.errors li.info {
  font-size: 1.1rem;
  text-align: center;
}

/* ==========================================================================
   Modal Dialogs
   ========================================================================== */

#overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  backdrop-filter: blur(2px);
}

.modal {
  display: none;
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 30rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.modal .body {
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.modal input:disabled {
  opacity: 0.4;
}

.modal .form-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.modal a:link,
.modal a:visited {
  color: var(--accent);
}

.modal a:hover {
  color: var(--accent-hover);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pager,
#paging {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  font-family: var(--font-body);
}

.pager a,
.btn.pager,
#paging a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pager a:hover,
.btn.pager:hover,
#paging a:hover {
  background-color: var(--bg-code);
  border-color: var(--border-strong);
  text-decoration: none;
}

.pager a.selected,
#paging a.selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  cursor: default;
}

.pager a.disabled,
#paging a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   Form Error States
   ========================================================================== */

input.error,
textarea.error,
input[type="text"].error,
input[type="email"].error,
input[type="password"].error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

input.error:focus,
textarea.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

p.error {
  color: #ef4444;
  font-style: italic;
  font-size: 0.9rem;
}

.success {
  color: #22c55e;
}

.check,
.blip {
  color: #22c55e;
  font-size: 1.125rem;
}

.ex.failure {
  color: #ef4444;
  font-weight: 700;
}

/* ==========================================================================
   Pad / Editor Styles
   ========================================================================== */

body#pad,
body#pad-sub {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body#pad #tools,
body#pad-sub #tools {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  opacity: 0.3;
  transition: opacity 0.3s ease, background-color 0.25s ease;
  z-index: 10;
}

body#pad #tools:hover,
body#pad-sub #tools:hover {
  opacity: 1;
}

body#pad #tools h1,
body#pad-sub #tools h1 {
  display: inline-block;
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-heading);
}

body#pad #tools h1 a,
body#pad-sub #tools h1 a {
  color: var(--text-primary);
  text-decoration: none;
}

body#pad #tools nav,
body#pad-sub #tools nav {
  font-family: var(--font-body);
}

body#pad #tools #belt,
body#pad-sub #tools #belt {
  float: right;
}

body#pad #tools #belt a,
body#pad-sub #tools #belt a {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

body#pad #tools #belt a:hover,
body#pad-sub #tools #belt a:hover {
  opacity: 1;
  color: var(--text-primary);
}

body#pad #tools #belt a.disabled,
body#pad-sub #tools #belt a.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

body#pad #tools .tool#status,
body#pad-sub #tools .tool#status {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

body#pad #tools .tool#status.doing,
body#pad-sub #tools .tool#status.doing {
  font-style: italic;
}

body#pad textarea,
body#pad #title {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% - 4rem);
  padding: 2rem;
  font-size: 1.2rem;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: none;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body#pad textarea.norm,
body#pad textarea.sans {
  font-family: var(--font-body);
}

body#pad textarea.mono,
body#pad textarea.code {
  font-family: var(--font-mono);
  white-space: pre;
  word-wrap: normal;
}

body#pad .alert {
  position: fixed;
  bottom: 1rem;
  left: 2rem;
  right: 2rem;
  z-index: 20;
}

@media (min-width: 50rem) {
  body#pad textarea,
  body#pad #title {
    padding-left: 10%;
    padding-right: 10%;
  }
  body#pad .alert {
    left: 10%;
    right: 10%;
  }
}

@media (min-width: 70rem) {
  body#pad textarea,
  body#pad #title {
    padding-left: 20%;
    padding-right: 20%;
  }
  body#pad .alert {
    left: 20%;
    right: 20%;
  }
}

/* Pad dropdown navigation */
body#pad #tools nav ul,
body#pad-sub #tools nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body#pad #tools nav ul ul,
body#pad-sub #tools nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 10rem;
  z-index: 20;
}

body#pad #tools nav ul li:hover > ul,
body#pad-sub #tools nav ul li:hover > ul {
  display: block;
}

body#pad #tools nav ul ul li,
body#pad-sub #tools nav ul ul li {
  display: block;
}

body#pad #tools nav ul ul a,
body#pad-sub #tools nav ul ul a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
}

body#pad #tools nav ul ul a:hover,
body#pad-sub #tools nav ul ul a:hover {
  background-color: var(--bg-code);
}

body#pad #tools nav ul ul li hr,
body#pad-sub #tools nav ul ul li hr {
  margin: 0.5rem 0.75rem;
  border: none;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Material Icons Support
   ========================================================================== */

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }

.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
.material-icons.md-light { color: white; }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }

img.ic-18dp {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

img.ic-24dp {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* ==========================================================================
   Admin Navigation
   ========================================================================== */

nav#admin {
  display: block;
  margin: 0.5rem 0;
  font-family: var(--font-body);
}

nav#admin a {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-right: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav#admin a:hover {
  background-color: var(--bg-code);
  color: var(--text-primary);
}

nav#admin a.selected {
  background-color: var(--border);
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   Admin Actions & Features
   ========================================================================== */

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-actions .btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
}

.features {
  margin: 1rem 0;
}

.features div:first-child {
  font-weight: 700;
}

.features div p {
  font-weight: 400;
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Sign-in Buttons
   ========================================================================== */

.row.signinbtns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 1rem;
}

.row.signinbtns .loginbtn {
  height: 40px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease;
}

.row.signinbtns .loginbtn img {
  height: 1.5rem;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.row.signinbtns .loginbtn#gitlab-login {
  background-color: #fc6d26;
  border-color: #fc6d26;
  color: white;
}

.row.signinbtns .loginbtn#gitlab-login:hover {
  background-color: #e5621f;
}

.row.signinbtns .loginbtn#gitea-login {
  background-color: #2ecc71;
  border-color: #2ecc71;
  color: white;
}

.row.signinbtns .loginbtn#gitea-login:hover {
  background-color: #27ae60;
}

.row.signinbtns .loginbtn#slack-login,
.row.signinbtns .loginbtn#generic-oauth-login {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.row.signinbtns .loginbtn#slack-login:hover,
.row.signinbtns .loginbtn#generic-oauth-login:hover {
  background-color: var(--bg-code);
}

.or {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.or p {
  display: inline-block;
  background-color: var(--bg-primary);
  padding: 0 1rem;
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

.or hr {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Error Page
   ========================================================================== */

.error-page {
  text-align: center;
  max-width: 40rem;
  margin: 4rem auto;
  padding: 0 2rem;
}

.error-page p.msg {
  font-size: 1.8rem;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.error-page p.commentary {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.error-page a {
  color: var(--accent);
}

.error-page a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  header,
  footer,
  nav,
  .hidden,
  #tools {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  article {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  table, figure, img {
    page-break-inside: avoid;
  }

  h1 {
    page-break-before: always;
  }
}
