/* Partners area — shared styles. Matches the Athena Automation site theme.
   Lives outside /partners/ so it loads on the (gated) login page too. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Dark theme (default) — Olympian Wisdom: Navy + Violet + Gold */
:root {
  --bg: #0C0F1E;
  --surface: #131736;
  --surface2: #1A1F45;
  --border: #272D58;
  --text: #EEEEF2;
  --text-secondary: #C8C8D4;
  --text-dim: #9494A8;
  --text-muted: #6B6B82;
  --accent: #8B6CC1;
  --accent-light: #A78BDB;
  --accent-dim: rgba(139, 108, 193, 0.14);
  --coral: #D4A843;
  --coral-light: #E4BE6A;
  --coral-dim: rgba(212, 168, 67, 0.14);
  --nav-bg: rgba(12, 15, 30, 0.78);
  --nav-border: rgba(255, 255, 255, 0.06);
  --nav-shadow: 0 1px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --gradient-text: linear-gradient(135deg, var(--accent-light), var(--coral));
  --transition-theme: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Light theme — Warm cream + Laurel green + Gold + Violet */
html.light {
  --bg: #FAF8F5;
  --surface: #F3F0EB;
  --surface2: #EBE7E0;
  --border: #DDD8CE;
  --text: #1C1826;
  --text-secondary: #3B3548;
  --text-dim: #5C5470;
  --text-muted: #7A7490;
  --accent: #3D6B3D;
  --accent-light: #4A7A4A;
  --accent-dim: rgba(74, 122, 74, 0.10);
  --coral: #B8942E;
  --coral-light: #D4A843;
  --coral-dim: rgba(184, 148, 46, 0.10);
  --nav-bg: rgba(250, 248, 245, 0.78);
  --nav-border: rgba(0, 0, 0, 0.06);
  --nav-shadow: 0 1px 24px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.7);
  --gradient-text: linear-gradient(135deg, var(--accent), var(--coral));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: var(--transition-theme);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

.p-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.p-container.narrow { max-width: 760px; }

/* ==================== NAV ==================== */
.p-nav {
  padding: 12px 0;
  border-bottom: 1px solid var(--nav-border);
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  z-index: 50;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--nav-shadow);
  transition: var(--transition-theme);
}

.p-nav .p-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.p-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  transition: opacity 0.2s;
}
.p-logo:hover { opacity: 0.8; }

.p-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.p-logo-text span { color: var(--accent-light); }

.p-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  border: 1px solid var(--coral-dim);
  background: var(--coral-dim);
  padding: 3px 9px;
  border-radius: 999px;
}

.p-nav-actions { display: flex; align-items: center; gap: 16px; }

.p-nav-link {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.p-nav-link:hover { color: var(--text); }

/* ==================== BUTTONS ==================== */
.p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, background 0.2s;
}
.p-btn:hover { transform: translateY(-1px); }
.p-btn:active { transform: scale(0.97); }

.p-btn-primary {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral-light);
  width: 100%;
}
.p-btn-primary:hover { border-color: #fff; }
.p-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.p-btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
  padding: 8px 16px;
}
.p-btn-ghost:hover { color: var(--text); border-color: var(--accent); }

.p-theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.p-theme-toggle:hover { color: var(--coral); border-color: var(--coral); transform: translateY(-1px); }
.icon-sun { display: none; }
html.light .icon-sun { display: inline; }
html.light .icon-moon { display: none; }

/* ==================== LOGIN ==================== */
.p-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.p-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.p-login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.p-login-card h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.p-login-card .p-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 28px;
}

.p-field { margin-bottom: 16px; }
.p-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.p-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.p-field input:focus { outline: none; border-color: var(--accent); }

.p-error {
  display: none;
  background: rgba(212, 90, 90, 0.12);
  border: 1px solid rgba(212, 90, 90, 0.4);
  color: #E89B9B;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 9px;
  margin-bottom: 16px;
}
.p-error.show { display: block; }
html.light .p-error { color: #B23B3B; }

.p-login-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.p-login-foot a { color: var(--accent-light); }
.p-login-foot a:hover { text-decoration: underline; }

/* ==================== PAGE / HUB ==================== */
.p-main { flex: 1; padding: 56px 0 72px; }

.p-page-head { margin-bottom: 40px; }
.p-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}
.p-page-head h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.p-page-head h1 .grad {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.p-page-head p { color: var(--text-dim); font-size: 16px; max-width: 620px; }

.p-section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.p-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.p-res-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
}
a.p-res-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.p-res-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-dim);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.p-res-icon svg { width: 22px; height: 22px; }

.p-res-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.p-res-card p { font-size: 14px; color: var(--text-dim); flex: 1; }

.p-res-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
}
.p-res-meta svg { width: 15px; height: 15px; }

.p-res-card.soon { opacity: 0.62; }
.p-res-card.soon .p-res-icon { background: var(--glass-bg); color: var(--text-muted); }
.p-res-card.soon .p-res-meta { color: var(--text-muted); }

/* ==================== ARTICLE / GUIDE ==================== */
.p-article {
  font-size: 16.5px;
  color: var(--text-secondary);
}
.p-article .p-kicker {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 32px;
}
.p-article h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 48px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.p-article h2:first-of-type { border-top: none; padding-top: 0; }
.p-article h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 10px;
}
.p-article h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 6px;
}
.p-article p { margin: 14px 0; }
.p-article ul, .p-article ol { margin: 14px 0 14px 24px; }
.p-article li { margin: 7px 0; }
.p-article strong { color: var(--text); font-weight: 700; }
.p-article a { color: var(--accent-light); }
.p-article a:hover { text-decoration: underline; }

