/* ── Banner ── */

.archtool-banner {
  background: linear-gradient(135deg, #161a16 0%, #161a16 55%, #1a271a 100%);
  border-radius: 14px;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 1.5rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.archtool-banner-glow {
  position: absolute;
  right: -80px;
  top: -80px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(62, 148, 84, 0.22) 0%, transparent 65%);
  pointer-events: none;
}

.archtool-banner-icon {
  flex-shrink: 0;
  background: #191d19;
  border: 1.5px solid #3e9454;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 0 28px rgba(62, 148, 84, 0.28), 0 0 6px rgba(62, 148, 84, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.archtool-banner-icon svg {
  width: 68px;
  height: 68px;
}

.archtool-banner-title {
  font-size: 3.4rem;
  font-weight: 900;
  font-style: italic;
  color: #e5e0d0;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -1.5px;
}

.archtool-banner-tagline {
  color: #6e9a72;
  font-size: 0.95rem;
  line-height: 1.65;
}

@media (max-width: 600px) {
  .archtool-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 20px;
  }
  .archtool-banner-title { font-size: 2.6rem; }
}

/* ── Banner palette matching: dark forest + emerald glow ── */

/* ── Heading colors ── */
[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4 {
  color: #dde8dd;
}

[data-md-color-scheme="default"] .md-typeset h1,
[data-md-color-scheme="default"] .md-typeset h2,
[data-md-color-scheme="default"] .md-typeset h3,
[data-md-color-scheme="default"] .md-typeset h4 {
  color: #1a2d1e;
}

/* Dark mode overrides */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #3e9454;
  --md-primary-fg-color--light: #52a55e;
  --md-primary-fg-color--dark:  #2d6b3c;
  --md-accent-fg-color:         #6abf76;
  --md-default-bg-color:        #252628;
  --md-default-bg-color--light: #2c2d30;
  --md-default-bg-color--dark:  #1e1f21;
  --md-code-bg-color:           #1e2420;
}

/* Light mode overrides */
[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #2d6b3c;
  --md-primary-fg-color--light: #3e9454;
  --md-primary-fg-color--dark:  #1e4d29;
  --md-accent-fg-color:         #3e9454;
}

