/*
 * Pacific Internet — modern.css
 * Responsive site stylesheet. Pair with HTML pages that use:
 *   <header class="site-header"> ... </header>
 *   <main class="page"> ... </main>
 *   <footer class="site-footer"> ... </footer>
 */

:root {
  --brand:          #003b66;
  --brand-dark:     #002744;
  --accent:         #2779a7;
  --accent-light:   #eef6fb;
  --text:           #222;
  --muted:          #555;
  --border:         #ddd;
  --bg:             #f4f6f8;
  --bg-card:        #fafafa;
  --bg-pre:         #f1f1f1;
  --notice-bg:      #eef6fb;
  --notice-border:  #2779a7;
  --warning-bg:     #fff7e6;
  --warning-border: #d98200;
  --danger-bg:      #fff0f0;
  --danger-border:  #b30000;
  --max-width:      980px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: #005b99; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--brand);
  line-height: 1.2;
  margin: 0 0 0.4em 0;
}
h1 { font-size: 2rem; }
h2 {
  font-size: 1.45rem;
  margin-top: 2em;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.25em;
}
h3 {
  font-size: 1.15rem;
  color: #333;
  margin-top: 1.5em;
}
h4 { font-size: 1rem; }

p { margin: 0 0 1em 0; }
ul, ol { margin: 0 0 1em 1.5em; padding: 0; }
li { margin-bottom: 0.25em; }

code, pre {
  background: var(--bg-pre);
  border-radius: 4px;
  font-family: Consolas, Monaco, "Courier New", monospace;
}
code { padding: 1px 5px; font-size: 0.95em; }
pre  { padding: 12px; overflow-x: auto; }

/* Site header --------------------------------------------------------- */

.site-header {
  background: #fff;
}
.site-banner {
  background: #fff;
  text-align: center;
  line-height: 0;
}
.site-banner a {
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 791px;
  margin: 0 auto;
}
.site-tagline {
  text-align: center;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 4px 16px 8px;
  line-height: 1.3;
}
.site-nav {
  background: var(--brand);
  color: #fff;
}
.site-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: center;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.98rem;
  padding: 4px 0;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a.active { font-weight: 700; }

/* Main content area --------------------------------------------------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto 32px auto;
  background: #fff;
  padding: 32px 32px 48px 32px;
}
.page > :first-child { margin-top: 0; }
.page > h1:first-child,
.page > header > h1:first-child { margin-top: 0; }

.summary {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 1em;
}

/* Section divider (top-level page sections) -------------------------- */

.section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 2px solid var(--accent);
  position: relative;
}
.section > h2:first-child,
.section > h3:first-child {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
  color: var(--brand);
}
.section > h2:first-child {
  font-size: 1.6rem;
}
.section::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--brand);
}

/* Call-to-action banner ---------------------------------------------- */

.cta {
  background: linear-gradient(135deg, var(--accent-light), #fff);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-text { flex: 1; min-width: 220px; }
.cta-text h3 {
  margin: 0 0 4px 0;
  color: var(--brand);
}
.cta-text p { margin: 0; color: var(--muted); }
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.cta-button:hover { background: var(--brand); }

/* Warning variant for urgent action (e.g. POP3 retirement) */
.cta.cta-warning {
  background: linear-gradient(135deg, var(--warning-bg), #fff);
  border-color: var(--warning-border);
}
.cta.cta-warning .cta-text h3 { color: var(--warning-border); }
.cta.cta-warning .cta-button  { background: var(--warning-border); }
.cta.cta-warning .cta-button:hover { background: #b46500; }

/* Notice / warning / danger callouts ---------------------------------- */

.notice, .warning, .danger {
  padding: 14px 16px;
  margin: 22px 0;
  border-left: 5px solid;
}
.notice  { background: var(--notice-bg);  border-color: var(--notice-border); }
.warning { background: var(--warning-bg); border-color: var(--warning-border); }
.danger  { background: var(--danger-bg);  border-color: var(--danger-border); }
.notice :first-child, .warning :first-child, .danger :first-child { margin-top: 0; }
.notice :last-child,  .warning :last-child,  .danger :last-child  { margin-bottom: 0; }

/* Card grid (table-of-contents, webmail options, etc.) ---------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-card);
}
.card h2, .card h3 {
  border: 0;
  margin-top: 0;
  padding-bottom: 0;
  font-size: 1.15rem;
}
.card a { font-weight: 700; }
.card > :last-child { margin-bottom: 0; }
.card-logo {
  margin: -4px 0 12px 0;
  text-align: center;
  line-height: 0;
}
.card-logo img {
  max-height: 70px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: inline-block;
}

/* Example/code block -------------------------------------------------- */

.example {
  background: #f5f5f5;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  margin: 14px 0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.95em;
  white-space: pre-wrap;
  word-break: break-word;
}

/* S.T.O.P. style letter-grid ----------------------------------------- */

.stop-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.stop-item {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
}
.stop-letter {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
}

/* Folder/info table --------------------------------------------------- */

.folder-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}
.folder-table th, .folder-table td {
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  padding: 10px;
}
.folder-table th { background: #f1f5f8; }

/* Settings tables (IMAP / POP3 / SMTP) -------------------------------- */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.settings-table caption {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  text-align: left;
  caption-side: top;
}
.settings-table th, .settings-table td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.settings-table th {
  width: 38%;
  font-weight: 500;
  color: var(--muted);
}
.settings-table tr:first-child th,
.settings-table tr:first-child td { border-top: 0; }

/* Site footer --------------------------------------------------------- */

.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,0.85);
  margin-top: 48px;
}
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 32px;
  font-size: 0.95rem;
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 0.4em 0;
  font-size: 1rem;
}
.site-footer a { color: #cfe6f4; }
.site-footer p { margin: 0 0 0.4em 0; }
.site-footer .copyright {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* Utility ------------------------------------------------------------- */

.center { text-align: center; }
.muted  { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Narrow-screen tweaks ----------------------------------------------- */

@media (max-width: 600px) {
  .page { padding: 24px 18px 36px 18px; }
  .site-header-inner { padding: 14px 18px; }
  .brand-name { font-size: 1.4rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}
