/* Readability and containment overrides. Loaded last on purpose. */
.tool-modal-card {
  width: min(980px, 100%);
}

.tool-modal-body {
  font-size: 14px;
  line-height: 1.6;
}

.tool-modal-body * {
  min-width: 0;
}

.tool-modal-card :is(button, input, textarea, select) {
  font-size: 14px;
}

.tool-modal-card .primary-btn,
.tool-modal-card .outline-btn,
.tool-modal-card .text-btn {
  font-size: 14px;
  line-height: 1.35;
  padding: 10px 15px;
}

.tool-modal-head h2 { font-size: 20px; }
.tool-modal-head .eyebrow { font-size: 12px; }
.modal-progress span,
.modal-cost { font-size: 12px; }

.tool-modal-body :is(.modal-intro, .modal-field small, .check-card small, .batch-section > p,
  .reference-upload small, .publish-connect-head span, .connection-help, .connection-inline-state,
  .wp-temp-login-box p, .wp-temp-login-box > small, .plugin-fallback p,
  .subtopic-rule-grid span, .subtopic-cost-note span, .subtopic-result-head p,
  .subtopic-result-head > span, .subtopic-stale-warning, .batch-insight-option small,
  .title-treatment-head p, .title-treatment-head > span, .title-treatment-box ul,
  .title-treatment-box details, .keep-all-titles small, .original-title-list label,
  .original-title-list > p, .insight-match-status, .insight-preview-list b,
  .insight-preview-list span, .insight-preview-list > p, .research-step-intro p,
  .research-step-intro span, .research-cost-card span, .research-topic-card header small,
  .research-topic-card h4 em, .serp-insight-list, .sourced-research summary,
  .sourced-research p, .sourced-research a, .article-step-intro p,
  .article-step-intro span, .article-batch-control span, .batch-article-card header small,
  .article-status, .article-generating, .article-failed b, .article-quality-row span,
  .batch-article-output summary, .article-material-preview summary,
  .article-material-preview ul, .article-material-preview p, .article-scope-selector span,
  .writing-model-selector span, .writing-model-selector small, .writing-model-warning,
  .batch-step-storage span, .image-wordpress-gate span, .batch-image-gallery figcaption) {
  font-size: 12px !important;
}

.tool-modal-body :is(.modal-field > span, .check-card b, .batch-section h3,
  .publish-connect-head b, .connection-inline-state b, .wp-temp-login-box b,
  .subtopic-cost-note b, .title-treatment-head b, .keep-all-titles b,
  .research-cost-card b, .research-topic-card header b, .research-topic-card h4,
  .article-batch-control b, .batch-article-card header b, .article-material-preview b,
  .article-scope-selector b, .writing-model-selector b, .batch-step-storage b,
  .image-wordpress-gate b) {
  font-size: 14px !important;
}

.tool-modal-body :is(.research-step-intro h3, .article-step-intro h3,
  .subtopic-result-head h3, .buyer-error h3) {
  font-size: 17px !important;
}

.subtopic-table-wrap {
  max-width: 100%;
  overflow-x: hidden;
}

.subtopic-table {
  width: 100%;
  table-layout: fixed;
}