/* ── Header: frosted glass ── */
.md-header {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

[data-md-color-scheme="slate"] .md-header {
  background: rgba(20, 24, 20, 0.78);
  border-bottom: 1px solid rgba(62, 148, 84, 0.1);
}

[data-md-color-scheme="default"] .md-header {
  background: rgba(248, 251, 249, 0.88);
  border-bottom: 1px solid rgba(45, 107, 60, 0.15);
  --md-primary-bg-color: #1a2d1e;
  --md-primary-bg-color--light: rgba(26, 45, 30, 0.54);
}

[data-md-color-scheme="default"] .md-header__button,
[data-md-color-scheme="default"] .md-header__title,
[data-md-color-scheme="default"] .md-header .md-ellipsis {
  color: #1a2d1e;
}

[data-md-color-scheme="default"] .md-header .md-icon svg {
  fill: #1a2d1e;
}

/* Nav tabs: frosted glass continuation */
[data-md-color-scheme="slate"] .md-tabs {
  background: rgba(20, 24, 20, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(62, 148, 84, 0.07);
}

[data-md-color-scheme="default"] .md-tabs {
  background: rgba(248, 251, 249, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(45, 107, 60, 0.1);
}

[data-md-color-scheme="default"] .md-tabs__link {
  color: rgba(26, 45, 30, 0.65);
}

[data-md-color-scheme="default"] .md-tabs__link--active,
[data-md-color-scheme="default"] .md-tabs__link:hover {
  color: #2d6b3c;
}

/* ── Terminal-style code blocks ── */
.md-typeset .highlight {
  position: relative;
  border-radius: 10px !important;
  overflow: hidden;
  border: 1px solid rgba(62, 148, 84, 0.18);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3);
  margin: 1.4em 0 !important;
}

.md-typeset .highlight::before {
  content: '';
  display: block;
  height: 36px;
  flex-shrink: 0;
  background-color: #131513;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='14'%3E%3Ccircle cx='7' cy='7' r='6' fill='%23ff5f57'/%3E%3Ccircle cx='27' cy='7' r='6' fill='%23febc2e'/%3E%3Ccircle cx='47' cy='7' r='6' fill='%2328c840'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.md-typeset .highlight .md-clipboard {
  top: 7px;
  right: 80px;
  color: rgba(255, 255, 255, 0.25);
}

.md-typeset .highlight .md-clipboard:hover {
  color: #3e9454;
}

.md-typeset .highlight pre {
  margin: 0 !important;
  border-radius: 0 !important;
  background: #191b19 !important;
}

.md-typeset .highlight code {
  background: transparent !important;
}

/* Inline code: green-tinted pill */
.md-typeset :not(pre) > code {
  background: rgba(62, 148, 84, 0.12) !important;
  border: 1px solid rgba(62, 148, 84, 0.2);
  border-radius: 4px;
  color: #6abf76;
  padding: 0.08em 0.42em;
}

[data-md-color-scheme="default"] .md-typeset :not(pre) > code {
  background: rgba(45, 107, 60, 0.08) !important;
  border-color: rgba(45, 107, 60, 0.18);
  color: #1e5c2a;
}

[data-md-color-scheme="default"] .md-typeset .highlight {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Admonition tip/note: green tint */
[data-md-color-scheme="slate"] .md-typeset .admonition.tip,
[data-md-color-scheme="slate"] .md-typeset details.tip {
  border-color: #3e9454;
}

/* Home page banner centering */
.md-typeset img[alt="archtool banner"] {
  border-radius: 12px;
  display: block;
  margin: 1.5rem auto 2rem;
  max-width: 720px;
  width: 100%;
}

/* Subtle glow under the banner */
[data-md-color-scheme="slate"] .md-typeset img[alt="archtool banner"] {
  box-shadow: 0 8px 40px rgba(62, 148, 84, 0.18);
}

/* ── Header nav title ── */
.md-header__title .md-ellipsis {
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ── Developed-by credit line ── */
.archtool-credit {
  text-align: center;
  margin: -1.2rem 0 2.4rem;
  line-height: 1;
}

.archtool-credit-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 300;
  font-size: 0.62rem;
  color: #2e4035;
}

.archtool-credit-sep {
  margin: 0 0.75em;
  color: #3e9454;
  opacity: 0.35;
  font-weight: 300;
  font-size: 0.7rem;
}

.archtool-credit-name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #7aaa80;
  text-decoration: none;
}

.archtool-credit-name:hover { color: #3e9454; }

.archtool-credit-org {
  font-size: 0.75rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #4e7055;
  text-decoration: none;
}

.archtool-credit-org:hover { color: #3e9454; }

[data-md-color-scheme="default"] .archtool-credit-label { color: #9ab0a0; }
[data-md-color-scheme="default"] .archtool-credit-name  { color: #2d6b3c; }
[data-md-color-scheme="default"] .archtool-credit-org   { color: #3d7a49; }

/* ── Footer links section ── */
.archtool-page-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(62, 148, 84, 0.18);
  margin-top: 3rem;
}

.archtool-page-footer-col {
  flex: 1;
  min-width: 180px;
}

.archtool-page-footer-col strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3e9454;
  margin-bottom: 0.6rem;
}

.archtool-page-footer-col a {
  display: block;
  color: #6e9a72;
  font-size: 0.88rem;
  text-decoration: none;
  line-height: 1.9;
}

.archtool-page-footer-col a:hover { color: #3e9454; text-decoration: underline; }

[data-md-color-scheme="default"] .archtool-page-footer { border-top-color: rgba(45, 107, 60, 0.2); }
[data-md-color-scheme="default"] .archtool-page-footer-col strong { color: #2d6b3c; }
[data-md-color-scheme="default"] .archtool-page-footer-col a { color: #4a7a52; }

/* ── Light theme: fenced code blocks ── */
[data-md-color-scheme="default"] .md-typeset .highlight {
  border-color: rgba(45, 107, 60, 0.28);
}

[data-md-color-scheme="default"] .md-typeset .highlight::before {
  background-color: #1a1c1a;
}

/* ── Code playground widget ── */
.archtool-playground {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(62, 148, 84, 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
  font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.72rem;
}

/* Tab bar */
.pg-tabs {
  display: flex;
  background: #0e100e;
  border-bottom: 1px solid rgba(62, 148, 84, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
}

.pg-tab {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: #4a6050;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: inherit;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.pg-tab:hover { color: #7aaa80; }

.pg-tab--active {
  color: #3e9454;
  border-bottom-color: #3e9454;
}

/* Body: code left + terminal right */
.pg-body {
  display: flex;
  min-height: 340px;
  max-height: 400px;
}

/* Code panel */
.pg-code {
  flex: 1 1 55%;
  overflow: hidden;
  position: relative;
  background: #111311;
  border-right: 1px solid rgba(62, 148, 84, 0.1);
}

.pg-pane {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: #2a3a2a transparent;
}

.pg-pane--active { display: block; }

.pg-pre {
  margin: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1.7;
  color: #c8d0c8;
  font-family: inherit;
  font-size: inherit;
}

/* Syntax colors */
.pg-pre .kw  { color: #c792ea; }
.pg-pre .cm  { color: #4a6855; font-style: italic; }
.pg-pre .cn  { color: #4ec9b0; }
.pg-pre .fn  { color: #dcdcaa; }
.pg-pre .st  { color: #ce9178; }
.pg-pre .nb  { color: #9cdcfe; }
.pg-pre .an  { color: #4ade80; font-weight: 600; }  /* annotation type — the magic */
.pg-pre .hl  { background: rgba(62, 148, 84, 0.12); border-radius: 3px; padding: 0 3px; }

/* Terminal panel */
.pg-terminal {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  background: #0a0c0a;
  min-width: 0;
}

.pg-terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #0e100e;
  border-bottom: 1px solid rgba(62, 148, 84, 0.1);
}

.pg-terminal-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2e4035;
}

.pg-run {
  border: 1px solid #3e9454;
  background: transparent;
  color: #3e9454;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}

.pg-run:hover:not(:disabled) {
  background: #3e9454;
  color: #0a0c0a;
}

.pg-run:disabled {
  opacity: 0.5;
  cursor: default;
}

.pg-output {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  scrollbar-width: thin;
  scrollbar-color: #1a2a1a transparent;
  line-height: 1.55;
}

.pg-hint {
  color: #2e4035;
  font-size: 0.75rem;
  font-style: italic;
}

/* Output line types */
.pg-line { white-space: pre; }
.pg-line--cmd    { color: #e0e8e0; }
.pg-line--info   { color: #4a7055; }
.pg-line--mod    { color: #5a8a60; font-weight: 600; }
.pg-line--ok     { color: #3e9454; }
.pg-line--wire   { color: #6abf76; }
.pg-line--result { color: #d4edda; font-weight: 500; }
.pg-line--err    { color: #f87171; font-weight: 700; }
.pg-line--errtxt { color: #fca5a5; }
.pg-line--blank  { display: block; height: 0.4em; }

/* Mobile: stack vertically */
@media (max-width: 700px) {
  .pg-body { flex-direction: column; max-height: none; }
  .pg-code { flex: none; max-height: 200px; border-right: none; border-bottom: 1px solid rgba(62, 148, 84, 0.1); }
  .pg-terminal { flex: none; min-height: 180px; }
}

/* ── Example download button ── */
.archtool-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid rgba(62, 148, 84, 0.5);
  border-radius: 6px;
  background: rgba(62, 148, 84, 0.08);
  color: #3e9454;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
  margin: 0.5rem 0 1.5rem;
}

.archtool-download:hover {
  background: rgba(62, 148, 84, 0.18);
  border-color: #3e9454;
  color: #3e9454 !important;
}

[data-md-color-scheme="default"] .archtool-download {
  border-color: rgba(45, 107, 60, 0.4);
  background: rgba(45, 107, 60, 0.06);
  color: #2d6b3c;
}

[data-md-color-scheme="default"] .archtool-download:hover {
  background: rgba(45, 107, 60, 0.14);
  color: #2d6b3c !important;
}
