/* === SAIG Generated Content (Editor + Front) === */
.saig-shell, .saig-shell * { box-sizing: border-box; }

/*
  "Panel" look on the frontend (posts + pages)
  Matches the internal dashboard aesthetics: soft shell + elevated card + gradient accent.
*/
.saig-shell {
  margin: 26px 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(241, 245, 249, 0.75) 60%, rgba(241, 245, 249, 0.95) 100%);
}

.saig-shell .saig-article {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 22px 55px -42px rgba(2, 6, 23, 0.60);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
}

.saig-shell .saig-article::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.saig-shell .saig-article > :first-child { margin-top: 0 !important; }

/* Backward-compat: legacy wrapper used only .saig-article as alignfull group */
.alignfull.saig-article {
  margin: 26px 0;
  padding: 26px 24px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  box-shadow: 0 22px 55px -42px rgba(2, 6, 23, 0.60);
  position: relative;
  overflow: hidden;
}
.alignfull.saig-article::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.saig-article { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #334155; }
.saig-article p { text-align: justify; margin: 0 0 1.25em 0; line-height: 1.8; font-size: 1.05em; }
.saig-article h2, .saig-article h3 { color: var(--saig-title-color, #0ea5e9); margin: 1.8em 0 0.8em 0; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; }
.saig-article h2 { font-size: 2.1em; }
.saig-article h3 { font-size: 1.5em; }
.saig-article ul, .saig-article ol { margin: 0.8em 0 1.5em 1.5em; font-size: 1.05em; line-height: 1.7; }
.saig-article li { margin: 0.5em 0; }
.saig-article strong { font-weight: 700; color: #0f172a; }
.saig-article a { color: var(--saig-title-color, #0ea5e9); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500; transition: all 0.2s ease; }
.saig-article a:hover { color: var(--saig-table-color, #10b981); }

/* === Responsive Tables === */
.saig-table-wrapper { width: 100%; overflow-x: auto; margin: 1.6em 0; border-radius: 18px; border: 1px solid rgba(15, 23, 42, 0.10); background: #fff; box-shadow: 0 18px 45px -30px rgba(2, 6, 23, 0.30); }
.saig-article table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.saig-article th, .saig-article td { padding: 18px 22px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); border-right: 1px solid rgba(15, 23, 42, 0.06); text-align: left; vertical-align: middle; line-height: 1.55; font-size: 1.02em; }
.saig-article th:last-child, .saig-article td:last-child { border-right: none; }
.saig-article thead tr:first-child th { background: linear-gradient(135deg, var(--saig-title-color, #0ea5e9) 0%, var(--saig-table-color, #10b981) 100%); color: #fff; font-weight: 800; font-size: 0.98em; letter-spacing: 0.08em; border-bottom: none; text-transform: uppercase; }
.saig-article tbody td:first-child { font-weight: 700; color: #0f172a; background: rgba(2, 6, 23, 0.018); }
.saig-article tbody tr:nth-child(even) td { background: rgba(2, 6, 23, 0.015); }
.saig-article tbody tr:hover td { background: rgba(2, 6, 23, 0.03); }

@media (max-width: 780px) {
  .saig-article th, .saig-article td { padding: 14px 16px; font-size: 0.98em; }
}

/* === Images === */
.saig-article figure { margin: 2em auto; display: block; }
.saig-article figure img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); display: block; }
.saig-article figure figcaption { text-align: center; font-size: 0.85em; color: #64748b; margin-top: 10px; font-style: italic; }

/* === FAQ Accordion === */
.saig-faq-accordion { margin-top: 2em; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); background: #fff; }
.saig-faq-item { border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.saig-faq-item:last-child { border-bottom: none; }
.saig-faq-header { padding: 18px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #fff; transition: background 0.2s; user-select: none; }
.saig-faq-header:hover { background: rgba(2, 6, 23, 0.01); }
.saig-faq-header h3 { margin: 0 !important; font-size: 1.15em !important; color: #0f172a !important; font-weight: 600; }
.saig-faq-icon { width: 24px; height: 24px; border-radius: 50%; background: rgba(15, 23, 42, 0.05); display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.3s ease; flex-shrink: 0; margin-left: 15px; }
.saig-faq-icon::before, .saig-faq-icon::after { content: ""; position: absolute; background: var(--saig-title-color, #0ea5e9); transition: all 0.3s ease; }
.saig-faq-icon::before { width: 12px; height: 2px; }
.saig-faq-icon::after { width: 2px; height: 12px; }
.saig-faq-item.saig-active .saig-faq-icon { background: var(--saig-title-color, #0ea5e9); transform: rotate(180deg); }
.saig-faq-item.saig-active .saig-faq-icon::before { background: #fff; }
.saig-faq-item.saig-active .saig-faq-icon::after { opacity: 0; }
.saig-faq-content { display: none; padding: 0 24px 20px 24px; background: #fff; }
.saig-faq-content p { margin: 0; padding-top: 10px; color: #475569; }

@media (prefers-color-scheme: dark) {
  .saig-shell { background: linear-gradient(180deg, rgba(2, 6, 23, 0.55) 0%, rgba(11, 18, 32, 0.70) 70%, rgba(11, 18, 32, 0.90) 100%); border-color:#1f2a44; }
  .saig-shell .saig-article { background:#0b1220; border-color:#1f2a44; box-shadow: 0 22px 55px -42px rgba(0,0,0,0.85); }
  .alignfull.saig-article { background:#0b1220; border-color:#1f2a44; box-shadow: 0 22px 55px -42px rgba(0,0,0,0.85); }
  .saig-article { color:#cbd5e1; }
  .saig-article strong { color:#e2e8f0; }
  .saig-table-wrapper, .saig-faq-accordion, .saig-faq-header, .saig-faq-content { background:#0b1220; border-color:#1f2a44; }
  .saig-faq-header h3 { color:#e2e8f0 !important; }
  .saig-faq-content p { color:#cbd5e1; }
}
