/* Windows 95 theme.
   Every rule is scoped under [data-theme="win95"] on <html>, which the
   theme picker sets. Loaded after main.css. */

[data-theme="win95"] {
  --w95-face: #c0c0c0;
  --w95-light: #dfdfdf;
  --w95-white: #ffffff;
  --w95-shadow: #808080;
  --w95-dark: #0a0a0a;
  --w95-desktop: #008080;
  --w95-navy: #000080;
  --w95-title-end: #1084d0;
  --w95-link: #0000ee;
  --w95-visited: #551a8b;
  --w95-font: Tahoma, "Microsoft Sans Serif", "MS Sans Serif", Geneva, Verdana, sans-serif;
  --w95-mono: "Courier New", Courier, monospace;

  /* Bevels. Win95 draws them as two 1px rings, light on one side and dark
     on the other. */
  --w95-raised: inset -1px -1px var(--w95-dark), inset 1px 1px var(--w95-white),
                inset -2px -2px var(--w95-shadow), inset 2px 2px var(--w95-light);
  --w95-pressed: inset -1px -1px var(--w95-white), inset 1px 1px var(--w95-dark),
                 inset -2px -2px var(--w95-light), inset 2px 2px var(--w95-shadow);
  --w95-sunken: inset -1px -1px var(--w95-white), inset 1px 1px var(--w95-shadow),
                inset -2px -2px var(--w95-light), inset 2px 2px var(--w95-dark);
  --w95-field: inset -1px -1px var(--w95-white), inset 1px 1px var(--w95-shadow);

  /* Remap the dark-theme tokens from main.css so any rule not overridden
     below still lands on the light palette. */
  --bg-primary: var(--w95-face);
  --bg-secondary: var(--w95-white);
  --bg-tertiary: var(--w95-face);
  --bg-elevated: var(--w95-light);
  --border-default: var(--w95-shadow);
  --border-muted: var(--w95-light);
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #404040;
  --accent-primary: var(--w95-navy);
  --accent-secondary: #800000;
  --accent-success: #008000;
  --accent-warning: #806000;
  --shadow-medium: none;
  --shadow-large: none;

  background: var(--w95-desktop);
  scrollbar-color: var(--w95-face) var(--w95-light);
}

[data-theme="win95"] body {
  background: var(--w95-desktop);
  color: #000;
  font-family: var(--w95-font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  padding-bottom: 32px; /* room for the fixed taskbar */
}

[data-theme="win95"] ::selection {
  background: var(--w95-navy);
  color: #fff;
}

[data-theme="win95"] * {
  transition: none !important;
}

/* Scrollbars (WebKit/Blink). The track uses the classic checker dither. */
[data-theme="win95"]::-webkit-scrollbar,
[data-theme="win95"] ::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

[data-theme="win95"]::-webkit-scrollbar-track,
[data-theme="win95"] ::-webkit-scrollbar-track {
  background-color: var(--w95-light);
  background-image: conic-gradient(var(--w95-white) 25%, transparent 0 50%, var(--w95-white) 0 75%, transparent 0);
  background-size: 2px 2px;
}

[data-theme="win95"]::-webkit-scrollbar-thumb,
[data-theme="win95"] ::-webkit-scrollbar-thumb {
  background: var(--w95-face);
  box-shadow: var(--w95-raised);
}

/* Typography */
[data-theme="win95"] h1,
[data-theme="win95"] h2,
[data-theme="win95"] h3,
[data-theme="win95"] h4,
[data-theme="win95"] h5,
[data-theme="win95"] h6 {
  color: #000;
  font-family: var(--w95-font);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

[data-theme="win95"] h1 { font-size: 2rem; margin-bottom: 12px; }
[data-theme="win95"] h2 { font-size: 1.4rem; margin-bottom: 12px; }
[data-theme="win95"] h3 { font-size: 1.15rem; margin-bottom: 8px; }

[data-theme="win95"] p {
  color: #000;
  line-height: 1.6;
}

[data-theme="win95"] a {
  color: var(--w95-link);
  text-decoration: underline;
}

[data-theme="win95"] a:visited {
  color: var(--w95-visited);
}

[data-theme="win95"] a:focus-visible,
[data-theme="win95"] label:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

/* Taskbar (the site header, pinned to the bottom of the screen) */
[data-theme="win95"] .site-header {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--w95-face);
  box-shadow: inset 0 1px var(--w95-light), inset 0 2px var(--w95-white);
  z-index: 100;
}

[data-theme="win95"] .site-header::before {
  display: none;
}

[data-theme="win95"] .site-header .container {
  max-width: none;
  height: 100%;
  padding: 4px 2px 2px;
}

[data-theme="win95"] .header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 100%;
}

