.button-secondary {
  display: inline-block;
  box-sizing: border-box;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}
.button-secondary:hover, .button-secondary:focus {
  border-color: #d42e15;
  background: #fff7f5;
  color: #a82512;
  text-decoration: none;
}
.button-secondary[aria-pressed="true"] {
  border-color: #d42e15;
  background: #fff1ee;
  color: #a82512;
}
.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.article-main pre, .tool-output pre {
  position: relative;
  padding-top: 42px;
}
.copy-code-button {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  line-height: 18px;
}
.copy-code-button:hover, .copy-code-button:focus {
  border-color: #d42e15;
  color: #a82512;
}
.command-library {
  margin: 24px 20px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.command-library h2 { margin-top: 0; }
.library-intro { color: #64748b; font-size: 14px; }
.command-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.library-panel {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.library-panel h3 { margin-top: 0; }
.library-panel ul { min-height: 24px; padding-left: 20px; }
.library-panel li { margin: 5px 0; }
.library-empty { color: #64748b; font-size: 13px; }
.search-corrections { padding-left: 22px; }
.search-corrections li { margin: 8px 0; }
.search-corrections a { font-family: monospace; font-weight: bold; }
.search-corrections span { margin-left: 10px; color: #64748b; }
@media (max-width: 600px) {
  .command-library { margin: 16px 0; padding: 14px; }
}

.page-intro { color: #526173; }
.continue-learning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid #d42e15;
  border-radius: 6px;
  background: #fff7f5;
}
.continue-learning[hidden] { display: none; }
.continue-learning h2 { margin: 0 0 4px; }
.continue-learning p { margin: 0; color: #64748b; }
.home-learning .continue-learning { max-width: 760px; }
.learning-route {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.learning-route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.learning-route-header h2 { margin-top: 0; }
.learning-route-header p { color: #526173; }
.learning-route-progress { min-width: 150px; text-align: right; }
.learning-route-progress progress, .learning-detail-progress progress {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: #d42e15;
}
.learning-route-progress span, .learning-detail-progress span { color: #64748b; font-size: 13px; }
.learning-steps { padding: 0; list-style: none; counter-reset: learning-step; }
.learning-steps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}
.learning-steps li > a { display: flex; align-items: center; gap: 10px; flex: 1; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: #edf2f7;
  color: #475569;
  font-size: 13px;
}
.step-status { color: #64748b; font-size: 12px; white-space: nowrap; }
.learning-steps li.completed { border-color: #bbf7d0; background: #f0fdf4; }
.learning-steps li.completed .step-number { background: #dcfce7; color: #15803d; }
.learning-steps li.completed .step-status { color: #15803d; }
.learning-progress-panel {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.learning-progress-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.learning-progress-meta span { color: #526173; }
.learning-detail-progress { margin: 12px 0; }
.learning-progress-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.learning-doc-nav { margin-top: 12px; }
.learning-help { margin: 32px 0; color: #526173; }
@media (max-width: 650px) {
  .continue-learning, .learning-route-header { align-items: flex-start; flex-direction: column; }
  .learning-route { padding: 15px; }
  .learning-route-progress { width: 100%; text-align: left; }
  .learning-steps li { align-items: flex-start; }
}

.button-primary {
  padding: 9px 16px;
  border: 1px solid #b4230f;
  border-radius: 6px;
  background: #d42e15;
  color: #fff;
  font-weight: 600;
}
.button-primary:hover, .button-primary:focus { background: #b4230f; }
.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.tool-card {
  display: block;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
}
.tool-card:hover, .tool-card:focus { border-color: #d42e15; background: #fff7f5; text-decoration: none; }
.tool-card h2 { margin-top: 0; }
.tool-card p { margin-bottom: 0; color: #64748b; }
.tool-boundary { margin: 32px 0; }
.tool-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  gap: 24px;
  align-items: start;
  margin: 24px 0;
}
.tool-form, .tool-result, .troubleshooting-tool {
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.tool-form label { display: block; margin: 14px 0 5px; font-weight: 600; }
.tool-form label:first-child { margin-top: 0; }
.tool-form input, .tool-form select, .cheatsheet-actions input {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #1e293b;
}
.tool-form input:focus, .tool-form select:focus, .cheatsheet-actions input:focus {
  border-color: #d42e15;
  outline: 2px solid #fee2e2;
}
.tool-form small { display: block; margin-top: 5px; color: #64748b; line-height: 1.5; }
.tool-form .button-primary { margin-top: 20px; }
.tool-result { background: #fff; }
.tool-result h2:first-child { margin-top: 0; }
.tool-result pre {
  max-height: 480px;
  padding: 14px;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tool-result pre code { padding: 0; background: transparent; color: inherit; font-size: 13px; }
.tool-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.result-note { color: #64748b; font-size: 13px; line-height: 1.7; }
.memory-results { margin: 0; }
.memory-results > div { padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.memory-results dt { color: #64748b; font-size: 13px; }
.memory-results dd { margin: 4px 0 0; color: #b4230f; font-size: 22px; font-weight: 600; }
.troubleshooting-tool { background: #fff; }
.troubleshooting-progress { display: flex; gap: 8px; }
.troubleshooting-options { display: grid; gap: 10px; margin: 18px 0; }
.decision-option {
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  text-align: left;
}
.decision-option:hover, .decision-option:focus { border-color: #d42e15; background: #fff7f5; }
.cheatsheet-actions {
  display: grid;
  grid-template-columns: auto minmax(200px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
}
.cheatsheet-group { margin: 28px 0; }
.cheatsheet-group table { table-layout: auto; }
.cheatsheet-group td code { white-space: nowrap; }
.cheatsheet-group td:nth-child(3) { min-width: 220px; color: #526173; }
.table-responsive { overflow-x: auto; }
@media (max-width: 800px) {
  .tool-layout { grid-template-columns: 1fr; }
  .cheatsheet-actions { grid-template-columns: 1fr 1fr; }
  .cheatsheet-actions label { grid-column: 1 / -1; }
  .cheatsheet-actions input { grid-column: 1 / -1; }
}
@media print {
  body { max-width: none; background: #fff; color: #000; }
  .site-header, .site-footer, .mobile-menu, .back-link, .cheatsheet-actions,
  .print-hidden, .copy-code-button, .tool-form, .tool-result-actions,
  .learning-progress-panel, .doc-nav { display: none !important; }
  .site-content, .container { max-width: none; }
  .text { padding: 0; }
  .tool-layout { display: block; }
  .tool-result, .cheatsheet-group { border: 0; padding: 0; }
  .cheatsheet-group { break-inside: avoid; }
  .cheatsheet-group table { font-size: 11px; }
  .cheatsheet-group td code { white-space: normal; }
  a { color: #000; text-decoration: none; }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .desktop-header a { padding-left: 0.3em; padding-right: 0.3em; font-size: 13px; }
  .desktop-header .home { margin-right: 0.4em; }
  .desktop-header .search-form { margin-left: 0; }
  .desktop-header .search-input-wrapper { padding-left: 8px; padding-right: 8px; }
  .desktop-header .search-input-wrapper input { width: 100px; }
  .desktop-header .search-input-wrapper input:focus { width: 120px; }
}
@media only screen and (min-width: 992px) {
  .home-intro { box-sizing: border-box; }
}
