/* KaliDesk theme styles. */
:root {
  --kd-accent: #367bf0;
  --kd-terminal-green: #00ff00;
  --kd-bg: #0e0e0e;
  --kd-surface: #1a1a1a;
  --kd-surface-raised: #22272e;
  --kd-blue-gray: #2c3e50;
  --kd-text: #e7ebf0;
  --kd-muted: #9aa6b2;
  --kd-border: rgba(255, 255, 255, .11);
  --kd-font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --kd-font-sans: "Source Code Pro", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #202a35;
  background: #f4f6f8;
  font-family: var(--kd-font-sans);
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

a {
  color: var(--kd-accent);
}

a:hover,
a:focus-visible {
  color: #1b5bcc;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  color: #fff;
  background: #111;
  clip: auto;
}

#page {
  min-height: 100vh;
}

.kd-site-header,
.kd-site-footer {
  color: #edf1f5;
  background: #111820;
}

.kd-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.kd-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.kd-brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.kd-brand-copy {
  display: grid;
  line-height: 1.25;
}

.kd-brand-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.kd-brand-tagline {
  color: #aab8c5;
  font-size: .72rem;
}

.kd-site-nav .menu,
.kd-site-nav ul,
.kd-footer-nav .menu,
.kd-footer-nav ul {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kd-site-nav a,
.kd-footer-nav a {
  color: #dbe4eb;
  text-decoration: none;
}

.kd-site-nav a:hover,
.kd-footer-nav a:hover {
  color: #fff;
}

.kd-site-main {
  width: min(1160px, calc(100% - 36px));
  min-height: 60vh;
  margin: 34px auto;
}

.kd-site-main.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
}

.kd-content-column {
  min-width: 0;
}

.kd-post-card,
.kd-page-card,
.kd-entry-content,
.kd-404-card {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid #e3e8ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(18, 32, 48, .05);
}

.kd-entry-title {
  margin: 0 0 10px;
  color: #17212a;
  line-height: 1.2;
}

.kd-entry-meta {
  margin-bottom: 20px;
  color: #6e7b87;
  font-size: .85rem;
}

.kd-entry-content > :first-child {
  margin-top: 0;
}

.kd-entry-content > :last-child {
  margin-bottom: 0;
}

.kd-pagination {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.kd-pagination a,
.kd-pagination span {
  padding: 7px 12px;
  border: 1px solid #dbe2e9;
  border-radius: 7px;
  background: #fff;
}

.kd-site-sidebar .widget {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #e3e8ed;
  border-radius: 10px;
  background: #fff;
}

.kd-site-sidebar .widget-title {
  margin-top: 0;
  font-size: 1.05rem;
}

.kd-site-footer {
  padding: 22px max(22px, calc((100vw - 1180px) / 2));
  color: #aab8c5;
  font-size: .82rem;
}

/* Full-screen desktop shell. */
body.kalidesk-desktop-mode {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0e0e0e;
}

body.kalidesk-desktop-mode #page {
  min-height: 0;
  height: 100%;
}

body.kalidesk-desktop-mode .kd-site-header,
body.kalidesk-desktop-mode .kd-site-footer {
  display: none;
}

body.kalidesk-desktop-mode .kd-site-main {
  width: 100%;
  min-height: 0;
  height: 100%;
  margin: 0;
}

.kd-desktop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  color: var(--kd-text);
  background-color: var(--kd-bg);
  background-image: radial-gradient(ellipse at 68% 36%, rgba(54, 123, 240, .14), transparent 46%), radial-gradient(ellipse at 24% 90%, rgba(44, 62, 80, .45), transparent 50%), linear-gradient(135deg, #0e0e0e, #10151b 58%, #0d1014);
  background-position: center;
  background-size: cover;
  font-family: var(--kd-font-mono);
  font-size: 13px;
  isolation: isolate;
}

