html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* ===== Brand / navbar ===== */
:root {
  --brand-gradient: linear-gradient(135deg, #0d6efd, #0aa2c0);
}

.site-navbar {
  box-shadow: 0 0.125rem 0.5rem rgba(13, 110, 253, 0.06);
}

.navbar-brand.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0b2540;
}

.navbar-brand.brand:hover,
.navbar-brand.brand:focus {
  color: #0d6efd;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 0.25rem 0.5rem rgba(10, 162, 192, 0.35);
}

.brand-mark svg {
  width: 1.15rem;
  height: 1.15rem;
}

.brand-name {
  line-height: 1;
}

.brand-name .brand-grant {
  color: inherit;
}

.brand-name .brand-beacons {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav links: subtle active/hover accent */
.site-navbar .navbar-nav .nav-link {
  position: relative;
  font-weight: 500;
  color: #44505f;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.site-navbar .navbar-nav .nav-link:hover,
.site-navbar .navbar-nav .nav-link:focus {
  color: #0d6efd;
}

.site-navbar .navbar-nav .nav-link.active {
  color: #0d6efd;
  font-weight: 600;
}

.site-navbar .navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
}

/* Auth actions grouped on the right */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-auth .btn {
  border-radius: 999px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.navbar-auth .user-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: #44505f;
  text-decoration: none;
}

.navbar-auth .user-greeting:hover {
  color: #0d6efd;
}

.navbar-auth .logout-btn {
  border: 0;
  background: transparent;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
}

.navbar-auth .logout-btn:hover {
  color: #dc3545;
}

@media (max-width: 575.98px) {
  .navbar-auth {
    flex-wrap: wrap;
    padding-top: 0.5rem;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Identity / account pages ===== */
.auth-wrapper {
  display: flex;
  justify-content: center;
  padding: 2.5rem 0 3.5rem;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.auth-card-header {
  padding: 2rem 2rem 0.5rem;
}

.auth-card-body {
  padding: 1.5rem 2rem 2rem;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0d6efd, #0aa2c0);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ===== Manage / account settings ===== */
.manage-nav .list-group-item.active {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* ===== About page ===== */
.about-hero {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
}

.about-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.about-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-lead {
  font-size: 1.15rem;
  color: #5a6675;
  margin-top: 1rem;
}

.about-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.about-features {
  margin: 2.5rem 0 1rem;
}

.about-card {
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
  box-shadow: 0 0.5rem 1.5rem -1rem rgba(13, 110, 253, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.about-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem -1rem rgba(13, 110, 253, 0.35);
}

.about-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background: var(--brand-gradient);
  color: #fff;
}

.about-card-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.about-section {
  max-width: 48rem;
  margin: 2.5rem auto 0;
}

.about-source {
  max-width: 48rem;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #0aa2c0;
  border-radius: 0.5rem;
  background: rgba(10, 162, 192, 0.06);
}

.about-cta {
  max-width: 48rem;
  margin: 2.5rem auto 1rem;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06), rgba(10, 162, 192, 0.06));
}

/* ===== Proposal template builder ===== */
.proposal-hero {
  margin-bottom: 1.25rem;
}

.proposal-eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.proposal-intro {
  max-width: 52rem;
  color: #5a6675;
}

.proposal-toolbar {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.08);
}

.proposal-toolbar-status {
  font-size: 0.85rem;
  color: #6c757d;
}

.proposal-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.proposal-upsell {
  border-radius: 1rem;
}

.proposal-doc {
  max-width: 52rem;
  padding: 2rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.75rem 2rem -1rem rgba(0, 0, 0, 0.2);
}

.proposal-doc-head {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #0d6efd;
}

.proposal-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.proposal-section:last-of-type {
  border-bottom: 0;
}

.proposal-section h3 {
  color: #0b2540;
}

.proposal-prompt {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.65rem;
}

.proposal-eligibility {
  margin-bottom: 0.65rem;
}

.proposal-input {
  border-radius: 0.5rem;
  color: #212529;
}

/* When the document is editable (Pro), make inputs feel like fields. */
.proposal-doc.is-pro .proposal-input,
.proposal-doc.is-pro [data-proposal-field] {
  padding: 0.6rem 0.75rem;
  background: #f8fbff;
  border: 1px dashed #b6d4fe;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 2.5rem;
}

.proposal-doc.is-pro [contenteditable="true"]:hover {
  border-color: #0d6efd;
}

.proposal-doc.is-pro [contenteditable="true"]:focus {
  outline: none;
  border-color: #0d6efd;
  border-style: solid;
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.proposal-doc-foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}

/* Clean print / PDF output: show only the document. */
@media print {
  header, footer, .breadcrumb, .proposal-hero .alert,
  .proposal-toolbar, .proposal-upsell, .proposal-eyebrow,
  .proposal-intro, .btn {
    display: none !important;
  }

  .proposal-doc {
    max-width: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .proposal-doc.is-pro .proposal-input,
  .proposal-doc.is-pro [data-proposal-field] {
    border: 0;
    background: transparent;
    padding: 0;
  }

  .proposal-prompt {
    color: #555;
  }
}