/* Shared taskbar button look */
[data-theme="win95"] .site-title,
[data-theme="win95"] .task-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  background: var(--w95-face);
  box-shadow: var(--w95-raised);
  color: #000;
  font-family: var(--w95-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  border-radius: 0;
}

[data-theme="win95"] .site-title {
  flex: none;
  font-weight: 700;
}

[data-theme="win95"] .site-title:hover,
[data-theme="win95"] .site-title:visited {
  color: #000;
  background: var(--w95-face);
  text-decoration: none;
}

[data-theme="win95"] .site-title:active,
[data-theme="win95"] .site-header:has(.nav-trigger:checked) .site-title {
  box-shadow: var(--w95-pressed);
}

/* One taskbar button for the open window; pressed while it is showing */
[data-theme="win95"] .task-button {
  flex: 0 1 180px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 2px;
}

[data-theme="win95"] .task-button[aria-pressed="true"] {
  font-weight: 700;
  box-shadow: var(--w95-pressed);
  background-color: var(--w95-light);
  background-image: conic-gradient(var(--w95-white) 25%, transparent 0 50%, var(--w95-white) 0 75%, transparent 0);
  background-size: 2px 2px;
}

/* Four-pane window flag drawn with gradients. */
[data-theme="win95"] .start-logo {
  display: block;
  width: 16px;
  height: 14px;
  flex: none;
  background:
    linear-gradient(#f00, #f00) 0 0 / 7px 6px no-repeat,
    linear-gradient(#0a0, #0a0) 9px 0 / 7px 6px no-repeat,
    linear-gradient(#00f, #00f) 0 8px / 7px 6px no-repeat,
    linear-gradient(#ff0, #ff0) 9px 8px / 7px 6px no-repeat;
  transform: skewY(-6deg);
}

[data-theme="win95"] .site-nav {
  display: contents;
}

/* Start menu: the nav links, opened by the Start button (desktop.js) or,
   without JavaScript, by nothing; the links are then reached from the
   pages themselves. */
[data-theme="win95"] .site-header .nav-links {
  display: none;
}

[data-theme="win95"] .nav-trigger:checked ~ .nav-links {
  position: fixed;
  inset: auto auto 30px 2px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 220px;
  height: auto;
  margin: 0;
  padding: 3px 3px 3px 30px;
  border: 0;
  background: var(--w95-face);
  box-shadow: var(--w95-raised);
  z-index: 101;
}

/* Vertical banner down the left edge of the menu */
[data-theme="win95"] .nav-trigger:checked ~ .nav-links::before {
  content: "Momokun 95";
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 24px;
  padding-bottom: 6px;
  background: linear-gradient(0deg, var(--w95-navy), var(--w95-title-end));
  color: var(--w95-light);
  font-weight: 700;
  font-size: 16px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

[data-theme="win95"] .site-header .nav-links .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #000;
  font-family: var(--w95-font);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

[data-theme="win95"] .site-header .nav-links .nav-link:hover,
[data-theme="win95"] .site-header .nav-links .nav-link:focus-visible {
  background: var(--w95-navy);
  color: #fff;
  outline: none;
}

/* A separator above the external links */
[data-theme="win95"] .site-header .nav-links .nav-link:not([target]) + .nav-link[target="_blank"] {
  border-top: 1px solid var(--w95-shadow);
  box-shadow: inset 0 1px var(--w95-white);
}

[data-theme="win95"] .tray {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  box-shadow: var(--w95-field);
  font-size: 12px;
}

[data-theme="win95"] .menu-icon {
  display: none;
}

[data-theme="win95"] .theme-picker {
  flex: none;
  margin-left: auto;
}

[data-theme="win95"] .theme-picker select {
  height: 22px;
  padding: 0 22px 0 4px;
  color: #000;
  font-family: var(--w95-font);
  font-size: 12px;
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-sunken);
  /* Arrow button drawn inside the field */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='4'%3E%3Cpath d='M0 0h7L3.5 4z'/%3E%3C/svg%3E") no-repeat right 6px center,
    linear-gradient(var(--w95-face), var(--w95-face)) no-repeat right 2px center / 16px 18px,
    var(--w95-white);
}

[data-theme="win95"] .menu-icon svg,
[data-theme="win95"] .menu-icon::before,
[data-theme="win95"] .menu-icon::after {
  display: none;
  content: none;
}

/* Desktop icon, shown when the window is minimised or closed */
[data-theme="win95"] .desktop-icon {
  top: 16px;
  left: 16px;
  color: #fff;
  font-family: var(--w95-font);
  font-size: 12px;
}

[data-theme="win95"] .desktop-icon-glyph {
  width: 32px;
  height: 28px;
  background:
    linear-gradient(90deg, var(--w95-navy), var(--w95-title-end)) 2px 2px / 28px 6px no-repeat,
    linear-gradient(var(--w95-white), var(--w95-white)) 2px 9px / 28px 17px no-repeat,
    var(--w95-face);
  box-shadow: var(--w95-raised);
}

[data-theme="win95"] .desktop-icon-label {
  padding: 1px 3px;
}

[data-theme="win95"] .desktop-icon:focus .desktop-icon-label {
  background: var(--w95-navy);
  outline: 1px dotted #ff0;
}

[data-theme="win95"] .desktop-icon:focus-visible {
  outline: none;
}

/* Page and window */
[data-theme="win95"] .page-content {
  padding: 24px 0;
  min-height: calc(100vh - 32px);
}

[data-theme="win95"] .page-content > .container {
  max-width: 1000px;
}

[data-theme="win95"] .window {
  background: var(--w95-face);
  box-shadow: var(--w95-raised);
  padding: 3px;
}

[data-theme="win95"] .title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px 3px 4px;
  background: linear-gradient(90deg, var(--w95-navy), var(--w95-title-end));
  color: #fff;
}

[data-theme="win95"] .title-bar-text {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="win95"] .title-bar-controls {
  display: flex;
  flex: none;
}

[data-theme="win95"] .title-bar-button {
  width: 16px;
  height: 14px;
  background-color: var(--w95-face);
  background-repeat: no-repeat;
  box-shadow: var(--w95-raised);
}

[data-theme="win95"] .tb-min {
  order: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='2'%3E%3Crect width='6' height='2'/%3E%3C/svg%3E");
  background-position: 4px 8px;
}

[data-theme="win95"] .tb-max {
  order: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M0 0h9v9H0zM1 2v6h7V2z' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-position: 3px 2px;
}

[data-theme="win95"] .tb-close {
  order: 3;
  margin-left: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0z'/%3E%3C/svg%3E");
  background-position: 4px 3px;
}

[data-theme="win95"] .title-bar-button:active {
  box-shadow: var(--w95-pressed);
}

/* Maximised: fill the desktop above the taskbar */
[data-theme="win95"] .page-content:has(.window.is-maximized) {
  padding: 0;
}

[data-theme="win95"] .page-content > .container:has(.window.is-maximized) {
  padding: 0;
}

[data-theme="win95"] .window.is-maximized {
  min-height: calc(100vh - 32px);
}

[data-theme="win95"] .window-body {
  margin: 8px 6px;
  padding: 24px;
}

[data-theme="win95"] .status-bar {
  display: flex;
  gap: 2px;
  margin: 0 2px 1px;
  font-size: 12px;
}

[data-theme="win95"] .status-bar-field {
  padding: 2px 6px;
  box-shadow: var(--w95-field);
}

[data-theme="win95"] .status-grow {
  flex: 1;
}

/* Hero */
[data-theme="win95"] .hero {
  text-align: left;
  margin-bottom: 28px;
}

[data-theme="win95"] .hero-title {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #000;
  margin-bottom: 8px;
}

[data-theme="win95"] .hero-subtitle {
  max-width: none;
  margin: 0;
  font-size: 1rem;
  color: #000;
}

/* Section title with an etched rule under it */
[data-theme="win95"] .section-title {
  font-size: 1.25rem;
  padding: 0 0 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--w95-shadow);
  box-shadow: 0 1px var(--w95-white);
}

[data-theme="win95"] .section-title::before,
[data-theme="win95"] .post-content h2::before {
  display: none;
}

/* Content panels: white sunken boxes, like a list view or text field */
[data-theme="win95"] .experience {
  margin-bottom: 0;
}

[data-theme="win95"] .experience-item,
[data-theme="win95"] .blog-post-card,
[data-theme="win95"] .education-item,
[data-theme="win95"] .summary,
[data-theme="win95"] .card,
[data-theme="win95"] .post-content {
  background: var(--w95-white);
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-sunken);
  padding: 20px;
  margin-bottom: 16px;
  overflow: visible;
}

[data-theme="win95"] .experience-item:hover,
[data-theme="win95"] .blog-post-card:hover,
[data-theme="win95"] .card:hover {
  transform: none;
  box-shadow: var(--w95-sunken);
}

[data-theme="win95"] .experience-item::before,
[data-theme="win95"] .blog-post-card::before,
[data-theme="win95"] .card::before {
  display: none;
}

[data-theme="win95"] .experience-header {
  margin-bottom: 8px;
}

[data-theme="win95"] .experience-title {
  font-size: 1.1rem;
  margin: 0 0 2px;
}

[data-theme="win95"] .company-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--w95-navy);
  margin-bottom: 2px;
}

