/* Gruber Darker colors, original Modest fonts and sizes */
/* Updated with improved mobile text sizing */

html {
  font-size: 16px; /* Increased from 12px for better mobile readability */
}

@media screen and (max-width: 32rem) {
  html { 
    font-size: 18px; /* Even larger text on very small screens */
  }
  body {
    padding: 1rem; /* More padding on small screens */
    line-height: 1.9; /* Slightly increased line height for mobile */
  }
}

@media screen and (min-width: 32rem) and (max-width: 48rem) {
  html { font-size: 17px; /* Slightly increased */ }
}

@media screen and (min-width: 48rem) {
  html { font-size: 18px; /* Slightly increased */ }
}

body {
  font-family: sans-serif; /* original */
  line-height: 1.85;
  color: #e4e4ef; /* gruber-darker-fg */
  background-color: #181818; /* gruber-darker-bg */
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.25rem;
}

/* Typography */
h1, .modest-h1,
h2, .modest-h2,
h3, .modest-h3,
h4, .modest-h4 {
  margin: 1.414rem 0 0.5rem;
  font-weight: inherit;
  line-height: 1.42;
}

h2, .modest-h1 { font-size: 2.827rem; margin-top: 0; }
h3, .modest-h2 { font-size: 1.999rem; }
h4, .modest-h3 { font-size: 1.414rem; }
h5, .modest-h4 { font-size: 1.121rem; }
h6, .modest-h5 { font-size: 0.88rem; }
h6, .modest-h6 { font-size: 0.5rem; }

small, .modest-small { font-size: 0.707em; }

strong { font-weight: bold; color: #ffdd33; }
em { font-style: italic; color: #73c936; }

/* Links */
a, a:visited { color: #96a6c8; text-decoration: underline; }
a:hover, a:focus, a:active { color: #9e95c7; }
.modest-no-decoration { text-decoration: none; }

/* Code blocks */
pre, code {
  font-family: Menlo, Monaco, "Courier New", monospace;
  background-color: #282828;
  color: #f4f4ff;
}

pre {
  padding: 0.5rem;
  line-height: 1.25;
  overflow-x: auto;
  border: 1px solid #453d41;
}

/* Blockquotes */
blockquote {
  border-left: 8px solid #282828;
  padding: 1rem;
  color: #73c936;
}

/* Images, media */
img, canvas, iframe, video, svg, select, textarea {
  max-width: 100%;
}

/* Tables */
table { border-collapse: collapse; }
th, td { border: 1px solid #453d41; padding: 0.25rem 0.5rem; }

/* Print styles */
@media print {
  *, *:before, *:after {
    background: transparent !important;
    color: #e4e4ef !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a[href]:after { content: " (" attr(href) ")"; }
  a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; }

  pre, blockquote { border: 1px solid #282828; page-break-inside: avoid; }
  thead { display: table-header-group; }
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }

  h2, h3 { page-break-after: avoid; }
  p, h2, h3 { orphans: 3; widows: 3; }
}

/* Line numbers */
.line-number { color: #565f73; }
.line-number-current { color: #ffdd33; }
