/* Zero to Freelance site styles. Change the colors in :root to rebrand. */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f7f6;
  --text: #16201d;
  --muted: #55625d;
  --line: #e1e8e5;
  --brand: #0d7a6f;
  --brand-dark: #08594f;
  --brand-soft: #e3f3f0;
  --accent: #f59e0b;
  --accent-soft: #fff6e6;
  --danger: #b42318;
  --dark: #0f1a17;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 7%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1140px;
  --read: 740px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; margin: 1.7em 0 0.55em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 2.8rem); margin-top: 0; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-read { width: min(100% - 2.5rem, var(--read)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--text); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; }
.skip:focus { left: 1rem; top: 1rem; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header ---------- */

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; padding: 0.85rem 0; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; text-decoration: none; }
.logo:hover { color: var(--text); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--text); font-weight: 600; font-size: 0.97rem; text-decoration: none; padding: 0.45rem 0.8rem; border-radius: 999px; }
.site-nav a:hover { background: var(--bg-soft); color: var(--text); }
.site-nav a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); }

@media (max-width: 640px) {
  .header-inner { padding: 0.75rem 0 0.6rem; }
  .site-nav { width: calc(100% + 1rem); margin-inline: -0.5rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; padding: 0.4rem 0.65rem; font-size: 0.94rem; }
}

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; padding: 0.8rem 1.25rem; border: 1px solid transparent; border-radius: 10px; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: #cfd9d5; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-small { padding: 0.5rem 0.85rem; font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

/* ---------- Home ---------- */

