/* ============================================================
   Demo chrome — Material-inspired, monochrome, #121212 dominant
   ============================================================ */

:root {
  --bg:        #121212;
  --bg-dark:   #0e0e0e;
  --bg-light:  #161616;

  --fg:        rgba(255, 255, 255, 0.87);
  --fg-dim:    rgba(255, 255, 255, 0.60);
  --fg-faint:  rgba(255, 255, 255, 0.38);
  --divider:   rgba(255, 255, 255, 0.08);
  --hover:     rgba(255, 255, 255, 0.06);
  --accent:    #a8c7fa;

  --ui: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 14px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
}

/* ---------- top app bar ---------- */

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 8px 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  flex: 0 0 auto;
}

.app-bar__lead {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-bar__icon {
  display: flex;
  color: var(--accent);
}

.app-bar__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.15px;
  color: var(--fg);
}

.app-bar__actions {
  display: flex;
  gap: 4px;
}

/* ---------- icon buttons ---------- */

.icon-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-dim);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover  { background: var(--hover); color: var(--fg); }
.icon-btn:active { background: rgba(255, 255, 255, 0.10); }

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.icon-btn--sm { width: 32px; height: 32px; }

.icon-btn svg { display: block; pointer-events: none; }

/* ---------- ripple ---------- */

.icon-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  transform: scale(0);
  animation: ripple 520ms cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(1); opacity: 0; }
}

/* ---------- toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  flex: 0 0 auto;
}

.toolbar__sep {
  width: 1px;
  height: 20px;
  margin: 0 8px;
  background: var(--divider);
}

/* ---------- find field ---------- */

.find {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  padding: 2px 2px 2px 14px;
  background: var(--bg-dark);
  border-radius: 20px;
  transition: background-color 120ms ease;
}

.find:focus-within {
  background: var(--bg-light);
  box-shadow: 0 0 0 1px rgba(168, 199, 250, 0.35);
}

.find__input {
  width: 180px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}

.find__input::placeholder { color: var(--fg-faint); }

.find__input--replace {
  width: 140px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--divider);
}

/* ---------- editor region ---------- */

.editor-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--bg);
}

#editor {
  position: absolute;
  inset: 0;
}

/* ---------- status bar ---------- */

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0 14px;
  background: var(--bg-dark);
  border-top: 1px solid var(--divider);
  color: var(--fg-faint);
  font-family: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  flex: 0 0 auto;
}

.status-bar__sep {
  width: 1px;
  height: 12px;
  background: var(--divider);
}

.status-bar__spacer { flex: 1; }