/* EGG portal shell: header, footer, tabs, text pages. Scoped to body.egg-portal so it
   does not touch the admin pages, which share the asset pipeline. */

html[data-theme="dark"] { color-scheme: dark; }

body.egg-portal {
  --p-bg: #f5f6f8;
  --p-surface: #ffffff;
  --p-border: #dcdfe4;
  --p-text: #1f2430;
  --p-muted: #5f6877;
  --p-link: #8a5a00;
  --p-accent: #e8a317;
  --p-accent-text: #1f2430;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

html[data-theme="dark"] body.egg-portal {
  --p-bg: #12151b;
  --p-surface: #1b1f27;
  --p-border: #343b48;
  --p-text: #e6e9ef;
  --p-muted: #9aa3b2;
  --p-link: #f0b949;
}

.egg-portal a { color: var(--p-link); }
.egg-portal *, .egg-portal *::before, .egg-portal *::after { box-sizing: border-box; }

.egg-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.egg-main { flex: 1 0 auto; padding-top: 24px; padding-bottom: 40px; }

.egg-nav { background: var(--p-surface); border-bottom: 1px solid var(--p-border); }
.egg-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.egg-brand { display: flex; align-items: center; gap: 10px; color: var(--p-text) !important; font-weight: 700; text-decoration: none; }
.egg-brand img { border-radius: 8px; }
.egg-brand small { color: var(--p-muted); font-weight: 600; }
.egg-nav__links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.95rem; }
.egg-nav__links a { text-decoration: none; }
.egg-nav__links a:hover { text-decoration: underline; }
.egg-nav__admin, .egg-nav__signin {
  background: var(--p-accent);
  color: var(--p-accent-text) !important;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.egg-iconbtn {
  background: transparent;
  border: 1px solid var(--p-border);
  color: var(--p-text);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.egg-iconbtn:hover { border-color: var(--p-accent); }
.egg-iconbtn__sun { display: none; }
html[data-theme="dark"] .egg-iconbtn__moon { display: none; }
html[data-theme="dark"] .egg-iconbtn__sun { display: inline; }

.egg-hero h1 { margin: 0 0 4px; font-size: 1.7rem; }
.egg-hero p { margin: 0 0 20px; color: var(--p-muted); }

.egg-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--p-border); margin-bottom: 20px; }
.egg-tab {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--p-muted);
  padding: 8px 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.egg-tab[aria-selected="true"] { color: var(--p-text); border-bottom-color: var(--p-accent); }
.egg-panel[hidden] { display: none; }

.egg-signin-note { margin: 24px 0 0; color: var(--p-muted); }

.egg-text { max-width: 760px; }
.egg-text h1 { margin-top: 0; }
.egg-text h2 { margin-top: 28px; font-size: 1.2rem; }

.egg-footer { border-top: 1px solid var(--p-border); padding: 16px 0; font-size: 0.88rem; color: var(--p-muted); }
.egg-footer a { text-decoration: none; }
.egg-footer__note { float: right; }
