/* TextWriter website — deliberately, lovingly 1996. */

body {
  margin: 0;
  padding: 0;
  background-color: #c0c0c0;
  background-image: radial-gradient(#a8a8a8 1px, transparent 1px);
  background-size: 16px 16px;
  color: #000000;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

a {
  color: #0000ee;
}
a:visited {
  color: #551a8b;
}
a:active {
  color: #ff0000;
}

/* ---- scrollbars --------------------------------------------------------
   Win95-style chrome for the page, the ASCII banner's horizontal
   overflow, and the screenshot viewer. Firefox supports the colors;
   Chromium/WebKit also get the beveled thumb, buttons, and arrows. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-color: #c0c0c0 #ffffff;
    scrollbar-width: auto;
  }
}

::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background: #c0c0c0;
}
::-webkit-scrollbar-track {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #c0c0c0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c0c0c0 75%);
  background-position: 0 0, 1px 1px;
  background-size: 2px 2px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #ffffff;
}
::-webkit-scrollbar-thumb {
  min-width: 24px;
  min-height: 24px;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
}
::-webkit-scrollbar-button {
  display: none;
}
::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background-color: #c0c0c0;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px outset #ffffff;
}
::-webkit-scrollbar-button:single-button:active {
  border-style: inset;
}
::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 7h8L5 3z' fill='%23000'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 3h8L5 7z' fill='%23000'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M7 1v8L3 5z' fill='%23000'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M3 1v8l4-4z' fill='%23000'/%3E%3C/svg%3E");
}
::-webkit-scrollbar-corner,
::-webkit-resizer {
  background: #c0c0c0;
  border: 2px outset #ffffff;
}

/* ---- best-viewed strip -------------------------------------------- */

.topbar {
  background: #000080;
  color: #ffff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  text-align: center;
  padding: 3px 4px;
  border-bottom: 2px solid #000000;
}
.topbar b { color: #ffffff; }

/* ---- page shell ----------------------------------------------------- */

.page {
  max-width: 760px;
  margin: 18px auto 40px;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 #808080;
  padding: 0;
}

/* ---- banner ---------------------------------------------------------- */

.banner {
  background: repeating-linear-gradient(45deg, #000080, #000080 10px, #0000c0 10px, #0000c0 20px);
  color: #ffffff;
  text-align: center;
  padding: 14px 10px 10px;
  border-bottom: 3px double #ffff00;
}
.banner-art {
  overflow-x: auto;
  max-width: 100%;
}
.banner pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 6px;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 0 0 4px #ffffff;
  margin: 0 0 6px;
  display: inline-block;
  text-align: left;
  white-space: pre;
}
@media (min-width: 700px) {
  .banner pre { font-size: 9px; }
}
.banner .tagline {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: #ffff00;
  font-size: 17px;
  letter-spacing: 0.5px;
  margin: 0;
}

/* ---- scrolling ticker ------------------------------------------------- */

.ticker {
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid #808080;
}
.ticker span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 22s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---- homepage screenshot teaser strip ---------------------------------- */

.mini-gallery {
  overflow: hidden;
  border: 2px inset #c0c0c0;
  background: #000000;
  margin: 14px 0;
}
.mini-gallery-track {
  display: flex;
  width: max-content;
  /* the list is duplicated once in the markup, so -50% is exactly
     one full set -- the loop point lands seamlessly */
  animation: mini-gallery-scroll 50s linear infinite;
}
.mini-gallery-item {
  flex: 0 0 auto;
  width: 170px;
  aspect-ratio: 4 / 3;
  margin-right: 3px;
  display: block;
  background: repeating-linear-gradient(45deg, #2a2a38, #2a2a38 9px, #202028 9px, #202028 18px);
}
.mini-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes mini-gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .mini-gallery-track { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker span { animation: none; padding-left: 1em; }
}

/* ---- nav bar of beveled buttons ---------------------------------------- */

.navbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #c0c0c0;
  padding: 8px;
  border-bottom: 2px solid #000000;
}
.navbar a {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
  color: #000000;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  padding: 6px 10px;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  font-weight: bold;
}
.navbar a:hover {
  background: #d8d8d8;
}
.navbar a:active,
.navbar a.current {
  border-style: inset;
  background: #a8a8a8;
}

/* ---- content ------------------------------------------------------------ */

.content {
  padding: 18px 22px 10px;
}
.content h1 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: #800000;
  border-bottom: 3px double #000080;
  padding-bottom: 4px;
}
.content h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: #000080;
}
.content p {
  line-height: 1.5;
}
.content marquee-fallback { display: none; }

.blink {
  animation: blinker 1s step-start infinite;
}
@keyframes blinker { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
}

.badge-new {
  background: #ff0000;
  color: #ffff00;
  font-weight: bold;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid #800000;
  vertical-align: middle;
}

hr.old {
  border: none;
  border-top: 2px groove #808080;
  margin: 12px 0;
}

/* ---- tables ---------------------------------------------------------- */

table.retro {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
}
table.retro th {
  background: #000080;
  color: #ffffff;
  text-align: left;
  padding: 6px 8px;
  border: 2px solid #000000;
}
table.retro td {
  padding: 6px 8px;
  border: 2px inset #c0c0c0;
  background: #f0f0f0;
  vertical-align: top;
}
table.retro tr:nth-child(even) td {
  background: #e4e4f4;
}

/* Give feature names a little more room so short labels do not leave
   a single word stranded on their own line. */
table.features-table th:first-child,
table.features-table td:first-child {
  box-sizing: border-box;
  width: 170px;
}

.soon {
  background: repeating-linear-gradient(45deg, #ffff00, #ffff00 8px, #000000 8px, #000000 16px) !important;
  color: #000000;
  font-weight: bold;
  text-align: center;
}

/* ---- screenshot gallery ------------------------------------------------ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}

.gallery-item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-thumb {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  border: 3px outset #ffffff;
  background:
    repeating-linear-gradient(45deg, #b8b8c8, #b8b8c8 9px, #a0a0b4 9px, #a0a0b4 18px);
  overflow: hidden;
}
.gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-placeholder-label {
  /* hidden by default -- only shown for a thumbnail whose image
     failed to load, via the onerror handler on the <img> beside it;
     without this it always painted on top of a real, loaded
     screenshot too, since both are position:absolute;inset:0 and it
     comes after the <img> in the markup */
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  color: #202030;
  padding: 4px;
  line-height: 1.4;
}
.gallery-placeholder-label .cam {
  font-size: 20px;
  margin-bottom: 2px;
}

.gallery-caption {
  display: block;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #000080;
  margin: 5px 2px 0;
}
.gallery-number {
  color: #800000;
  margin-right: 3px;
}

.gallery-item:focus-visible .gallery-thumb,
.gallery-item:hover .gallery-thumb {
  border-color: #ffff00;
}

/* ---- fake image-viewer popup ------------------------------------------- */

.gallery-viewer[hidden] {
  display: none;
}
.gallery-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 24px;
}
.gallery-window {
  background: #c0c0c0;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  /* Scales with the viewport rather than a fixed pixel cap, so a
     screenshot reads at a sensible size whether it's opened on a
     laptop or a 4K monitor -- the one place on this deliberately
     1996 site where matching the visitor's actual screen matters
     more than staying in character. */
  max-width: min(94vw, 1600px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
}
.gallery-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 3px 3px 8px;
}
.gallery-close {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  color: #000000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-weight: bold;
  font-size: 13px;
  width: 20px;
  height: 20px;
  line-height: 1;
  cursor: pointer;
}
.gallery-close:active { border-style: inset; }
.gallery-body {
  padding: 10px;
  /* vertical scroll is a rare-case fallback for an unusually tall
     image; horizontal never should be, since the image below is
     always constrained to the body's own width -- hidden here makes
     sure no stray pixel of rounding can ever produce one */
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}
.gallery-body img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  height: auto;
  margin: 0 auto;
  border: 1px solid #808080;
}