[data-theme="win95"] .duration,
[data-theme="win95"] .blog-post-meta,
[data-theme="win95"] .post-meta,
[data-theme="win95"] .blog-post-date,
[data-theme="win95"] .post-date,
[data-theme="win95"] .gpa {
  font-family: var(--w95-font);
  font-size: 0.85rem;
  color: #404040;
  letter-spacing: 0;
}

[data-theme="win95"] .company-category {
  margin: 10px 0;
  gap: 4px;
}

/* Category labels: small sunken fields */
[data-theme="win95"] .category-tag,
[data-theme="win95"] .blog-post-category,
[data-theme="win95"] .post-category {
  background: var(--w95-face);
  color: #000;
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-field);
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
}

[data-theme="win95"] .description ul,
[data-theme="win95"] .post-content ul {
  margin: 10px 0;
}

[data-theme="win95"] .description li,
[data-theme="win95"] .post-content li {
  color: #000;
  padding-left: 18px;
  margin-bottom: 4px;
}

/* Square bullets */
[data-theme="win95"] .description li::before,
[data-theme="win95"] .post-content ul li::before {
  content: "";
  top: 0.6em;
  width: 5px;
  height: 5px;
  background: #000;
}

[data-theme="win95"] .post-content ol li::before {
  color: #000;
  font-family: var(--w95-font);
}