.kd-desktop[data-kd-theme="light"] {
  --kd-text: #18212a;
  --kd-muted: #52606c;
  --kd-border: rgba(16, 28, 40, .17);
  background-color: #dfe7ef;
  background-image: radial-gradient(ellipse at 68% 36%, rgba(54, 123, 240, .17), transparent 46%), linear-gradient(135deg, #dce5ee, #cbd7e3);
}

.kd-top-panel {
  position: relative;
  z-index: 900;
  display: flex;
  height: 42px;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(15, 18, 22, .94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.kd-desktop[data-kd-theme="light"] .kd-top-panel {
  border-color: rgba(13, 28, 44, .12);
  background: rgba(236, 242, 247, .95);
}

.kd-panel-button,
.kd-panel-clock,
.kd-panel-tray-button {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #e7edf4;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  text-decoration: none;
}

.kd-desktop[data-kd-theme="light"] .kd-panel-button,
.kd-desktop[data-kd-theme="light"] .kd-panel-clock,
.kd-desktop[data-kd-theme="light"] .kd-panel-tray-button {
  color: #1c2833;
}

.kd-panel-button:hover,
.kd-panel-button:focus-visible,
.kd-panel-clock:hover,
.kd-panel-tray-button:hover {
  border-color: var(--kd-border);
  color: #fff;
  background: rgba(255, 255, 255, .09);
  outline: none;
}

.kd-desktop[data-kd-theme="light"] .kd-panel-button:hover,
.kd-desktop[data-kd-theme="light"] .kd-panel-button:focus-visible,
.kd-desktop[data-kd-theme="light"] .kd-panel-clock:hover,
.kd-desktop[data-kd-theme="light"] .kd-panel-tray-button:hover {
  color: #111;
  background: rgba(19, 37, 54, .08);
}

.kd-top-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.kd-top-brand img {
  width: 23px;
  height: 23px;
}

.kd-panel-separator {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: rgba(255, 255, 255, .18);
}

.kd-panel-spacer {
  flex: 1 1 auto;
}

.kd-panel-clock {
  min-width: 64px;
  font-variant-numeric: tabular-nums;
}

.kd-tray-icons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.kd-panel-power {
  color: #ff8f8f;
  font-size: 19px;
  line-height: 1;
}

.kd-menu-wrap {
  position: relative;
}

.kd-panel-dropdown {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 7px);
  left: 0;
  width: 240px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: #171c22;
  box-shadow: 0 15px 38px rgba(0, 0, 0, .42);
}

.kd-menu-right .kd-panel-dropdown {
  right: 0;
  left: auto;
}

.kd-panel-dropdown[hidden] {
  display: none;
}

.kd-menu-heading {
  margin: 4px 9px 7px;
  color: #8998a5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.kd-panel-dropdown button,
.kd-panel-dropdown a {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  color: #e9eef3;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.kd-panel-dropdown button:hover,
.kd-panel-dropdown button:focus-visible,
.kd-panel-dropdown a:hover,
.kd-panel-dropdown a:focus-visible {
  color: #fff;
  background: rgba(54, 123, 240, .22);
  outline: 0;
}

.kd-menu-item-icon {
  width: 21px;
  color: #74a7ff;
  font-size: 16px;
  text-align: center;
}

.kd-workspace {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.kd-workspace::after {
  position: absolute;
  z-index: -1;
  right: 4%;
  bottom: 10%;
  width: min(37vw, 490px);
  aspect-ratio: 1;
  border: 1px solid rgba(122, 164, 218, .055);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 38px rgba(122, 164, 218, .018), 0 0 0 86px rgba(122, 164, 218, .013);
}

.kd-desktop-icons {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 18px;
  display: grid;
  width: 94px;
  gap: 16px;
}

.kd-desktop-icon {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 78px;
  padding: 8px 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #edf4fa;
  background: transparent;
  font-family: inherit;
  font-size: 10px;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}

.kd-desktop-icon:hover,
.kd-desktop-icon:focus-visible {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  outline: none;
}

.kd-desktop-icon-art {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  color: #fff;
  background: rgba(21, 31, 44, .8);
  box-shadow: 0 6px 13px rgba(0, 0, 0, .22);
  font-size: 23px;
}

.kd-desktop-icon-art.is-blue {
  color: #a5c9ff;
  background: linear-gradient(145deg, #304761, #1e2731);
}

.kd-window {
  position: absolute;
  z-index: 20;
  display: flex;
  min-width: 300px;
  min-height: 190px;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(171, 190, 210, .25);
  border-radius: 9px;
  color: #e3e9ef;
  background: rgba(23, 27, 32, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .48), 0 1px 0 rgba(255, 255, 255, .08) inset;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.kd-window[hidden] {
  display: none !important;
}

.kd-window:focus {
  outline: 1px solid rgba(93, 152, 255, .55);
  outline-offset: 1px;
}

.kd-window-titlebar {
  display: flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(44, 62, 80, .93), rgba(36, 48, 60, .88));
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.kd-window-titlebar:active {
  cursor: grabbing;
}

.kd-window-title {
  overflow: hidden;
  margin: 0;
  color: #f4f7fa;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kd-window-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.kd-window-controls button {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 50%;
  color: #e4ebf2;
  background: rgba(9, 13, 18, .4);
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1;
}

.kd-window-controls button:hover,
.kd-window-controls button:focus-visible {
  color: #fff;
  background: var(--kd-accent);
  outline: none;
}

.kd-window-controls [data-kd-window-close]:hover,
.kd-window-controls [data-kd-window-close]:focus-visible {
  background: #d54848;
}

.kd-window-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
}

.kd-terminal-window {
  top: 13%;
  left: 22%;
  width: min(700px, 68vw);
  height: min(420px, 57vh);
}

.kd-boot-window {
  top: 7%;
  left: 17%;
  width: min(1040px, 78vw);
  height: min(790px, 82vh);
}

.kd-files-window {
  top: 15%;
  left: 32%;
  width: min(620px, 62vw);
  height: min(440px, 58vh);
}

.kd-about-window {
  top: 20%;
  left: 36%;
  width: min(480px, 60vw);
  height: auto;
  min-height: 310px;
}

.kd-window.is-maximized {
  top: 10px !important;
  left: 10px !important;
  width: calc(100% - 20px) !important;
  height: calc(100% - 20px) !important;
  resize: none;
}

.kd-window.is-minimized .kd-window-content {
  display: none;
}

.kd-window.is-closed {
  display: none;
}

.kd-dock-wrap {
  position: relative;
  z-index: 850;
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 7px 12px 9px;
  pointer-events: none;
}

.kd-dock {
  display: flex;
  max-width: min(90vw, 780px);
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  background: rgba(16, 19, 23, .84);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .36);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.kd-dock-button {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #dbe8f6;
  background: rgba(255, 255, 255, .07);
  font-size: 20px;
  transition: transform .15s ease, background .15s ease;
}

.kd-dock-button:hover,
.kd-dock-button:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .22);
  background: rgba(54, 123, 240, .3);
  outline: none;
}

.kd-dock-button.is-active::after {
  position: absolute;
  right: 17px;
  bottom: -5px;
  left: 17px;
  height: 3px;
  border-radius: 4px;
  background: var(--kd-accent);
  content: "";
}

.kd-dock-separator {
  width: 1px;
  height: 29px;
  margin: 0 2px;
  background: rgba(255, 255, 255, .18);
}

.kd-power-off {
  position: absolute;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d7e1e9;
  background: #080a0d;
  text-align: center;
}

.kd-power-off[hidden] {
  display: none;
}

.kd-power-off-card {
  max-width: 420px;
  padding: 28px;
}

.kd-power-off-card img {
  width: 80px;
  margin-bottom: 14px;
}

/* Terminal and about/file app content. */
.kd-terminal-widget {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 18px;
  color: var(--kd-terminal-green);
  background: #080b0e;
  font-family: var(--kd-font-mono);
  font-size: 12px;
}

.kd-terminal-output {
  min-height: 130px;
  flex: 1 1 auto;
  overflow: auto;
  margin: 0 0 12px;
  color: var(--kd-terminal-green);
  font: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kd-terminal-form {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(0, 255, 0, .16);
  padding-top: 10px;
}

.kd-terminal-prompt {
  flex: 0 0 auto;
  color: #95ff9a;
}

.kd-terminal-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #f1fff1;
  background: transparent;
  font: inherit;
}

.kd-terminal-input:focus-visible {
  outline: 1px solid rgba(0, 255, 0, .3);
  outline-offset: 4px;
}

.kd-about-content,
.kd-files-content {
  padding: 22px;
}

.kd-about-content p {
  color: #c4cdd6;
}

.kd-about-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.kd-about-logo img {
  width: 56px;
}

.kd-file-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #e6ebf0;
}

.kd-file-row:last-child {
  border-bottom: 0;
}

/* Shared OS boot panel. */
.kd-boot-panel {
  position: relative;
  padding: clamp(15px, 2.5vw, 25px);
  color: #e8edf3;
  background: #151a20;
  font-family: var(--kd-font-sans);
  font-size: 12px;
}

.kd-boot-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.kd-boot-intro h2 {
  margin: 0 0 5px;
  color: #f4f7fa;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}

.kd-boot-intro p:not(.kd-eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #aeb9c4;
  line-height: 1.55;
}

.kd-eyebrow {
  margin: 0 0 7px;
  color: #77aaff;
  font-family: var(--kd-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
}

.kd-local-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(0, 255, 0, .19);
  border-radius: 999px;
  color: #a2efa9;
  background: rgba(0, 255, 0, .055);
  font-size: 10px;
}

.kd-local-badge span {
  color: #32d650;
  font-size: 9px;
}

.kd-drop-zone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 132px;
  padding: 16px;
  border: 1px dashed rgba(125, 161, 204, .49);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(44, 62, 80, .22), rgba(25, 34, 43, .5));
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.kd-drop-zone.is-dragging {
  border-color: var(--kd-accent);
  background: rgba(54, 123, 240, .16);
}

.kd-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.kd-file-input:focus-visible + .kd-drop-icon {
  outline: 2px solid var(--kd-accent);
}

.kd-drop-icon {
  display: grid;
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  place-items: center;
  border: 1px solid rgba(117, 166, 234, .42);
  border-radius: 50%;
  color: #83b2ff;
  font-size: 18px;
}

.kd-drop-title {
  margin: 0;
  color: #e4edf7;
  font-size: 12px;
  font-weight: 600;
}

.kd-drop-copy,
.kd-selected-file {
  margin: 0;
  color: #94a2af;
  font-size: 10px;
}

.kd-inline-link {
  color: #8cb8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.kd-inline-link:hover,
.kd-inline-link:focus-visible {
  color: #c0d7ff;
}

.kd-selected-file {
  color: #bcc9d5;
  font-family: var(--kd-font-mono);
}

.kd-boot-config {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr);
  gap: 14px;
  margin: 14px 0 10px;
}

.kd-control-field {
  display: grid;
  gap: 6px;
  color: #cdd6de;
  font-size: 10px;
  font-weight: 600;
}

.kd-control-field select {
  width: 100%;
  height: 35px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  color: #eef3f8;
  background: #202831;
  font-size: 11px;
}

.kd-memory-control > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kd-memory-control output {
  color: #96bbff;
  font-family: var(--kd-font-mono);
}

.kd-memory-control input[type="range"] {
  width: 100%;
  accent-color: var(--kd-accent);
}

.kd-range-labels {
  display: flex;
  justify-content: space-between;
  color: #83909b;
  font-size: 9px;
}

.kd-quick-loads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 9px 0 13px;
}

.kd-quick-label {
  margin-right: 2px;
  color: #9da9b5;
  font-size: 10px;
  font-weight: 600;
}

.kd-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: #dfe6ed;
  background: #252d36;
  font-family: var(--kd-font-sans);
  font-size: 10px;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.kd-button:hover,
.kd-button:focus-visible {
  border-color: rgba(107, 158, 239, .65);
  color: #fff;
  background: #303b47;
  outline: none;
}

.kd-button-primary {
  border-color: #367bf0;
  color: #fff;
  background: #2868d7;
  box-shadow: 0 4px 10px rgba(17, 70, 165, .22);
}

.kd-button-primary:hover,
.kd-button-primary:focus-visible {
  border-color: #6ba1ff;
  background: #377cf0;
}

.kd-button-quiet {
  background: rgba(255, 255, 255, .045);
}

.kd-button-small {
  min-height: 27px;
  padding: 4px 8px;
  font-size: 9px;
}

.kd-emulator-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 10px 0 8px;
}

.kd-action-spacer {
  flex: 1 1 auto;
}

.kd-persist-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  color: #9ba8b4;
  font-size: 9px;
  line-height: 1.4;
}

