/*
Theme Name: ToolReview FedContract Dossier
Theme URI: https://fedcontracttoolreview.com
Author: ToolReview Ops
Description: Editorial dossier visual language for Fed Contract Tool Review.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: toolreview-fedcontract-dossier
*/

:root {
  --fd-bg: #f8f3e9;
  --fd-paper: #fffdf8;
  --fd-paper-2: #f4ecdd;
  --fd-ink: #2e1f16;
  --fd-muted: #6f5947;
  --fd-border: rgba(69, 45, 30, 0.22);
  --fd-accent: #9c3f1a;
  --fd-accent-2: #2c6d5a;
  --fd-head: #1f140e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.fd-theme {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--fd-ink);
  line-height: 1.7;
  background:
    linear-gradient(180deg, #efe2cc 0, transparent 180px),
    linear-gradient(90deg, transparent 0 70px, rgba(0,0,0,0.03) 70px 71px, transparent 71px),
    var(--fd-bg);
}

a { color: var(--fd-accent); text-underline-offset: 2px; }
a:hover { color: var(--fd-accent-2); }

.fd-wrap { width: min(1120px, calc(100% - 2.4rem)); margin: 0 auto; }
.fd-site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.fd-main { flex: 1; padding: 1.4rem 0 3rem; }

.fd-header {
  border-bottom: 2px solid var(--fd-border);
  background: rgba(255, 251, 242, 0.95);
}
.fd-header-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem 0 0.8rem;
}
.fd-brand {
  text-decoration: none;
  color: var(--fd-head);
  display: inline-flex;
  flex-direction: column;
}
.fd-brand-name {
  font-family: "Merriweather", "Georgia", serif;
  font-weight: 900;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  letter-spacing: 0.01em;
}
.fd-brand-tag {
  color: var(--fd-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.fd-menu,
.fd-menu-fallback {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.fd-menu a,
.fd-menu-fallback a {
  text-decoration: none;
  color: var(--fd-head);
  font-weight: 700;
  padding: 0.28rem 0;
  border-bottom: 2px solid transparent;
}
.fd-menu a:hover,
.fd-menu-fallback a:hover,
.fd-menu .current-menu-item > a,
.fd-menu .current_page_item > a {
  border-bottom-color: var(--fd-accent);
}

.fd-hero {
  background: linear-gradient(160deg, #fff8ed 0%, #f8ebd5 100%);
  border: 1px solid var(--fd-border);
  border-left: 5px solid var(--fd-accent);
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 2.3rem);
  box-shadow: 0 14px 30px rgba(69, 45, 30, 0.12);
}
.fd-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fd-muted);
}
.fd-hero h1 {
  margin: 0;
  font-family: "Merriweather", serif;
  color: var(--fd-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
}
.fd-hero > p { margin: 0.8rem 0 0; max-width: 67ch; }
.fd-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.fd-button {
  text-decoration: none;
  border-radius: 6px;
  padding: 0.52rem 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
}
.fd-button-primary {
  background: var(--fd-accent);
  color: #fff;
}
.fd-button-secondary {
  background: transparent;
  color: var(--fd-head);
  border-color: var(--fd-border);
}

.fd-dossier-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.fd-dossier-strip article {
  border: 1px solid var(--fd-border);
  border-radius: 8px;
  background: var(--fd-paper);
  padding: 0.65rem 0.8rem;
}
.fd-strip-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  color: var(--fd-muted);
}
.fd-strip-value {
  margin: 0.2rem 0 0;
  font-family: "Merriweather", serif;
  font-size: 1.02rem;
  color: var(--fd-head);
}

.fd-section { margin-top: 2rem; }
.fd-section-head h1,
.fd-section-head h2,
.fd-article h1 {
  margin: 0;
  font-family: "Merriweather", serif;
  color: var(--fd-head);
}
.fd-section-head p { margin: 0.45rem 0 0; color: var(--fd-muted); }
.fd-eyebrow {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fd-muted);
  font-size: 0.74rem;
}