/* Tags as raised buttons */
[data-theme="win95"] .skills,
[data-theme="win95"] .post-tags,
[data-theme="win95"] .blog-post-tags {
  margin-top: 14px;
  gap: 4px;
}

[data-theme="win95"] .skill-tag,
[data-theme="win95"] .post-tag,
[data-theme="win95"] .blog-tag {
  background: var(--w95-face);
  color: #000;
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-raised);
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 400;
}

[data-theme="win95"] .skill-tag:hover,
[data-theme="win95"] .post-tag:hover,
[data-theme="win95"] .blog-tag:hover {
  background: var(--w95-face);
  color: #000;
  transform: none;
}

/* Push buttons */
[data-theme="win95"] .blog-read-more,
[data-theme="win95"] .back-to-blog,
[data-theme="win95"] .post-navigation .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 14px;
  background: var(--w95-face);
  color: #000;
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-raised);
  font-weight: 400;
  text-decoration: none;
}

[data-theme="win95"] .blog-read-more:hover,
[data-theme="win95"] .back-to-blog:hover,
[data-theme="win95"] .post-navigation .nav-link:hover,
[data-theme="win95"] .blog-read-more:visited,
[data-theme="win95"] .back-to-blog:visited,
[data-theme="win95"] .post-navigation .nav-link:visited {
  background: var(--w95-face);
  color: #000;
  text-decoration: none;
  transform: none;
}