/* prev/next, as a centred row of ordinary beveled buttons below the
   picture rather than floating arrows over it -- matches the rest of
   the site's Win95-dialog chrome (same look as .dl-button) instead of
   reading like a modern carousel control */
.gallery-navrow {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.gallery-nav {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  color: #000000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-weight: bold;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
}
.gallery-nav:hover { background: #d8d8d8; }
.gallery-nav:active { border-style: inset; }
.gallery-navrow[hidden],
.gallery-nav[hidden] { display: none; }

.gallery-caption-full {
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  margin: 8px 2px 2px;
}

/* ---- download button -------------------------------------------------- */

.dl-button {
  display: inline-block;
  background: #c0c0c0;
  border: 3px outset #ffffff;
  color: #000000;
  text-decoration: none;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 14px;
}
.dl-button:hover { background: #d8d8d8; }
.dl-button:active { border-style: inset; }
.dl-button-disabled,
.dl-button-disabled:hover,
.dl-button-disabled:active {
  background: #c0c0c0;
  border-style: outset;
  color: #666666;
  cursor: not-allowed;
  text-shadow: 1px 1px #ffffff;
}

/* Keep each operating system's download table on the same grid. */
.download-table { table-layout: fixed; }
.download-table th:nth-child(1),
.download-table td:nth-child(1) { width: 20%; }
.download-table th:nth-child(2),
.download-table td:nth-child(2) { width: 65%; }
.download-table th:nth-child(3),
.download-table td:nth-child(3) { width: 15%; }

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.checksum-status {
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  line-height: 1.15;
  color: #666666;
  text-align: center;
}
a.checksum-status { color: #0000ee; }
a.checksum-status:visited { color: #551a8b; }

/* ---- launch information boxes ----------------------------------------- */

.fit-check,
.help-box,
.notice-box,
.error-dialog {
  border: 2px outset #ffffff;
  background: #c0c0c0;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  margin: 16px 0;
}
.fit-titlebar,
.help-titlebar,
.error-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 7px;
}
.fit-body,
.help-body,
.notice-box,
.error-body {
  padding: 12px 14px;
}
.fit-body p,
.help-body p,
.notice-box p,
.error-body p {
  margin: 0 0 9px;
  font-size: 13px;
}
.fit-body p:last-child,
.help-body p:last-child,
.notice-box p:last-child,
.error-body p:last-child { margin-bottom: 0; }
.fit-yes { color: #006000; }
.fit-no { color: #800000; }
.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.help-links .dl-button { padding: 6px 10px; }

.steps {
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.steps li { margin-bottom: 6px; }
.command {
  display: block;
  overflow-x: auto;
  background: #000000;
  color: #00ff00;
  border: 2px inset #c0c0c0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  padding: 8px 10px;
  margin: 8px 0 12px;
  white-space: nowrap;
}
.fineprint {
  font-size: 12px;
  color: #555555;
}
.release-status {
  display: inline-block;
  background: #ffff00;
  border: 2px outset #ffffff;
  color: #000000;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  vertical-align: middle;
}
.error-dialog {
  max-width: 520px;
  margin: 36px auto;
}
.error-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.error-icon {
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 38px;
  color: #ffffff;
  background: #ff0000;
  border: 2px outset #ffffff;
  width: 44px;
  height: 44px;
  line-height: 40px;
  text-align: center;
  box-sizing: border-box;
}
.error-actions {
  grid-column: 1 / -1;
  text-align: center;
}

/* ---- newsletter signup + donation -------------------------------------- */

.newsletter-box {
  border: 2px solid #000000;
  background: #ffffcc;
  padding: 14px 16px;
  margin: 20px 0;
  text-align: center;
}
.newsletter-box h2 {
  margin: 0 0 6px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  color: #000080;
  font-size: 20px;
}
.newsletter-box p {
  font-size: 13px;
  margin: 0 0 10px;
}
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.newsletter-form input[type="email"] {
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  padding: 6px 8px;
  border: 2px inset #c0c0c0;
  min-width: 220px;
  max-width: 100%;
}
.newsletter-fineprint {
  font-size: 11px;
  color: #555555;
  margin: 0;
}

/* prominent (download page): bigger, brighter, the main pitch */
.newsletter-box.prominent {
  border: 3px double #000080;
  padding: 20px;
}
.newsletter-box.prominent h2 { font-size: 26px; }
.newsletter-box.prominent p { font-size: 14px; }

/* subdued (every other page): a quieter one-liner + inline form,
   not a whole banner competing with the actual content */
.newsletter-box.subdued {
  background: #f0f0f0;
  padding: 10px 14px;
}
.newsletter-box.subdued h2 { font-size: 15px; }
.newsletter-box.subdued p { font-size: 12px; }

.donate-row {
  text-align: center;
  margin: 16px 0;
}
.donate-button {
  display: inline-block;
  background: #ffdd00;
  border: 3px outset #fff4b8;
  color: #000000;
  text-decoration: none;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 16px;
}
.donate-button:hover { background: #ffe74d; }
.donate-button:active { border-style: inset; }

/* thanks.html's author note: a portrait to the left of the text,
   same beveled-box + diagonal-stripe placeholder look the screenshot
   gallery already uses for a slot with no image yet, just 3:4
   instead of 4:3 and without the click-to-enlarge behavior. */
.author-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  margin: 16px 0;
}
.author-photo {
  position: relative;
  box-sizing: border-box;
  width: 192px;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 3px outset #ffffff;
  background:
    repeating-linear-gradient(45deg, #b8b8c8, #b8b8c8 9px, #a0a0b4 9px, #a0a0b4 18px);
  overflow: hidden;
}
.author-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-photo-label {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  color: #202030;
  padding: 4px;
  line-height: 1.4;
}
.author-photo-label .cam { font-size: 18px; margin-bottom: 2px; }
.author-text { min-width: 0; }
@media (max-width: 760px) {
  .author-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .author-photo { width: 180px; height: auto; }
}

/* h1 + the small support link share one row, link right-aligned
   against the heading instead of sitting on its own line below --
   less like a second ask, more like a quiet aside next to the first
   one. Only used on the download page for now.

   The link is positioned absolutely rather than as a flex sibling of
   the h1: flexbox's align-items:baseline was stretching the row's
   own height to fit both elements' line boxes, which pushed the
   double-line border-bottom (living on the row, not the h1) well
   below the heading text and opened up a big gap that didn't exist
   on any other page. Taking the link out of flow entirely removes
   that risk -- the h1 keeps its own normal border-bottom/padding
   completely unchanged from every other page, and the link just
   floats over the top-right corner of the row without affecting its
   height at all. */
.page-heading-row {
  position: relative;
}
.support-link {
  position: absolute;
  top: 0.3em;
  right: 0;
  margin: 0;
  font-size: 13px;
  color: #666666;
  white-space: nowrap;
}
.support-link a { color: #551a8b; }

/* ---- footer ------------------------------------------------------------ */

.footer {
  background: #c0c0c0;
  color: #000000;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  text-align: center;
  padding: 10px;
  border-top: 3px double #000080;
}
.webring {
  margin-top: 8px;
  color: #404040;
}

/* ---- theme exchange --------------------------------------------------- */

.exchange-intro {
  border-color: #ffffff;
}
.exchange-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(150px, auto));
  gap: 10px;
  margin: 16px 0 10px;
  padding: 10px 12px 12px;
  background: #c0c0c0;
  border: 2px groove #ffffff;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
}
.exchange-toolbar legend {
  padding: 0 5px;
  font-weight: bold;
}
.exchange-toolbar label {
  display: grid;
  gap: 4px;
  font-weight: bold;
}
.exchange-toolbar input,
.exchange-toolbar select,
.theme-submit-body input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border: 2px inset #ffffff;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  font: 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
}
.exchange-status {
  font: 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  color: #404040;
}
.exchange-status.valid { color: #006000; font-weight: bold; }
.exchange-status.invalid { color: #800000; font-weight: bold; }
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 20px;
}
.theme-card,
.theme-submit-window {
  min-width: 0;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
}
.theme-window-title {
  overflow: hidden;
  padding: 4px 7px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font: bold 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-card-body,
.theme-submit-body {
  padding: 9px;
}
.theme-color-preview {
  position: relative;
  box-sizing: border-box;
  min-height: 164px;
  overflow: hidden;
  padding: 15px;
  border: 2px inset #808080;
  font: 14px/1.7 "Courier New", Courier, monospace;
}
.theme-color-preview.compact {
  min-height: 146px;
  padding: 12px;
  font-size: 12px;
}
.theme-preview-heading {
  font-weight: bold;
  letter-spacing: 1px;
}
.theme-preview-selection {
  display: inline-block;
  margin-top: 4px;
}
.theme-preview-caret {
  display: inline-block;
  width: 8px;
  height: 1.15em;
  margin-left: 3px;
  vertical-align: -0.2em;
  animation: blink 1s step-end infinite;
}
.theme-card-meta {
  margin: 8px 1px;
  font-size: 12px;
}
.theme-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.theme-card-actions .dl-button {
  padding: 6px 9px;
  font-size: 12px;
}
.theme-submit-window {
  margin: 14px 0 20px;
}
.theme-file-label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: bold;
}
.theme-upload-preview {
  max-width: 620px;
  margin: 12px auto;
}
.theme-upload-preview h3 {
  margin: 0;
  padding: 4px 7px;
  background: #000080;
  color: #ffffff;
  font: bold 13px "MS Sans Serif", Tahoma, Geneva, sans-serif;
}
.theme-submit-actions {
  margin: 12px 0 5px;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  .theme-preview-caret { animation: none; }
}

/* small screens: keep it usable, not "modern" */
@media (max-width: 600px) {
  .page { margin: 0; border-width: 0 0 2px; box-shadow: none; }
  .navbar a { flex: 1 1 40%; }
  .exchange-toolbar { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: 1fr; }
}