.fd-column-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.fd-column-grid-tight {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fd-card {
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
  border-radius: 8px;
  padding: 0.9rem;
}
.fd-card-note { background: var(--fd-paper-2); }
.fd-card h2,
.fd-card h3 {
  margin: 0.4rem 0 0.5rem;
  font-family: "Merriweather", serif;
  font-size: 1.06rem;
  line-height: 1.35;
}
.fd-meta {
  margin: 0;
  color: var(--fd-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fd-card p { margin: 0; }

.fd-article,
.fd-not-found,
.fd-archive-desc {
  border: 1px solid var(--fd-border);
  background: var(--fd-paper);
  border-radius: 8px;
  padding: 1rem;
}
.fd-content > *:first-child { margin-top: 0; }
.fd-content > *:last-child { margin-bottom: 0; }
.fd-content h2,
.fd-content h3,
.fd-content h4 {
  font-family: "Merriweather", serif;
  color: var(--fd-head);
}
.fd-content ul,
.fd-content ol { padding-left: 1.25rem; }
.fd-content li + li { margin-top: 0.3rem; }
.fd-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid var(--fd-accent);
  background: #f7efe1;
}

.fd-search-form {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.fd-search-input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.52rem 0.68rem;
  background: #fff;
  color: var(--fd-head);
}
.fd-search-button,
.fd-button {
  cursor: pointer;
}
.fd-search-button {
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.52rem 0.84rem;
  background: var(--fd-accent);
  color: #fff;
  font-weight: 700;
}
.fd-button {
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.52rem 0.84rem;
  text-decoration: none;
}

.fd-pagination { margin-top: 1rem; }
.fd-pagination .page-numbers {
  display: inline-block;
  margin-right: 0.4rem;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.33rem 0.58rem;
  text-decoration: none;
  background: #fff;
}

.fd-footer {
  border-top: 1px solid var(--fd-border);
  background: rgba(250, 242, 226, 0.9);
}
.fd-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 0;
  color: var(--fd-muted);
  font-size: 0.86rem;
}
.fd-footer-inner p { margin: 0; }

@media (max-width: 980px) {
  .fd-column-grid,
  .fd-column-grid-tight,
  .fd-dossier-strip {
    grid-template-columns: 1fr;
  }
  .fd-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mailgun Newsletter Styles */
.fd-newsletter {
  border: 1px solid var(--fd-border);
  border-radius: 10px;
  background: #fcf6ea;
}
.fd-newsletter .mailgun-list-widget-front {
  margin-top: 0.7rem;
}
.fd-newsletter .mailgun-list-widget-inputs {
  display: grid;
  gap: 0.7rem;
}
.fd-newsletter .mailgun-list-widget-name,
.fd-newsletter .mailgun-list-widget-email {
  margin: 0;
  display: grid;
  gap: 0.3rem;
}
.fd-newsletter input[type="text"] {
  width: 100%;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.56rem 0.66rem;
  background: #fff;
  color: var(--fd-head);
}
.fd-newsletter .mailgun-list-submit-button {
  margin-top: 0.65rem;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  padding: 0.58rem 0.9rem;
  background: var(--fd-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.fd-newsletter .result-panel {
  margin-top: 0.75rem;
  padding: 0.68rem 0.86rem;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  font-weight: 600;
  background: #fff;
}

/* Newsletter UX Refresh */
.fd-newsletter,
.fd-popup-signup {
  border: 1px solid color-mix(in srgb, var(--fd-border) 70%, #ffffff 30%);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8ec, #f7ead4);
  box-shadow: 0 16px 34px rgba(88, 60, 24, 0.14);
}
.fd-popup-signup { padding: 0.35rem 0.2rem 0.1rem; }
.fd-popup-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8f5b21;
}
.fd-popup-signup h3,
.fd-newsletter .mailgun-list-title .widget-title {
  margin: 0 0 0.4rem;
  color: var(--fd-head);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
}
.fd-popup-signup > p {
  margin: 0 0 0.82rem;
  color: #6a4a2a;
}
.fd-newsletter .mailgun-list-widget-inputs,
.fd-popup-signup .mailgun-list-widget-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
}
.fd-newsletter .mailgun-list-widget-name,
.fd-popup-signup .mailgun-list-widget-name,
.fd-newsletter .mailgun-list-widget-email,
.fd-popup-signup .mailgun-list-widget-email {
  margin: 0;
  display: grid;
  gap: 0.26rem;
}
.fd-newsletter label,
.fd-popup-signup label {
  color: #7d5b38;
  font-size: 0.78rem;
  font-weight: 600;
}
.fd-newsletter input[type="text"],
.fd-popup-signup input[type="text"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8b18e;
  border-radius: 8px;
  padding: 0.62rem 0.7rem;
  background: #fffefb;
  color: var(--fd-head);
}
.fd-newsletter .mailgun-list-submit-button,
.fd-popup-signup .mailgun-list-submit-button {
  margin-top: 0.8rem;
  width: 100%;
  min-height: 45px;
  border: 1px solid #9b6c35;
  border-radius: 8px;
  padding: 0.62rem 0.9rem;
  background: linear-gradient(135deg, #b37430, #8e5a25);
  color: #fff;
  font-weight: 700;
}
.fd-newsletter .result-panel,
.fd-popup-signup .result-panel {
  margin-top: 0.74rem;
  border-radius: 8px;
  border: 1px solid #c8b18e;
  background: #fff7ea;
  color: #5e4125;
}
@media (max-width: 760px) {
  .fd-newsletter .mailgun-list-widget-inputs,
  .fd-popup-signup .mailgun-list-widget-inputs { grid-template-columns: 1fr; }
}

.fd-article-newsletter {
  margin-top: 1.2rem;
  padding: 0.95rem;
}
.fd-article-newsletter > h3 {
  margin-top: 0;
}
.fd-article-newsletter > p {
  margin-bottom: 0.75rem;
}

/* Theme-native newsletter form */
.fd-news-form {
  margin-top: 0.7rem;
}
.fd-news-form-inner {
  display: block;
}
.fd-news-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}
.fd-news-field {
  margin: 0;
  display: grid;
  gap: 0.28rem;
}
.fd-news-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fd-head);
  opacity: 0.85;
}
.fd-news-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--fd-border);
  border-radius: 10px;
  padding: 0.62rem 0.74rem;
  background: rgba(255,255,255,0.97);
  color: var(--fd-head);
}
.fd-news-field input:focus {
  outline: 2px solid color-mix(in srgb, linear-gradient(135deg, #b37430, #8e5a25) 40%, #ffffff 60%);
  outline-offset: 1px;
}
.fd-news-submit {
  margin-top: 0.8rem;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--fd-border);
  border-radius: 999px;
  padding: 0.62rem 0.92rem;
  background: linear-gradient(135deg, #b37430, #8e5a25);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.fd-news-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}
.fd-news-feedback {
  min-height: 1.2em;
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
}
.fd-news-form-inner.is-success .fd-news-feedback {
  color: #2f6b3f;
}
.fd-news-form-inner.is-error .fd-news-feedback {
  color: #9a2a2a;
}
.fd-popup-signup .fd-news-form {
  margin-top: 0.85rem;
}
@media (max-width: 760px) {
  .fd-news-fields {
    grid-template-columns: 1fr;
  }
}

/* Newsletter readability fix */
.fd-news-field input::placeholder {
  color: #7a6a58;
  opacity: 1;
}
.fd-news-field input:focus {
  border-color: #b37430 !important;
  box-shadow: 0 0 0 3px rgba(179, 116, 48, 0.2);
  outline: none;
}
