/* ==========================================================================
   FamousTec /tools/ — shared stylesheet
   Inherits design tokens from /02-landing-page/landing-page-PREFILLED.html
   Last updated: 2026-04-20
   ========================================================================== */

:root {
  --ink:      #0b1220;
  --ink-2:    #1f2a44;
  --accent:   #0a66c2;
  --accent-2: #0ea5e9;
  --bg:       #ffffff;
  --bg-soft:  #f4f7fb;
  --line:     #e5eaf1;
  --success:  #16a34a;
  --warn:     #dc2626;
  --warn-bg:  #fef2f2;
  --info-bg:  #eff6ff;
  --max:      1280px; /* slightly wider than landing for tool form layouts */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
img.emoji, img.wp-smiley { height: 1em !important; width: 1em !important; max-height: 1em !important; max-width: 1em !important; display: inline-block !important; vertical-align: -.1em !important; margin: 0 .05em !important; padding: 0 !important; box-shadow: none !important; background: none !important; border: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 920px; }

/* ---------- Header / nav (matches landing) ---------- */
.ftec-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 100; }
.ftec-header .nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.ftec-header .brand { font-weight: 800; letter-spacing: -0.3px; font-size: 22px; color: var(--ink); }
.ftec-header .brand span { color: var(--accent); }
.ftec-header nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
.ftec-header nav a { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.ftec-header nav a.is-active { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff !important; padding: 12px 20px; border-radius: 8px; font-weight: 600; border: 1px solid var(--accent); font-size: 15px; cursor: pointer; transition: background .15s; }
.btn:hover { background: #084fa1; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--accent) !important; }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.big { padding: 16px 28px; font-size: 17px; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.tool-hero { padding: 56px 0 36px; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); }
.tool-hero .kicker { display: inline-block; background: #e0ecf9; color: var(--accent); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 999px; letter-spacing: 0.3px; }
.tool-hero h1 { font-size: 42px; line-height: 1.12; margin: 16px 0 14px; letter-spacing: -0.6px; max-width: 880px; }
.tool-hero .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 20px; max-width: 760px; }
.tool-hero .trust { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.tool-hero .trust .dot { width: 4px; height: 4px; background: var(--ink-2); border-radius: 50%; opacity: .4; }
.tool-hero .trust a { color: var(--accent); }

/* ---------- Section rhythm ---------- */
section { padding: 56px 0; }
section.alt { background: var(--bg-soft); }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 1.2px; font-size: 12px; text-transform: uppercase; }
h2 { font-size: 30px; letter-spacing: -0.4px; margin: 8px 0 14px; }
h3 { font-size: 20px; margin: 0 0 10px; }
p { margin: 0 0 14px; }

.section-head { max-width: 780px; margin: 0 0 28px; }
.section-head p { color: var(--ink-2); font-size: 17px; margin: 8px 0 0; }

/* ---------- The Tool: form + output ---------- */
.tool-app { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; margin-top: 8px; }
@media (max-width: 960px) { .tool-app { grid-template-columns: 1fr; } }

.tool-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 4px 18px rgba(8, 21, 49, 0.04); }
.tool-card h3 { margin-top: 0; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; color: var(--ink); background: #fff; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { color: var(--warn); font-size: 13px; margin-top: 4px; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select { border-color: var(--warn); }

.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Output panel ---------- */
.output { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-height: 180px; }
.output[hidden] { display: none; }
.output .out-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.output .out-head h4 { margin: 0; font-size: 15px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; }
.output .out-actions { display: flex; gap: 6px; }
.output pre, .output code.block { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: #0b1220; color: #e5eaf1; padding: 14px 16px; border-radius: 8px; overflow-x: auto; white-space: pre; line-height: 1.5; }
.output .recommendation { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 10px 0; }
.output .recommendation .label { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px; }
.output .recommendation .why { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.output .verify { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); margin-top: 8px; padding: 4px 10px; background: var(--info-bg); border-radius: 999px; border: 1px solid var(--line); }
.output .verify::before { content: "✓"; font-weight: 700; }
.output .stale { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

.copied-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .2s; z-index: 200; pointer-events: none; }
.copied-toast.show { opacity: 1; }

/* ---------- Email modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(11, 18, 32, 0.55); display: none; align-items: center; justify-content: center; z-index: 300; }
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 28px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(11, 18, 32, .25); }
.modal h3 { margin: 0 0 8px; font-size: 22px; }
.modal p { color: var(--ink-2); margin-bottom: 18px; }
.modal .field { margin-bottom: 16px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal .privacy { font-size: 12px; color: var(--ink-2); margin-top: 12px; }

/* ---------- Interpretation list ---------- */
.interpret { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.interpret .item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.interpret .item .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.interpret .item h4 { margin: 0 0 6px; font-size: 16px; }
.interpret .item p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* ---------- Deep-dive ---------- */
.deepdive { max-width: 820px; }
.deepdive h3 { font-size: 22px; margin: 26px 0 10px; }
.deepdive table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.deepdive th, .deepdive td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.deepdive th { background: var(--bg-soft); font-weight: 700; }
.deepdive blockquote { border-left: 3px solid var(--accent); padding: 6px 16px; color: var(--ink-2); margin: 18px 0; background: var(--bg-soft); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 16px; list-style: none; outline: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { margin-bottom: 10px; }
.faq p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* ---------- Worked examples ---------- */
.examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.example { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.example h4 { margin: 0 0 8px; font-size: 17px; }
.example .scen { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.example .io { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; background: var(--bg-soft); padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.example .commentary { font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

/* ---------- Citations ---------- */
.citations ul { list-style: none; padding: 0; margin: 0; }
.citations li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.citations li:last-child { border-bottom: none; }
.citations .src { font-weight: 600; }
.citations .meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* ---------- Ad slot ---------- */
.ftec-ad { max-width: 820px; margin: 24px auto; padding: 20px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.ftec-ad__label { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; opacity: .8; }
.ftec-ad__slot { min-height: 90px; display: flex; align-items: center; justify-content: center; }
/* House ad style */
.ftec-houseAd { background: #fff; border: 1px solid var(--accent); border-radius: 10px; padding: 20px 24px; max-width: 600px; text-align: left; display: flex; gap: 18px; align-items: center; }
.ftec-houseAd .ha-mark { font-size: 28px; color: var(--accent); font-weight: 800; line-height: 1; min-width: 48px; height: 48px; border-radius: 8px; background: #e0ecf9; display: flex; align-items: center; justify-content: center; }
.ftec-houseAd .ha-body { flex: 1; }
.ftec-houseAd .ha-body h5 { margin: 0 0 4px; font-size: 16px; color: var(--ink); }
.ftec-houseAd .ha-body p { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.ftec-houseAd .ha-cta { font-size: 13px; font-weight: 700; color: var(--accent); }
/* Affiliate card */
.ftec-affAd { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; max-width: 540px; text-align: left; display: flex; gap: 14px; align-items: center; }
.ftec-affAd img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }
.ftec-affAd .aff-body h5 { margin: 0 0 4px; font-size: 15px; }
.ftec-affAd .aff-body p { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.ftec-affAd .aff-link { font-size: 13px; font-weight: 700; color: var(--accent); }
.ftec-affAd .aff-tag { font-size: 11px; color: var(--ink-2); }

/* ---------- Related tools ---------- */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.related .card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; transition: all .15s; }
.related .card:hover { border-color: var(--accent); box-shadow: 0 8px 28px rgba(10, 102, 194, 0.12); }
.related .card .cat { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.related .card h4 { margin: 6px 0 6px; font-size: 16px; }
.related .card p { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; }
.related .card .open { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ---------- Tool-specific CTA card ---------- */
.cta-card { background: linear-gradient(135deg, #0b1220 0%, #1f2a44 100%); color: #fff; border-radius: 14px; padding: 36px 40px; max-width: 880px; margin: 0 auto; }
.cta-card h3 { color: #fff; font-size: 24px; margin: 0 0 10px; }
.cta-card p { color: #cbd5e1; margin: 0 0 18px; font-size: 16px; }
.cta-card .price { font-size: 32px; font-weight: 800; color: var(--accent-2); margin: 6px 0 4px; }
.cta-card .price small { font-size: 14px; font-weight: 500; color: #94a3b8; display: block; margin-top: 2px; }
.cta-card .btn { background: var(--accent-2); border-color: var(--accent-2); }
.cta-card .btn:hover { background: #0284c7; }
.cta-card .or { color: #94a3b8; font-size: 13px; margin-top: 10px; display: block; }
.cta-card .or a { color: var(--accent-2); }

/* ---------- Footer (matches landing) ---------- */
.ftec-footer { background: #0b1220; color: #cbd5e1; padding: 48px 0 32px; margin-top: 48px; }
.ftec-footer .foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ftec-footer h5 { color: #fff; margin: 0 0 14px; font-size: 15px; letter-spacing: 0.5px; }
.ftec-footer a { color: #cbd5e1; display: block; margin: 6px 0; }
.ftec-footer a:hover { color: #fff; }
.ftec-footer .foot-bot { margin-top: 36px; padding-top: 20px; border-top: 1px solid #1f2a44; font-size: 13px; color: #94a3b8; }
.ftec-footer .foot-disclosure { font-size: 11px; color: #64748b; margin-top: 8px; }

/* ---------- Author block (E-E-A-T) ---------- */
.author { display: flex; gap: 16px; align-items: center; padding: 18px; background: var(--bg-soft); border-radius: 10px; max-width: 540px; margin: 32px 0; }
.author .avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #dbe7f4, #b5cbe4); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--accent); font-size: 22px; flex-shrink: 0; }
.author .by { font-size: 13px; color: var(--ink-2); }
.author .by strong { color: var(--ink); display: block; font-size: 15px; }
.author .by a { color: var(--accent); }

/* ---------- Last-updated badge ---------- */
.last-updated { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); padding: 4px 10px; background: var(--bg-soft); border-radius: 999px; border: 1px solid var(--line); }
.last-updated::before { content: "🔄"; font-size: 11px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ftec-header nav ul { display: none; }
  .tool-hero h1 { font-size: 32px; }
  section { padding: 40px 0; }
  h2 { font-size: 26px; }
  .ftec-footer .foot { grid-template-columns: 1fr 1fr; gap: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .cta-card { padding: 26px 22px; }
}
@media (max-width: 480px) {
  .tool-hero h1 { font-size: 28px; }
  .ftec-footer .foot { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}

/* ---------- Print / PDF ---------- */
@media print {
  .ftec-header, .ftec-footer, .ftec-ad, .tool-actions, .related, .cta-card { display: none !important; }
  body { font-size: 11pt; }
  .output { background: #fff; border: 1px solid #ccc; }
}