.p-article blockquote {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--glass-bg);
  border-radius: 0 10px 10px 0;
  color: var(--text-dim);
  font-style: italic;
}

.p-callout {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--coral-dim);
  border: 1px solid var(--coral-light);
  border-radius: 14px;
}
.p-callout h3 { margin-top: 0; color: var(--coral-light); }
html.light .p-callout h3 { color: var(--coral); }
.p-callout p:last-child { margin-bottom: 0; }

.p-lead {
  font-size: 18px;
  color: var(--text);
  border-left: 3px solid var(--coral);
  padding-left: 18px;
  margin: 24px 0;
}

/* Table of contents */
.p-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 28px 0 8px;
}
.p-toc strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.p-toc ol { margin: 0 0 0 20px; }
.p-toc li { margin: 5px 0; font-size: 15px; }
.p-toc a { color: var(--accent-light); }
.p-toc a:hover { text-decoration: underline; }

/* Checklist */
.p-checklist { list-style: none; margin: 16px 0 !important; padding: 0; }
.p-checklist li {
  position: relative;
  padding-left: 30px;
  margin: 10px 0;
}
.p-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--accent);
  border-radius: 5px;
}

.p-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 24px;
  transition: color 0.2s, gap 0.2s;
}
.p-back:hover { color: var(--accent-light); gap: 9px; }
.p-back svg { width: 16px; height: 16px; }

/* ==================== FOOTER ==================== */
.p-footer {
  border-top: 1px solid var(--nav-border);
  padding: 24px 0;
}
.p-footer .p-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.p-footer span, .p-footer a { font-size: 13px; color: var(--text-muted); }
.p-footer a:hover { color: var(--text-dim); }

/* ==================== GUIDE: SIDE TOC LAYOUT ==================== */
.p-guide-layout { display: flex; align-items: flex-start; gap: 44px; }
.p-article { min-width: 0; flex: 1; }
.p-article h2, .p-article h3 { scroll-margin-top: 84px; }

.p-guide-toc {
  width: 234px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
}
.p-guide-toc-inner {
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  padding-right: 6px;
}
.p-guide-toc-inner::-webkit-scrollbar { width: 4px; }
.p-guide-toc-inner::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.p-guide-toc-title {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.p-guide-toc-nav { display: flex; flex-direction: column; }
.p-guide-toc-nav a {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
  padding: 5px 12px;
  border-left: 2px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.p-guide-toc-nav a:hover { color: var(--text); border-left-color: var(--accent-light); }
.p-guide-toc-nav a.lvl-2 { font-weight: 700; color: var(--text-secondary); margin-top: 14px; }
.p-guide-toc-nav a.lvl-2:first-child { margin-top: 0; }
.p-guide-toc-nav a.lvl-3 { padding-left: 22px; }
.p-guide-toc-nav a.active {
  color: var(--accent-light);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}
html.light .p-guide-toc-nav a.active { color: var(--accent); }

/* ==================== GUIDE: PARTS TITLE ==================== */
.p-article .p-parts-title {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 42px 0 4px;
}

/* ==================== GUIDE: EXAMPLE CALLOUT ==================== */
.p-article .p-example {
  margin: 12px 0;
  padding: 11px 16px 11px 17px;
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  color: var(--text-dim);
}
.p-article .p-example strong { color: var(--accent-light); }
html.light .p-article .p-example strong { color: var(--accent); }

/* ==================== GUIDE: LOOP FLOWCHART ==================== */
.p-flow { margin: 24px 0; display: flex; flex-direction: column; align-items: center; }
.p-flow-node {
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.p-flow-start { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-light); }
.p-flow-decision { border-style: dashed; border-color: var(--coral-light); background: var(--coral-dim); }
.p-flow-arrow { width: 2px; height: 20px; background: var(--border); position: relative; }
.p-flow-arrow::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--border);
}
.p-flow-loop {
  width: 100%;
  max-width: 372px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px dashed var(--accent);
  border-radius: 16px;
  padding: 14px;
}
.p-flow-loop-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--bg);
  padding: 3px 14px;
  border-radius: 999px;
  margin: -25px 0 12px;
}
html.light .p-flow-loop-label, html.light .p-flow-start { color: var(--accent); }
.p-flow-branches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.p-flow-branch { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.p-flow-no { background: var(--accent-dim); color: var(--accent-light); border: 1px solid var(--accent); }
.p-flow-yes { background: var(--coral-dim); color: var(--coral-light); border: 1px solid var(--coral-light); }
html.light .p-flow-no { color: var(--accent); }
html.light .p-flow-yes { color: var(--coral); }

/* ==================== GUIDE: INTERACTIVE TOOL CTA ==================== */
.p-tool-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 14px;
}
.p-tool-cta-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-tool-cta-icon svg { width: 21px; height: 21px; }
.p-tool-cta-text { flex: 1; min-width: 210px; }
.p-tool-cta-text strong { display: block; color: var(--text); font-size: 15px; }
.p-tool-cta-text span { font-size: 13.5px; color: var(--text-dim); }
.p-tool-cta .p-btn-primary { width: auto; }

/* ==================== GUIDE: RESPONSIVE ==================== */
@media (max-width: 900px) {
  .p-guide-layout { flex-direction: column; gap: 0; }
  .p-guide-toc {
    width: 100%;
    position: static;
    margin-bottom: 30px;
  }
  .p-guide-toc-inner {
    max-height: 290px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    padding-right: 12px;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  .p-container { padding: 0 20px; }
  .p-page-head h1 { font-size: 30px; }
  .p-login-card { padding: 32px 26px; }
  .p-article { font-size: 16px; }
  .p-article h2 { font-size: 23px; }
  .p-tag { display: none; }
  .p-nav-actions { gap: 12px; }
}