[data-theme="win95"] .blog-read-more:active,
[data-theme="win95"] .back-to-blog:active,
[data-theme="win95"] .post-navigation .nav-link:active {
  box-shadow: var(--w95-pressed);
}

[data-theme="win95"] .blog-read-more:hover svg {
  transform: none;
}

[data-theme="win95"] .back-to-blog {
  margin-bottom: 20px;
}

/* Blog */
[data-theme="win95"] .blog-grid {
  gap: 0;
  margin-bottom: 0;
}

[data-theme="win95"] .blog-post-meta,
[data-theme="win95"] .post-meta {
  gap: 8px;
  margin-bottom: 8px;
}

[data-theme="win95"] .blog-post-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

[data-theme="win95"] .blog-post-title a {
  color: var(--w95-link);
}

[data-theme="win95"] .blog-post-title a:hover {
  color: var(--w95-link);
}

[data-theme="win95"] .blog-post-excerpt,
[data-theme="win95"] .post-excerpt {
  font-size: 1rem;
  color: #000;
  margin-bottom: 14px;
}

[data-theme="win95"] .no-posts,
[data-theme="win95"] .no-posts h3 {
  color: #000;
}

/* Post */
[data-theme="win95"] .post-header {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--w95-shadow);
  box-shadow: 0 1px var(--w95-white);
}

[data-theme="win95"] .post-title {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

[data-theme="win95"] .post-content {
  color: #000;
  line-height: 1.7;
}

[data-theme="win95"] .post-content h1,
[data-theme="win95"] .post-content h2,
[data-theme="win95"] .post-content h3,
[data-theme="win95"] .post-content h4 {
  color: #000;
  margin: 28px 0 12px;
  padding-left: 0;
}

[data-theme="win95"] .post-content h1 { font-size: 1.6rem; }
[data-theme="win95"] .post-content h2 { font-size: 1.35rem; }
[data-theme="win95"] .post-content h3 { font-size: 1.15rem; color: var(--w95-navy); }

[data-theme="win95"] .post-content p {
  margin-bottom: 14px;
}

[data-theme="win95"] .post-content a {
  color: var(--w95-link);
  text-decoration: underline;
  border-bottom: 0;
}

[data-theme="win95"] .post-content code {
  background: none;
  color: #800000;
  padding: 0;
  border-radius: 0;
  font-family: var(--w95-mono);
  font-size: 0.95em;
}

[data-theme="win95"] .post-content pre {
  background: var(--w95-white);
  border: 0;
  border-radius: 0;
  box-shadow: var(--w95-sunken);
  padding: 14px;
  margin: 18px 0;
}

[data-theme="win95"] .post-content pre code {
  color: #000;
}

[data-theme="win95"] .post-content blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  background: var(--w95-face);
  border-left: 3px solid var(--w95-navy);
  border-radius: 0;
  color: #000;
}

[data-theme="win95"] .post-content img {
  border-radius: 0;
  box-shadow: var(--w95-field);
  padding: 2px;
  margin: 18px 0;
}

[data-theme="win95"] .post-content table {
  background: var(--w95-white);
  border-radius: 0;
  box-shadow: var(--w95-field);
  margin: 18px 0;
}

[data-theme="win95"] .post-content th,
[data-theme="win95"] .post-content td {
  padding: 4px 10px;
  border: 1px solid var(--w95-light);
  color: #000;
}

[data-theme="win95"] .post-content th {
  background: var(--w95-face);
  box-shadow: var(--w95-raised);
  font-weight: 400;
}

[data-theme="win95"] .post-navigation {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--w95-shadow);
  box-shadow: inset 0 1px var(--w95-white);
}