.kd-persist-label input {
  margin: 1px 0 0;
  accent-color: var(--kd-accent);
}

.kd-special-keys {
  margin: 10px 0;
  color: #afbbc6;
  font-size: 10px;
}

.kd-special-keys summary,
.kd-boot-log-wrap summary {
  width: fit-content;
  color: #9fb0c0;
  cursor: pointer;
}

.kd-special-key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.kd-screen-frame {
  overflow: hidden;
  margin-top: 11px;
  border: 1px solid rgba(110, 137, 170, .3);
  border-radius: 8px;
  background: #080b0e;
}

.kd-screen-heading {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #7d8d9b;
  background: #12171d;
  font-family: var(--kd-font-mono);
  font-size: 8px;
  letter-spacing: .1em;
}

.kd-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #697480;
}

.kd-status-dot.is-running {
  background: #52d273;
  box-shadow: 0 0 9px rgba(82, 210, 115, .7);
}

.kd-v86-screen {
  display: grid;
  min-height: 235px;
  max-height: 58vh;
  place-items: center;
  overflow: auto;
  outline: none;
  background: #050608;
  image-rendering: pixelated;
  overscroll-behavior: contain;
}

.kd-v86-screen:focus-visible {
  box-shadow: inset 0 0 0 2px var(--kd-accent);
}