.hero { background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero-inner { padding: clamp(2.75rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4.25rem); }
.hero h1 { max-width: 15ch; font-size: clamp(2.3rem, 1.4rem + 3.6vw, 3.6rem); }
.hero .lead { max-width: 40rem; }
.eyebrow { margin: 0 0 0.6rem; color: var(--brand-dark); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 1.17rem; }

.section { padding: clamp(2.25rem, 5vw, 3.5rem) 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; text-decoration: none; }

.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; counter-increment: step; background: var(--bg-soft); border-radius: var(--radius); padding: 1.3rem; transition: background 0.15s; }
.steps li:hover { background: var(--brand-soft); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-bottom: 0.8rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.steps h3 { margin: 0 0 0.35rem; font-size: 1.08rem; }
.steps a { color: var(--text); text-decoration: none; }
.steps a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.steps p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.callout-band { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; flex-wrap: wrap; background: var(--dark); color: #fff; border-radius: 18px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.callout-band h2 { margin: 0 0 0.35rem; color: #fff; }
.callout-band p { margin: 0; color: #c3d2cc; }
.callout-band .btn-primary { background: #fbbf24; color: var(--text); }
.callout-band .btn-primary:hover { background: var(--accent); color: var(--text); }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.3rem 1.1rem; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.card:hover { border-color: #b5d8d1; box-shadow: var(--shadow); transform: translateY(-2px); }
.card-kicker { margin: 0 0 0.4rem; color: var(--brand-dark); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.card-tool .card-kicker { color: #9a5b00; }
.card-title { margin: 0 0 0.5rem; font-size: 1.1rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-text { flex: 1; margin: 0 0 0.8rem; color: var(--muted); font-size: 0.96rem; }
.card-meta { margin: 0; color: var(--muted); font-size: 0.86rem; font-weight: 600; }

/* ---------- Page headers & breadcrumbs ---------- */

.crumbs { padding-top: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.crumbs li { max-width: 100%; }
.crumbs li + li::before { content: "›"; margin-right: 0.35rem; color: #9aa6a1; }
.crumbs a { color: var(--muted); }
.page-head { padding: 1.25rem 0 0.75rem; }
.page-head h1 { margin-bottom: 0.45rem; }
.page-head .lead { max-width: 46rem; margin-bottom: 0.6rem; }
.meta { color: var(--muted); font-size: 0.93rem; }
.group { margin-top: 2.25rem; }
.group h2 { margin: 0 0 1rem; font-size: 1.35rem; }

/* ---------- Articles ---------- */

.article-head { padding: 1.25rem 0 0.25rem; }
.article-head h1 { margin-bottom: 0.6rem; }
.prose { font-size: 1.06rem; overflow-wrap: break-word; }
.prose code, .prose a { overflow-wrap: anywhere; }
.prose h2 { margin-top: 2.2em; }
.prose :is(h2, h3) { scroll-margin-top: 1rem; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.4rem; }
.prose li { margin: 0.35em 0; }
.prose li > ul, .prose li > ol { margin: 0.35em 0; }
.prose blockquote { margin: 1.6em 0; padding: 1rem 1.2rem; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { padding: 0.12em 0.35em; background: var(--bg-soft); border-radius: 5px; font-family: var(--mono); font-size: 0.9em; }
.prose pre { margin: 1.4em 0; padding: 1rem 1.15rem; overflow-x: auto; white-space: pre-wrap; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; font-size: 0.93rem; line-height: 1.6; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.prose img { border-radius: 10px; }
.table-wrap { margin: 1.5em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }

.example { margin: 1.25em 0; padding: 1rem 1.2rem; border: 1px solid; border-radius: 12px; }
.example p:last-child { margin-bottom: 0; }
.example-bad { background: #fef3f2; border-color: #fecdca; }
.example-good { background: #ecfdf3; border-color: #abefc6; }
.example-label { margin-bottom: 0.35rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.example-bad .example-label { color: var(--danger); }
.example-good .example-label { color: #067647; }

.toc { margin: 1.5rem 0 2rem; padding: 0.9rem 1.2rem; background: var(--bg-soft); border-radius: 12px; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: 0.6rem 0 0.2rem; padding-left: 1.25rem; }
.toc li { margin: 0.25rem 0; font-size: 0.96rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

.author-box { display: flex; align-items: flex-start; gap: 1rem; margin-top: 2.75rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); }
.avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; object-fit: cover; }
.author-box p { margin: 0 0 0.3rem; color: var(--muted); font-size: 0.96rem; }
.author-box .author-name { color: var(--text); font-weight: 800; }
.related h2 { margin-top: 0; }

/* ---------- Ads ---------- */

.ad { margin: 2rem 0; text-align: center; }
.ad::before { content: "Advertisement"; display: block; margin-bottom: 0.35rem; color: #8a958f; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* ---------- Tools ---------- */

.tool-section { margin-top: 0.75rem; }
.tool { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; padding: clamp(1rem, 3vw, 1.75rem); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.field { margin-bottom: 1rem; }
.field > label, .label { display: block; margin-bottom: 0.35rem; font-weight: 700; font-size: 0.95rem; }
.hint { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.optional { color: var(--muted); font-weight: 400; font-size: 0.88em; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 0.85rem; }
input[type="text"], input[type="number"], input[type="email"], input[type="url"], input[type="date"], select, textarea {
  width: 100%; padding: 0.65rem 0.75rem; background: #fff; color: var(--text); border: 1px solid #cdd8d3; border-radius: 10px; font: inherit; font-size: 1rem;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(13 122 111 / 18%); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 12px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: block; padding: 0.45rem 0.85rem; border-radius: 9px; color: var(--muted); font-weight: 700; font-size: 0.93rem; }
.segmented input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); }

details.more { margin: 0.25rem 0 1rem; padding: 0.65rem 0.9rem; border: 1px dashed #c4d1cb; border-radius: 10px; }
details.more summary { font-weight: 700; cursor: pointer; }
details.more[open] summary { margin-bottom: 0.8rem; }

.result { position: sticky; top: 1rem; padding: 1.3rem; background: var(--brand-soft); border-radius: 14px; }
.result-label { margin: 0; color: var(--brand-dark); font-weight: 700; }
.result-big { margin: 0.15rem 0 0.8rem; font-size: clamp(2rem, 1.4rem + 2vw, 2.7rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.breakdown { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.breakdown td { padding: 0.45rem 0; border-top: 1px solid rgb(13 122 111 / 16%); }
.breakdown td:last-child { padding-left: 0.75rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .total td { font-weight: 800; }
.tool-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.87rem; }
.proposal-output { min-height: 440px; font-size: 0.97rem; line-height: 1.6; }

@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
  .result { position: static; }
}

/* Invoice generator */
@media (min-width: 861px) {
  .invoice-tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}
.invoice-tool fieldset { margin-bottom: 0.5rem; }
.items { width: 100%; border-collapse: collapse; margin-bottom: 0.6rem; }
.items th { padding: 0 0.35rem 0.35rem 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.items td { padding: 0 0.35rem 0.5rem 0; vertical-align: top; }
.items input { padding: 0.55rem 0.6rem; }
.items .num { width: 6rem; }
@media (max-width: 520px) { .items .num { width: 4.5rem; } }
.icon-btn { width: 2.3rem; height: 2.55rem; background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-size: 1.15rem; cursor: pointer; }
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }
.invoice-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.invoice-paper { padding: clamp(1.25rem, 3vw, 2.25rem); background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); font-size: 0.92rem; line-height: 1.5; }
.invoice-paper p { margin: 0; }
.inv-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.inv-from { font-size: 1.15rem; font-weight: 800; }
.inv-title { color: var(--brand-dark); font-size: 1.7rem; font-weight: 800; letter-spacing: 0.06em; }
.inv-meta { text-align: right; }
.inv-billto { margin-bottom: 1.5rem; }
.inv-label { margin-bottom: 0.25rem !important; color: #5f6b66; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.inv-table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.inv-table th { padding: 0.45rem 0.3rem; border-bottom: 2px solid #111; color: #5f6b66; font-size: 0.72rem; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.inv-table td { padding: 0.6rem 0.3rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.inv-table .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-totals { width: min(100%, 290px); margin-left: auto; }
.inv-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; font-variant-numeric: tabular-nums; }
.inv-totals .grand { margin-top: 0.3rem; padding-top: 0.55rem; border-top: 2px solid #111; font-size: 1.1rem; font-weight: 800; }
.inv-notes { margin-top: 1.75rem; }
.inv-placeholder { color: #9aa5a0; }
.pre-line { white-space: pre-line; }

/* ---------- Platforms directory ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.chip { padding: 0.45rem 0.95rem; background: #fff; color: var(--text); border: 1px solid #cdd8d3; border-radius: 999px; font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.count { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }
.platforms { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.platform { display: flex; flex-direction: column; padding: 1.25rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.platform[hidden] { display: none; }
.platform-top { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.platform-num { color: #9aa6a1; font-size: 0.85rem; font-weight: 700; }
.tag { display: inline-block; padding: 0.2rem 0.6rem; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
.platform h2 { margin: 0.6rem 0 0.3rem; font-size: 1.25rem; }
.platform-best { margin: 0 0 0.6rem; color: var(--text); font-size: 0.97rem; }
.platform dl { margin: 0 0 0.75rem; font-size: 0.93rem; }
.platform dt { margin-top: 0.55rem; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.03em; }
.platform dd { margin: 0.1rem 0 0; color: var(--muted); }
.platform .visit { margin: auto 0 0; padding-top: 0.5rem; }

/* ---------- Search, sharing and related tools ---------- */

.hero-search, .search-box { display: flex; gap: 0.5rem; max-width: 36rem; margin-top: 1.5rem; }
.hero-search input, .search-box input { flex: 1; min-width: 0; padding: 0.8rem 1rem; background: #fff; color: var(--text); border: 1px solid #c4d1cb; border-radius: 10px; font: inherit; font-size: 1rem; }
.hero-search input:focus, .search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(13 122 111 / 18%); }
.search-box { margin: 1.1rem 0 0.25rem; }
.search-empty { margin-top: 1rem; color: var(--muted); }
.not-found .hero-search { margin-inline: auto; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.share-label { margin-right: 0.25rem; font-weight: 700; font-size: 0.95rem; }
.share-btn { display: inline-flex; align-items: center; padding: 0.4rem 0.85rem; background: #fff; color: var(--text); border: 1px solid #cdd8d3; border-radius: 999px; font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--brand); color: var(--brand-dark); }

.tool-box { margin-top: 2.25rem; padding: 1.2rem 1.3rem; background: var(--brand-soft); border-radius: var(--radius); }
.tool-box-title { margin: 0 0 0.6rem; font-weight: 800; }
.tool-box ul { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.tool-box a { font-weight: 700; }
.tool-box span { display: block; color: var(--muted); font-size: 0.93rem; }

.card-topic .card-title { font-size: 1.05rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.callout-nepal { background: linear-gradient(120deg, #8a1c2b 0%, #1f3a8a 100%); }
.callout-nepal p { color: #e7ecf8; }
.author-box .author-role { color: var(--text); font-weight: 600; }

/* ---------- Extra tool parts ---------- */

.check { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 1rem; font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.tool-wide { grid-column: 1 / -1; }
.output-block + .output-block { margin-top: 1.4rem; }
.output-block textarea { min-height: 150px; font-size: 0.95rem; line-height: 1.55; }
.quote-output { min-height: 280px; font-size: 0.95rem; line-height: 1.55; }
.count-warn { color: var(--danger); font-weight: 700; }

.doc-paper { padding: clamp(1.25rem, 3vw, 2.25rem); background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); font-size: 0.92rem; line-height: 1.6; }
.doc-paper h2 { margin: 0 0 0.2rem; font-size: 1.45rem; letter-spacing: -0.01em; }
.doc-paper h3 { margin: 1.3rem 0 0.35rem; font-size: 1rem; }
.doc-paper p { margin: 0 0 0.6rem; }
.doc-paper ul { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.doc-sub { color: #5f6b66; }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.25rem; }
.doc-sign div { padding-top: 2.5rem; font-size: 0.85rem; }
.doc-sign p { margin: 0; border-top: 1px solid #111; padding-top: 0.35rem; }

.timer-box { margin-bottom: 1rem; padding: 1.25rem; background: var(--bg-soft); border-radius: 14px; }
.timer-display { margin: 0 0 0.9rem; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.is-running .timer-display { color: var(--brand-dark); }
.log-wrap { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.log-table th { padding: 0.5rem; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 0.76rem; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; }
.log-table td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.log-table .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tracker-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 4rem; background: var(--dark); color: #c3d2cc; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2rem; padding: 3rem 0 2rem; }
.footer-author a { color: #fff; }
.site-footer .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-about p { max-width: 24rem; }
.footer-title { margin: 0 0 0.6rem; color: #fff; font-weight: 800; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0.4rem 0; }
.site-footer a { color: #c3d2cc; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding: 1.2rem 0 2rem; border-top: 1px solid #22332e; color: #8fa39b; font-size: 0.86rem; }
.footer-bottom p { margin: 0; }

@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .doc-sign { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */

.not-found { padding: 4.5rem 0 2rem; text-align: center; }
.not-found .actions { justify-content: center; }

/* ---------- Print (used by the invoice generator) ---------- */

@media print {
  .no-print, .site-header, .site-footer, .ad, ins.adsbygoogle, .google-auto-placed { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .wrap, .wrap-read { width: 100%; }
  .tool { display: block; padding: 0; border: 0; box-shadow: none; }
  .invoice-paper, .doc-paper { padding: 0; border: 0; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