.subtopic-table th,
.subtopic-table td {
  font-size: 13px !important;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.subtopic-table td b,
.subtopic-table td span {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.subtopic-table td b { font-size: 14px !important; }
.subtopic-table td span { font-size: 13px !important; }

.tool-modal-body :is(.batch-article-card, .research-topic-card, .publish-target,
  .buyer-error, .inline-error, .writing-model-warning, .connection-inline-state) {
  max-width: 100%;
}

.tool-modal-body :is(.batch-article-card b, .batch-article-card small,
  .research-topic-card b, .research-topic-card small, .publish-target b,
  .publish-target small, .buyer-error p, .inline-error, .writing-model-warning,
  .connection-inline-state span) {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.batch-article-output textarea,
.article-output textarea,
.role-english textarea {
  font-size: 13px !important;
  line-height: 1.65 !important;
}

/* Keep workflow messages physically inside the modal card. */
.tool-modal-card { position: relative; }
.modal-toast {
  position: absolute;
  z-index: 20;
  left: 22px;
  right: 22px;
  bottom: 76px;
  max-width: calc(100% - 44px);
  max-height: min(180px, 28vh);
  overflow: auto;
  background: #193a2e;
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(10,36,26,.28);
  padding: 14px 18px;
  font-size: 14px !important;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s, visibility .2s;
}

.modal-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tool-modal-foot { position: relative; z-index: 21; background: #fff; }
body:has(.tool-modal.open) > .toast { opacity: 0 !important; visibility: hidden !important; }

@media (max-width: 760px) {
  .tool-modal-card { width: 100%; }
  .tool-modal-body { padding: 16px; }
  .subtopic-table th:first-child,
  .subtopic-table td:first-child { width: 44px; }
  .modal-toast {
    left: 12px;
    right: 12px;
    bottom: 94px;
    max-width: calc(100% - 24px);
    font-size: 13px;
  }
}

/* Global large-text mode: applies to the dashboard and every workflow. */
body { font-size: 16px; line-height: 1.55; }
.brand strong { font-size: 20px !important; }
.brand span, .token-card small, .token-card > div:first-child, .token-card strong { font-size: 13px !important; }
.nav-item { font-size: 16px !important; padding-top: 14px; padding-bottom: 14px; }
.breadcrumb, .top-actions :is(button, span), .mode-pill, .safe-badge { font-size: 14px !important; }

.page :is(button, input, textarea, select) { font-size: 15px !important; line-height: 1.5; }
.page :is(p, small, label, li, td, th, summary, details, em) { font-size: 14px !important; line-height: 1.6; }
.page :is(b, strong) { font-size: 16px !important; line-height: 1.45; }
.page .eyebrow { font-size: 12px !important; }
.hero h1, .page-heading h1 { font-size: 34px !important; }
.tool-section-head h2, .panel-head h2 { font-size: 20px !important; }
.full-tool-card b { font-size: 16px !important; }
.full-tool-card small { font-size: 13px !important; }
.full-tool-card > strong { font-size: 14px !important; }
.full-tool-card > span, .tool-section-icon, .stat-icon, .quick-icon { font-size: 21px !important; }
.manager-tabs button, .manager-folder-tabs button { font-size: 14px !important; }
.managed-topic-row b { font-size: 15px !important; }
.managed-topic-row small { font-size: 13px !important; }

.tool-modal-card { width: min(1080px, 100%); }
.tool-modal-body { font-size: 16px; line-height: 1.7; }
.tool-modal-card :is(button, input, textarea, select) { font-size: 16px !important; line-height: 1.5; min-height: 42px; }
.tool-modal-card .primary-btn, .tool-modal-card .outline-btn, .tool-modal-card .text-btn { font-size: 16px !important; padding: 11px 17px; }
.tool-modal-head h2 { font-size: 23px !important; }
.tool-modal-head .eyebrow, .modal-progress span, .modal-cost { font-size: 14px !important; }
.modal-number { font-size: 17px !important; }
.tool-modal-body :is(p, small, li, td, th, label, summary, details, span, em, a) { font-size: 14px !important; line-height: 1.65; }
.tool-modal-body :is(b, strong) { font-size: 16px !important; line-height: 1.5; }
.tool-modal-body :is(h2, h3) { font-size: 19px !important; line-height: 1.4; }
.tool-modal-body h4 { font-size: 16px !important; }
.tool-modal-body :is(.subtopic-table th, .subtopic-table td, .subtopic-table td span, .serp-insight-list, .sourced-research p, .article-material-preview ul, .article-material-preview p) { font-size: 14px !important; }
.batch-article-output textarea, .article-output textarea, .role-english textarea, .manual-prompt-list textarea { font-size: 15px !important; line-height: 1.7 !important; }
.tool-modal-body :is(.modal-field input, .modal-field textarea, .modal-field select) { padding: 12px 13px; }

@media (max-width: 760px) {
  body { font-size: 15px; }
  .hero h1, .page-heading h1 { font-size: 29px !important; }
  .tool-modal-body { font-size: 15px; }
  .tool-modal-card :is(button, input, textarea, select) { font-size: 15px !important; }
  .tool-modal-body :is(p, small, li, td, th, label, summary, details, span, em, a) { font-size: 13px !important; }
}
.foundation-archive{display:grid;gap:12px;padding:16px;margin:0 0 18px;border:1px solid #b9d9ca;border-radius:14px;background:#f3faf6;color:#173a2b}
.foundation-archive>div:first-child{display:grid;gap:4px}
.foundation-archive>div:first-child b{font-size:17px}
.foundation-archive small{display:block;font-size:13px;line-height:1.6;color:#587064}
.foundation-archive-actions{display:grid;grid-template-columns:minmax(220px,1fr) auto auto auto;gap:10px;align-items:center}
.foundation-archive-actions select,.foundation-picker select{width:100%;min-height:44px;padding:8px 12px;border:1px solid #cbd8d1;border-radius:10px;background:#fff;font-size:15px;color:#173a2b}
.foundation-picker{padding:14px;border:1px solid #c7ded2;border-radius:12px;background:#f7fbf9}
.foundation-picker>span{font-weight:700;font-size:16px}
@media(max-width:760px){.foundation-archive-actions{grid-template-columns:1fr}.foundation-archive-actions button{width:100%}}
.faq-language-rule{display:flex;gap:10px;align-items:center;margin-top:14px;padding:13px 15px;border:1px solid #b9d9ca;border-radius:12px;background:#f1faf5;font-size:15px}.faq-language-rule b{color:#087747}.faq-language-rule span{color:#52675d}
.faq-result{display:grid;gap:14px}.faq-result>header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.faq-result h3{margin:3px 0 5px;font-size:22px}.faq-result p{margin:0;color:#5c6d65}.faq-english-note{padding:12px 14px;border-radius:10px;background:#eaf8ef;color:#12673e;font-weight:700}.faq-category-list{display:grid;gap:13px}.faq-category{border:1px solid #d8e2dd;border-radius:12px;overflow:hidden;background:#fff}.faq-category h4{display:flex;justify-content:space-between;margin:0;padding:13px 15px;background:#f3f7f5;font-size:17px}.faq-category h4 span{min-width:28px;padding:2px 8px;border-radius:999px;background:#dff1e7;color:#176b45;text-align:center}.faq-category label{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:11px 15px;border-top:1px solid #edf1ef;font-size:15px;line-height:1.55}.faq-category input{margin-top:4px}.faq-actions{display:flex;flex-wrap:wrap;gap:10px}.faq-actions button{min-height:42px}
.auth-gate{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#09291f,#174b3a 55%,#dcebe4)}.auth-gate.ready .auth-card{opacity:1;transform:none}.auth-gate.authenticated{display:none}.auth-card{width:min(440px,100%);display:grid;gap:17px;padding:30px;border:1px solid rgba(255,255,255,.55);border-radius:22px;background:#fff;box-shadow:0 30px 80px rgba(0,20,13,.35);opacity:.7;transform:translateY(8px);transition:.2s}.auth-brand{display:flex;gap:13px;align-items:center}.auth-brand>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#0d6f4d;color:#fff;font:bold 25px/1 sans-serif}.auth-brand div{display:grid;gap:4px}.auth-brand b{font-size:23px}.auth-brand small{font-size:14px;color:#60736a}.auth-card label{display:grid;gap:7px}.auth-card label>span{font-size:15px;font-weight:700}.auth-card input{min-height:48px;padding:10px 13px;border:1px solid #bdcdc5;border-radius:10px;font-size:16px}.auth-card button{min-height:48px;font-size:16px}.auth-card p{min-height:20px;margin:0;color:#b33b31;font-weight:700}.auth-card .auth-privacy{line-height:1.6;color:#64776e}.auth-confirm-row[hidden]{display:none}.account-pill{padding:7px 11px;border-radius:999px;background:#e7f5ed;color:#116a48;font-weight:700}.logout-btn{min-height:36px!important;padding:7px 12px!important}.auth-loading .auth-card label,.auth-loading #authSubmit{visibility:hidden}@media(max-width:760px){.auth-card{padding:23px}.auth-brand b{font-size:20px}.account-pill{display:none}}
.auth-code-row[hidden],.two-factor-confirm[hidden]{display:none!important}.auth-code-row small{color:#527166;line-height:1.5}.two-factor-confirm{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;padding:16px;border:1px solid #abd7c5;border-radius:12px;background:#f1faf6}.two-factor-confirm button{min-height:48px}.security-note{margin:0;padding:12px 14px;border-radius:10px;background:#eef7f3;color:#426258;line-height:1.6}
.login-audit-card{padding:22px}.login-audit-card .api-setting-head{display:flex;align-items:center;gap:14px}.login-audit-card .api-setting-head>div{flex:1}.login-audit-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.login-audit-stats div{display:grid;gap:3px;padding:15px;border:1px solid #d7e5de;border-radius:12px;background:#f7fbf9}.login-audit-stats strong{font-size:25px!important;color:#116b4b}.login-audit-stats span{font-size:13px;color:#62746b}.login-audit-recent{display:grid;max-height:250px;overflow:auto;border:1px solid #dce6e1;border-radius:12px}.login-audit-recent>div{display:grid;grid-template-columns:180px 1fr auto;gap:12px;padding:11px 13px;border-bottom:1px solid #edf2ef}.login-audit-recent>div:last-child{border-bottom:0}.login-audit-recent time,.login-audit-recent span,.login-audit-recent code{font-size:13px}.login-audit-recent code{color:#48665a}.login-audit-recent p{padding:12px;margin:0;color:#718078}@media(max-width:760px){.login-audit-stats{grid-template-columns:1fr 1fr}.login-audit-recent>div{grid-template-columns:1fr}.login-audit-card .api-setting-head{align-items:flex-start;flex-wrap:wrap}}
