/* ================================================================
   Institutional Design System — IndieOwner Hub
   Officina Systems Micro-Tool Family
   Target: Trusted financial publisher / curated directory aesthetic
   ================================================================ */

/* ─── PALETTE ──────────────────────────────────────────────────── */
:root {
  --bg:          #f7f9fa;
  --white:       #ffffff;
  --navy:        #1a4480;
  --navy-dark:   #162e51;
  --navy-light:  #2563a8;
  --green:       #2e7d32;
  --amber:       #b45309;
  --red:         #c0392b;
  --border:      #d1d5db;
  --border-dark: #9ca3af;
  --text:        #1a1a1a;
  --text2:       #374151;
  --text3:       #6b7280;
  --table-head:  #f1f5f9;
  --focus:       #1a4480;
}

/* ─── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
}

a { color: var(--navy); }
a:hover { text-decoration: underline; color: var(--navy-dark); }

/* ─── SITE HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-header-title {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header-title:hover { color: rgba(255,255,255,0.9); text-decoration: none; }

.site-header-nav { display: flex; gap: 20px; font-size: 13px; }
.site-header-nav a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-header-nav a:hover { color: var(--white); text-decoration: underline; }

/* ─── TRUST BANNER ───────────────────────────────────────────── */
.trust-banner {
  background: #eef2f7;
  border-bottom: 2px solid var(--navy);
  padding: 10px 24px;
  font-size: 13px;
}
.trust-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trust-disclaimer { font-weight: 600; color: var(--text); }
.trust-citation   { color: var(--text3); font-size: 12px; }

/* ─── PAGE MAIN ──────────────────────────────────────────────── */
.page-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 20px 72px;
  width: 100%;
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--navy);
  margin-bottom: 10px;
}
.hero-headline {
  font-family: Georgia, "Merriweather", serif;
  font-size: 2rem;
  font-weight: bold;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 12px;
  max-width: 640px;
}
.hero-subtext {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 640px;
}

/* ─── SEARCH + FILTER BAR ────────────────────────────────────── */
.search-filter-bar { margin-bottom: 24px; }

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.search-input:focus  { border-color: var(--navy); }
.search-input::placeholder { color: var(--text3); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

/* ─── FILTER TABS ────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text2);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  border-radius: 0;
}
.filter-tab:hover  { border-color: var(--navy); color: var(--navy); background: #f0f4fb; }
.filter-tab.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.filter-tab:focus-visible { outline: 2px solid var(--navy-light); outline-offset: 2px; }

/* ─── TOOL GRID ──────────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

@media (min-width: 560px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 840px) {
  .tool-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ─── TOOL CARD ──────────────────────────────────────────────── */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 18px 18px 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
/* Only live (anchor) cards get hover effect */
a.tool-card:hover {
  border-color: var(--navy);
  box-shadow: 0 2px 10px rgba(26,68,128,0.10);
  text-decoration: none;
  color: var(--text);
}

.tool-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tool-icon {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}
.tool-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border: 1px solid transparent;
  line-height: 1.5;
}
.badge-live {
  background: #e8f5e9;
  border-color: #81c784;
  color: var(--green);
}
.badge-soon {
  background: #fffbeb;
  border-color: #fcd34d;
  color: var(--amber);
}
.badge-cat {
  background: var(--table-head);
  border-color: var(--border);
  color: var(--text3);
}

/* ─── TOOL CARD BODY ─────────────────────────────────────────── */
.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.tool-name {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1rem;
  font-weight: bold;
  color: var(--navy-dark);
  line-height: 1.3;
}
.tool-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
}
.tool-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 6px;
}
a.tool-card:hover .tool-cta { color: var(--navy-dark); }

/* ─── COMING SOON VARIANT ────────────────────────────────────── */
.tool-card--soon {
  opacity: 0.72;
  cursor: default;
}
.tool-cta--soon {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  margin-top: 6px;
  font-style: italic;
}

/* ─── NO RESULTS ─────────────────────────────────────────────── */
.no-results {
  text-align: center;
  color: var(--text3);
  font-size: 14px;
  padding: 28px 0;
  font-style: italic;
}

/* ─── CONTENT SECTIONS ───────────────────────────────────────── */
.content-section { margin-top: 44px; margin-bottom: 0; }

.section-title {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--navy-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 14px;
}
.section-intro {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 18px;
  max-width: 700px;
  line-height: 1.65;
}

/* ─── RECOMMENDED SECTION ────────────────────────────────────── */
.rec-link-card {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  background: var(--white);
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
  max-width: 520px;
}
.rec-link-card:hover { background: #f4f7fb; text-decoration: none; color: var(--text); }

.rec-link-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--navy);
  margin-bottom: 2px;
}
.rec-link-name {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--navy-dark);
}
.rec-link-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  margin-top: 4px;
}
.rec-link-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 8px;
}
.rec-link-card:hover .rec-link-cta { color: var(--navy-dark); }

/* ─── FAQ SECTION ────────────────────────────────────────────── */
.faq-list {
  border: 1px solid var(--border);
  background: var(--white);
}
.faq-item {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-dark);
  margin-bottom: 7px;
}
.faq-a {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
}
.faq-a a { color: var(--navy); }
.faq-a a:hover { color: var(--navy-dark); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 56px;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--white); }

/* ─── COOKIE BANNER ──────────────────────────────────────────── */
.cookie-dialog {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy-dark);
  color: rgba(255,255,255,0.9);
  z-index: 999;
  padding: 12px 24px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.cookie-dialog p { margin: 0; }
.cookie-dialog a { color: rgba(255,255,255,0.85); }
.cookie-btn {
  background: var(--white);
  color: var(--navy-dark);
  border: none;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.cookie-btn:hover { background: #e2e8f0; }

/* ─── ABOUT / CONTACT / PRIVACY pages ───────────────────────── */
.page-prose h1 {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1.7rem;
  font-weight: bold;
  color: var(--navy-dark);
  margin-bottom: 18px;
}
.page-prose h2 {
  font-family: Georgia, "Merriweather", serif;
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--navy-dark);
  margin-top: 28px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.page-prose p { margin-bottom: 14px; font-size: 15px; line-height: 1.7; color: var(--text2); }
.page-prose ul { margin: 10px 0 14px 22px; }
.page-prose li { margin-bottom: 6px; font-size: 15px; color: var(--text2); line-height: 1.65; }

/* ─── RESPONSIVE — MOBILE ────────────────────────────────────── */
@media (max-width: 479px) {
  .page-main { padding: 24px 14px 56px; }
  .hero-headline { font-size: 1.6rem; }
  .trust-banner  { padding: 8px 14px; font-size: 12px; }
  .site-header   { padding: 10px 14px; }
  .filter-tabs   { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-tab    { padding: 5px 11px; font-size: 12px; }
  .tool-grid     { grid-template-columns: 1fr; }
}

/* ─── PRINT ──────────────────────────────────────────────────── */
@media print {
  .site-header, .trust-banner, .cookie-dialog, .search-filter-bar, .site-footer { display: none !important; }
  body { background: white; }
}
