/* =========================================
   GLOBAL LAYOUT
   ========================================= */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111;
  background: #fff;
  margin: 2rem;
  max-width: 1000px;
}

h1 {
  margin: 0 0 1rem;
}

h3 {
  margin: 0 0 0.75rem;
}

/* =========================================
   INPUT BAR
   ========================================= */
.bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1.25rem;
}

.bar input[type=text] {
  padding: 0.6rem 0.7rem;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  min-width: 240px;
  flex: 1;
}

.bar select,
.bar button {
  padding: 0.6rem 0.8rem;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  background: #fafafa;
}

.bar button {
  background: #111;
  color: #fff;
  border-color: #111;
  cursor: pointer;
}

/* =========================================
   CARD STYLES
   ========================================= */
.card {
  border: 1px solid #eaeaea;
  border-radius: 14px;
  padding: 1rem;
  margin: 0 0 1rem;
}

.subcard {
  border: 1px dashed #eaeaea;
  border-radius: 12px;
  padding: 0.75rem;
  margin: 0.5rem 0;
}

.kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.25rem 1rem;
}

/* =========================================
   CODE BLOCKS
   ========================================= */

/* Inline code */
code {
  background: #f9f9f9;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 0.1rem 0.3rem;
  white-space: normal;
  font-family: monospace;
  font-size: 0.9rem;
}

/* Block code (use <code class="blockcode">...</code>) */
.blockcode {
  display: block;
  padding: 0.5rem 0.6rem;
  background: #f9f9f9;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  margin: 0.2rem 0;
  line-height: 1.4;
  font-family: monospace;
  font-size: 0.9rem;

  /* wrapping + overflow behavior */
  white-space: pre-wrap !important;   /* wrap lines */
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;              /* emergency breaks for long base64 */
  overflow-x: hidden;                 /* prevent scroll bar */
  max-width: 100%;
}

/* =========================================
   STATUS COLORS
   ========================================= */
.muted {
  color: #666;
}

.good {
  color: #0a7;
  font-weight: 600;
}

.bad {
  color: #b00;
  font-weight: 600;
}

/* =========================================
   NOTES & TIPS
   ========================================= */
.notes {
  margin: 0.5rem 0 0 0.25rem;
  color: #333;
}

.tips {
  background: #fbfbfb;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.5rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  color: #666;
  font-size: 0.9em;
  margin-top: 2rem;
}