/* Mobile: the window fills the screen. */
@media (max-width: 768px) {
  [data-theme="win95"] .theme-picker { order: 0; margin-right: 0; }

  [data-theme="win95"] .page-content {
    padding: 0;
  }

  [data-theme="win95"] .page-content > .container {
    padding: 0;
  }

  [data-theme="win95"] .window {
    min-height: calc(100vh - 32px);
  }

  [data-theme="win95"] .window-body {
    margin: 4px 2px;
    padding: 14px;
  }

  [data-theme="win95"] .experience-item,
  [data-theme="win95"] .blog-post-card,
  [data-theme="win95"] .post-content {
    padding: 14px;
  }

  [data-theme="win95"] h1 { font-size: 1.6rem; }

  [data-theme="win95"] .site-header .container {
    padding: 4px 2px 2px;
  }

  [data-theme="win95"] .header-content {
    justify-content: flex-start;
  }

  /* main.css turns the open menu into a full-screen sheet; keep the popup */
  [data-theme="win95"] .nav-trigger:checked ~ .nav-links {
    inset: auto auto 30px 2px;
    padding: 3px 3px 3px 30px;
  }

  [data-theme="win95"] .post-navigation {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  [data-theme="win95"] .task-button { display: none; }
}

@media (max-width: 400px) {
  [data-theme="win95"] .tray { display: none; }
}

/* ---- Tool pages (EV, Miles) ----
   Their own styles run on the shared tokens, so the palette already follows
   this theme. These rules swap rounded fills for bevels. */

[data-theme="win95"] .page-content > .container:has(.ev-wrap, .mi-wrap) {
  max-width: 720px;
}

[data-theme="win95"] .ev-wrap,
[data-theme="win95"] .mi-wrap {
  padding: 0;
}

[data-theme="win95"] .ev-wrap *,
[data-theme="win95"] .mi-wrap * {
  border-radius: 0 !important;
}

[data-theme="win95"] .ev-hero h1,
[data-theme="win95"] .mi-hero h1 {
  font-size: 1.4rem;
}

[data-theme="win95"] .ev-plan .val,
[data-theme="win95"] .ev-stat .val,
[data-theme="win95"] .ev-out .val,
[data-theme="win95"] .mi-rp,
[data-theme="win95"] .mi-wrap .mi-amount-input,
[data-theme="win95"] .mi-cur,
[data-theme="win95"] .mi-wrap .mi-quick button,
[data-theme="win95"] .mi-row-val {
  font-family: var(--w95-mono);
}

/* Cards become etched group boxes on the window face */
[data-theme="win95"] .ev-card,
[data-theme="win95"] .mi-card {
  background: var(--w95-face);
  border: 1px solid var(--w95-shadow);
  box-shadow: inset 1px 1px var(--w95-white), 1px 1px var(--w95-white);
}

[data-theme="win95"] .ev-card > h2,
[data-theme="win95"] .mi-label,
[data-theme="win95"] .mi-settings h3,
[data-theme="win95"] .mi-wrap .mi-toggle {
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

/* Text fields and selects: white and sunken */
[data-theme="win95"] .ev-wrap .ev-input,
[data-theme="win95"] .mi-amount,
[data-theme="win95"] .mi-wrap .mi-fee,
[data-theme="win95"] .mi-select {
  background-color: var(--w95-white);
  border: 0;
  box-shadow: var(--w95-sunken);
  color: #000;
}

[data-theme="win95"] .ev-wrap .ev-input:focus,
[data-theme="win95"] .mi-amount:focus-within,
[data-theme="win95"] .mi-wrap .mi-fee:focus,
[data-theme="win95"] .mi-select:focus {
  box-shadow: var(--w95-sunken);
  outline: 1px dotted #000;
  outline-offset: -4px;
}

[data-theme="win95"] .mi-amount:focus-within {
  outline: none;
}

/* Push buttons */
[data-theme="win95"] .ev-btn,
[data-theme="win95"] .ev-copy,
[data-theme="win95"] .ev-seg button,
[data-theme="win95"] .mi-wrap .mi-seg button,
[data-theme="win95"] .mi-wrap .mi-chip,
[data-theme="win95"] .mi-wrap .mi-quick button,
[data-theme="win95"] .mi-wrap .mi-mini,
[data-theme="win95"] .mi-wrap .mi-clear,
[data-theme="win95"] .mi-cur {
  background: var(--w95-face);
  color: #000;
  border: 0;
  box-shadow: var(--w95-raised);
  transform: none;
}

[data-theme="win95"] .ev-btn,
[data-theme="win95"] .ev-btn:hover {
  font-weight: 700;
  background: var(--w95-face);
  color: #000;
  outline: 1px solid #000; /* default-button outline */
  transform: none;
}

[data-theme="win95"] .ev-btn:active,
[data-theme="win95"] .ev-copy:active,
[data-theme="win95"] .ev-seg button:active,
[data-theme="win95"] .mi-wrap .mi-seg button:active,
[data-theme="win95"] .mi-wrap .mi-chip:active,
[data-theme="win95"] .mi-wrap .mi-quick button:active,
[data-theme="win95"] .mi-wrap .mi-mini:active,
[data-theme="win95"] .mi-wrap .mi-clear:active {
  background: var(--w95-face);
  color: #000;
  box-shadow: var(--w95-pressed);
}

/* Hover keeps the face colour, as on Win95 */
[data-theme="win95"] .ev-copy:hover,
[data-theme="win95"] .mi-wrap .mi-seg button:hover,
[data-theme="win95"] .mi-wrap .mi-chip:hover,
[data-theme="win95"] .mi-wrap .mi-clear:hover,
[data-theme="win95"] .mi-wrap .mi-mini:hover {
  background: var(--w95-face);
  color: #000;
}

/* Selected state: latched down, on the lighter dithered face */
[data-theme="win95"] .ev-seg button.active,
[data-theme="win95"] .mi-wrap .mi-seg button.active,
[data-theme="win95"] .mi-wrap .mi-chip[aria-pressed="true"] {
  background-color: var(--w95-light);
  background-image: conic-gradient(var(--w95-white) 25%, transparent 0 50%, var(--w95-white) 0 75%, transparent 0);
  background-size: 2px 2px;
  color: #000;
  font-weight: 700;
  box-shadow: var(--w95-pressed);
}

[data-theme="win95"] .ev-copy.done {
  background: var(--w95-face);
  color: var(--accent-success);
  box-shadow: var(--w95-pressed);
}

[data-theme="win95"] .ev-seg,
[data-theme="win95"] .mi-seg {
  gap: 2px;
  background: transparent;
  border: 0;
  overflow: visible;
}

[data-theme="win95"] .mi-wrap .mi-seg button + button {
  border-left: 0;
}

/* Result panels: white and sunken */
[data-theme="win95"] .ev-plan,
[data-theme="win95"] .ev-stat,
[data-theme="win95"] .ev-out,
[data-theme="win95"] .mi-best,
[data-theme="win95"] .mi-row,
[data-theme="win95"] .ev-msg {
  background: var(--w95-white);
  border: 0;
  box-shadow: var(--w95-sunken);
}

/* Highlighted rows keep a coloured frame inside the bevel */
[data-theme="win95"] .ev-plan,
[data-theme="win95"] .mi-row.is-eff {
  box-shadow: var(--w95-sunken), inset 0 0 0 4px var(--w95-white), inset 0 0 0 5px var(--w95-navy);
}

[data-theme="win95"] .mi-best,
[data-theme="win95"] .mi-row.is-best {
  box-shadow: var(--w95-sunken), inset 0 0 0 4px var(--w95-white), inset 0 0 0 5px var(--accent-success);
}

[data-theme="win95"] .mi-best.muted {
  box-shadow: var(--w95-sunken);
}

[data-theme="win95"] .mi-row.is-warn {
  background: #ffffe1; /* Win95 tooltip yellow */
}

[data-theme="win95"] .ev-warn,
[data-theme="win95"] .mi-cat-warn {
  background: #ffffe1;
  border: 1px solid #000;
  color: #000;
}

[data-theme="win95"] .mi-warn,
[data-theme="win95"] .mi-meta .lost {
  color: #806000;
}

[data-theme="win95"] .ev-fulltank-banner {
  border: 0;
  box-shadow: var(--w95-sunken);
  background: var(--w95-white);
}

[data-theme="win95"] .ev-fulltank-banner.on { color: var(--accent-success); background: var(--w95-white); }
[data-theme="win95"] .ev-fulltank-banner.off { color: var(--accent-secondary); background: var(--w95-white); }

[data-theme="win95"] .mi-badge,
[data-theme="win95"] .mi-badge.eff {
  background: var(--w95-face);
  box-shadow: var(--w95-field);
}

[data-theme="win95"] .mi-blocked {
  border: 1px dashed var(--w95-shadow);
}

[data-theme="win95"] .mi-check {
  border-bottom-color: var(--w95-shadow);
}

[data-theme="win95"] .mi-check input {
  accent-color: var(--w95-navy);
}