.kd-v86-screen > div {
  max-width: 100%;
  color: #d6e0e8;
  font-family: var(--kd-font-mono);
  font-size: 12px;
  line-height: 1;
  white-space: pre;
}

.kd-v86-screen canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.kd-boot-status {
  min-height: 18px;
  margin: 9px 0 6px;
  color: #a9b8c6;
  font-family: var(--kd-font-mono);
  font-size: 9px;
}

.kd-boot-status.is-error {
  color: #ff9797;
}

.kd-boot-log-wrap {
  margin: 5px 0;
  color: #aab5bf;
  font-size: 9px;
}

.kd-boot-log {
  max-height: 110px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  color: #a9e9b0;
  background: #0a0d0f;
  font: 9px/1.55 var(--kd-font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kd-boot-footnote {
  margin: 9px 0 0;
  color: #82909d;
  font-size: 9px;
  line-height: 1.5;
}

.kd-modal-backdrop {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 10, .78);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.kd-modal-backdrop[hidden] {
  display: none;
}

.kd-warning-modal {
  position: relative;
  width: min(490px, 100%);
  padding: clamp(23px, 5vw, 34px);
  border: 1px solid rgba(109, 152, 210, .35);
  border-radius: 12px;
  color: #dce5ed;
  background: #171d24;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
}

.kd-warning-modal h2 {
  margin: 0 0 11px;
  color: #fff;
  font-size: 20px;
}

.kd-warning-modal p:not(.kd-eyebrow) {
  margin: 0 0 20px;
  color: #bec9d4;
  font-size: 12px;
  line-height: 1.7;
}

.kd-modal-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  color: #d8e1e9;
  background: transparent;
  font-size: 19px;
}

.kd-modal-close:hover,
.kd-modal-close:focus-visible {
  background: #3b4652;
  outline: 2px solid rgba(90, 151, 255, .5);
}

.kd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Generic draggable window block outside the desktop shell. */
.kd-embedded-window {
  position: relative;
  z-index: 1;
  width: min(100%, 950px);
  min-height: 210px;
  margin: 22px 0;
  color: #e4eaf0;
  transform: translate(var(--kd-window-drag-x, 0), var(--kd-window-drag-y, 0));
}

.kd-embedded-window .kd-window-content {
  padding: 18px;
  background: #171c22;
}

.kd-embedded-window.is-maximized {
  position: relative;
  width: 100% !important;
  height: 70vh !important;
  inset: auto !important;
}

.kd-embedded-window.is-minimized {
  min-height: 38px;
  height: 38px;
}

.kd-embedded-window.is-minimized .kd-window-content {
  display: none;
}

.kd-block-placeholder,
.kd-block-window-editor {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px dashed #6e8dae;
  border-radius: 6px;
  color: #263746;
  background: #f0f5f9;
}

.kd-block-placeholder .dashicons {
  color: var(--kd-accent);
}

.kd-block-window-editor-title {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  color: #fff;
  background: #2c3e50;
  font-weight: 600;
}

.kd-block-window-editor > .block-editor-inner-blocks {
  width: 100%;
}

.kd-about-template {
  min-height: 100vh;
  padding: clamp(24px, 8vw, 80px) 20px;
  color: #dce5ed;
  background: radial-gradient(circle at 70% 20%, rgba(54, 123, 240, .22), transparent 32%), #0e0e0e;
}

.kd-about-template-inner {
  width: min(840px, 100%);
  margin: 0 auto;
}

.kd-about-template-inner > img {
  width: 86px;
  margin-bottom: 20px;
}

.kd-about-template-inner h1 {
  color: #fff;
}

@media (max-width: 900px) {
  .kd-top-panel {
    gap: 3px;
    padding: 0 7px;
  }

  .kd-panel-button {
    padding: 0 7px;
  }

  .kd-desktop-icons {
    left: 7px;
  }

  .kd-terminal-window {
    left: 16%;
    width: 78vw;
  }

  .kd-boot-window {
    left: 12%;
    width: 84vw;
  }
}

@media (max-width: 640px) {
  .kd-site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .kd-site-nav ul {
    flex-wrap: wrap;
  }

  .kd-site-main.has-sidebar {
    grid-template-columns: 1fr;
  }

  .kd-top-panel {
    height: 40px;
    min-height: 40px;
    gap: 1px;
    padding: 0 5px;
  }

  .kd-panel-button,
  .kd-panel-clock,
  .kd-panel-tray-button {
    height: 31px;
    gap: 4px;
    padding: 0 6px;
    font-size: 10px;
  }

  .kd-top-brand-label,
  .kd-menu-places-label,
  .kd-panel-hide-small,
  .kd-panel-separator {
    display: none;
  }

  .kd-top-brand img {
    width: 24px;
    height: 24px;
  }

  .kd-panel-clock {
    min-width: 46px;
  }

  .kd-workspace {
    overflow: auto;
  }

  .kd-desktop-icons {
    top: 9px;
    left: 7px;
    width: 70px;
    gap: 4px;
  }

  .kd-desktop-icon {
    min-width: 65px;
    font-size: 9px;
  }

  .kd-desktop-icon-art {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 19px;
  }

  .kd-window:not(.kd-embedded-window) {
    top: 10px !important;
    left: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: none;
    height: calc(100% - 20px) !important;
    max-height: calc(100% - 20px);
    min-width: 0;
    min-height: 0;
    resize: none;
  }

  .kd-dock-wrap {
    min-height: 58px;
    padding: 5px 6px 8px;
  }

  .kd-dock {
    max-width: 96vw;
    gap: 5px;
    padding: 5px 7px;
  }

  .kd-dock-button {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .kd-dock-separator {
    height: 25px;
  }

  .kd-boot-intro {
    flex-direction: column;
    gap: 9px;
  }

  .kd-boot-config {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kd-emulator-actions {
    gap: 5px;
  }

  .kd-emulator-actions .kd-button {
    flex: 1 1 auto;
  }

  .kd-action-spacer {
    display: none;
  }

  .kd-v86-screen {
    min-height: 180px;
    max-height: 43vh;
  }

  .kd-embedded-window {
    max-width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
