/* FreelancerPackZA — shared print / screen styles
   Brand: J Live Solutions vibes — teal + navy (not Interactive Tech)
*/

:root {
  --navy: #0b1f33;
  --navy-soft: #14324d;
  --teal: #0d7a7a;
  --teal-light: #149494;
  --teal-wash: #e6f4f4;
  --ink: #1a2332;
  --muted: #5a6a7a;
  --line: #c9d4de;
  --paper: #f7fafb;
  --white: #ffffff;
  --warn: #8a5a00;
  --font-display: "Source Serif 4", "Libre Baskerville", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
}

.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.doc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid var(--teal);
  margin-bottom: 1.75rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.brand-mark span {
  color: var(--teal);
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.doc-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  color: var(--navy);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.doc-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-wash);
  padding: 0.35rem 0.65rem;
  border-radius: 2px;
}

.notice {
  background: #fff8e8;
  border-left: 4px solid var(--warn);
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: #4a3a10;
}

.notice strong {
  color: var(--warn);
}

h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  font-size: 1rem;
  color: var(--navy-soft);
  margin: 1.5rem 0 0.5rem;
}

p,
li {
  font-size: 0.95rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  background: var(--white);
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

tr:nth-child(even) td {
  background: #f0f6f7;
}

.placeholder {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card-block {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.card-block h3 {
  margin-top: 0;
}

.email-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.5rem;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
}

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  position: relative;
  padding: 0.4rem 0.4rem 0.4rem 1.85rem;
  border-bottom: 1px dashed var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--teal);
  border-radius: 2px;
  background: var(--white);
}

.totals {
  margin-left: auto;
  width: min(100%, 320px);
}

.totals td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.totals .grand td {
  background: var(--teal-wash);
  font-weight: 700;
  color: var(--navy);
}

.sig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.sig-line {
  border-top: 1px solid var(--ink);
  margin-top: 2.5rem;
  padding-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
}

.toolbar a {
  color: #a8e0e0;
  text-decoration: none;
}

.toolbar a:hover {
  color: var(--white);
}

.toolbar button {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: var(--teal);
  color: var(--white);
  padding: 0.45rem 0.9rem;
  border-radius: 2px;
  cursor: pointer;
}

.toolbar button:hover {
  background: var(--teal-light);
}

.doc-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

@media print {
  body {
    background: white;
  }

  .toolbar {
    display: none !important;
  }

  .doc {
    max-width: none;
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .email-box,
  .card-block,
  table {
    break-inside: avoid;
  }

  h2 {
    break-after: avoid;
  }
}
