/* BTW Business Visa Problem Solver. Link as /assets/css/problem-solver.css?v=N (cached 1 year: bump N when this file changes). */
.ps-hero { background: linear-gradient(180deg, var(--blue-bg) 0%, var(--white) 100%); padding: 34px 0 40px; border-bottom: 1px solid var(--gray-border); }
.ps-crumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 22px; }
.ps-crumb a { color: var(--text-muted); text-decoration: none; }
.ps-crumb a:hover { color: var(--navy); }
.ps-hero__head { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.ps-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--gray-border); border-radius: 999px; padding: 7px 16px; font-size: 0.78rem; font-weight: 600; color: var(--navy); }
.ps-eyebrow svg { width: 16px; height: 16px; }
.ps-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.14; color: var(--navy); margin: 18px 0 14px; text-wrap: balance; }
.ps-hero__head p { color: var(--text-body); font-size: 1.05rem; line-height: 1.7; margin: 0; }

.ps-tool { max-width: 1020px; margin: 0 auto; background: var(--white); border: 1px solid var(--gray-border); border-radius: 22px; box-shadow: var(--shadow-md); padding: 34px; }
.ps-step { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.ps-step legend, .ps-step > label { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; padding: 0; }
.ps-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 0.82rem; font-weight: 700; flex: none; }
.ps-problems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ps-opt { position: relative; }
.ps-opt input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ps-opt__card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 16px 16px 18px; border: 1.5px solid var(--gray-border); border-radius: 14px; background: var(--white); transition: border-color .2s, box-shadow .2s, background .2s, transform .2s; }
.ps-opt__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--green-glow); display: flex; align-items: center; justify-content: center; color: var(--navy); }
.ps-opt__icon svg { width: 19px; height: 19px; }
.ps-opt__label { font-size: 0.92rem; font-weight: 600; line-height: 1.35; color: var(--navy); }
.ps-opt:hover .ps-opt__card { border-color: rgba(0,0,128,0.35); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ps-opt input:checked + .ps-opt__card { border-color: var(--navy); background: #f7faee; box-shadow: 0 0 0 3px rgba(165,213,73,0.4); }
.ps-opt input:checked + .ps-opt__card .ps-opt__icon { background: var(--green); }
.ps-opt input:focus-visible + .ps-opt__card { outline: 3px solid var(--navy); outline-offset: 2px; }
.ps-pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.ps-pick input[type="search"] { flex: 1 1 320px; min-width: 0; padding: 14px 20px; border: 1.5px solid var(--gray-border); border-radius: 999px; font: inherit; font-size: 1rem; color: var(--navy); background: #fafbf7; }
.ps-pick input[type="search"]:focus { outline: none; border-color: var(--navy); background: var(--white); box-shadow: 0 0 0 4px rgba(165,213,73,0.3); }
.ps-pick .btn { flex: 0 0 auto; border-radius: 999px; padding: 14px 30px; border: 0; cursor: pointer; font-size: 1rem; }
.ps-hint { margin: 10px 4px 0; font-size: 0.82rem; color: var(--text-muted); }
.ps-error { margin: 12px 0 0; padding: 11px 14px; border-radius: 10px; background: #fbe9e7; border: 1px solid #ef9a9a; color: #8e1c1c; font-size: 0.9rem; }
.ps-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--text-body); }
.ps-trust li { display: inline-flex; align-items: center; gap: 7px; }
.ps-trust svg { width: 15px; height: 15px; color: var(--navy); }

.ps-result { max-width: 1020px; margin: 34px auto 0; scroll-margin-top: 96px; }
.ps-result[hidden] { display: none; }
.ps-result__head { background: linear-gradient(135deg, var(--navy) 0%, #0a0a9e 100%); color: var(--white); border-radius: 20px; padding: 34px; }
.ps-result__kicker { display: inline-flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ps-pill { display: inline-block; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,0.14); font-size: 0.78rem; font-weight: 600; }
.ps-result__head h2 { color: var(--white); font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.2; margin: 0 0 14px; text-wrap: balance; }
.ps-result__head h2:focus { outline: none; }
.ps-result__head p { margin: 0; color: rgba(255,255,255,0.88); line-height: 1.75; font-size: 1rem; max-width: 820px; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.ps-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.4); background: transparent; color: var(--white); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .2s; }
.ps-btn:hover { background: rgba(255,255,255,0.14); }
.ps-btn svg { width: 16px; height: 16px; }
.ps-btn--solid { background: var(--green); color: var(--navy); border-color: var(--green); }
.ps-btn--solid:hover { background: var(--green-light); }

.ps-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.ps-card { background: var(--white); border: 1px solid var(--gray-border); border-radius: 18px; padding: 26px; }
.ps-card--wide { grid-column: 1 / -1; }
.ps-card h3 { font-size: 1.12rem; color: var(--navy); margin: 0 0 6px; }
.ps-card__sub { margin: 0 0 16px; font-size: 0.86rem; color: var(--text-muted); }
.ps-card p, .ps-card li { font-size: 0.93rem; line-height: 1.7; color: var(--text-body); }
.ps-card p { margin: 0 0 12px; }
.ps-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ps-list li { position: relative; padding-left: 24px; }
.ps-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.ps-list--warn li::before { background: #e0a100; }
.ps-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.ps-steps li { counter-increment: s; position: relative; padding-left: 40px; }
.ps-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ps-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ps-checks label { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; line-height: 1.55; color: var(--text-body); cursor: pointer; }
.ps-checks input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--navy); flex: none; }
.ps-checks input:checked + span { color: var(--text-muted); text-decoration: line-through; }
.ps-progress { height: 6px; border-radius: 6px; background: var(--gray-border); overflow: hidden; margin: 0 0 16px; }
.ps-progress > span { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s; }
.ps-card .ps-subhead { font-family: var(--font-heading); font-size: 0.74rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy); line-height: 1.5; margin: 22px 0 10px; }
.ps-table-wrap { overflow-x: auto; margin: 0 0 6px; }
.ps-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
.ps-table th { text-align: left; font-size: 0.74rem; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); padding: 10px 12px; background: var(--blue-bg); }
.ps-table td { padding: 12px; border-top: 1px solid var(--gray-border); vertical-align: top; line-height: 1.6; color: var(--text-body); }
.ps-table td:first-child { font-weight: 600; color: var(--navy); width: 24%; }
.ps-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; margin-right: 6px; }
.ps-badge--ok { background: #e6f4d4; color: #365314; }
.ps-badge--confirm { background: #fff3cd; color: #7a5a00; }
.ps-notice { display: flex; gap: 12px; margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: #fff8e1; border: 1px solid #f3dd9a; font-size: 0.88rem; line-height: 1.65; color: #5c4400; }
.ps-notice svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.ps-notice--info { background: var(--blue-bg); border-color: var(--gray-border); color: var(--text-body); }
.ps-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ps-links a { color: var(--navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 3px; }
.ps-faq details { border-top: 1px solid var(--gray-border); padding: 14px 0; }
.ps-faq details:first-of-type { border-top: 0; }
.ps-faq summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.ps-faq details p { margin: 10px 0 0; }

.ps-lead { grid-column: 1 / -1; background: var(--navy); color: var(--white); border-radius: 20px; padding: 34px; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 34px; }
.ps-lead h3 { color: var(--white); font-size: 1.4rem; margin: 0 0 10px; }
.ps-lead p { color: rgba(255,255,255,0.82); font-size: 0.95rem; line-height: 1.7; margin: 0 0 16px; }
.ps-lead__alt { display: flex; flex-wrap: wrap; gap: 10px; }
.ps-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-form .full { grid-column: 1 / -1; }
.ps-form label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.ps-form input[type="text"], .ps-form input[type="email"], .ps-form input[type="tel"], .ps-form textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); color: var(--white); font: inherit; font-size: 0.95rem; }
.ps-form input[readonly] { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.9); }
.ps-form input::placeholder, .ps-form textarea::placeholder { color: rgba(255,255,255,0.45); }
.ps-form input:focus, .ps-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(165,213,73,0.3); }
.ps-form textarea { min-height: 84px; resize: vertical; }
.ps-form .ps-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ps-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; line-height: 1.55; color: rgba(255,255,255,0.82); }
.ps-consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--green); flex: none; }
.ps-consent label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.84rem; font-weight: 400; color: inherit; }
.ps-consent a { color: var(--green); font-weight: 600; }
.ps-form .btn { border: 0; cursor: pointer; border-radius: 999px; padding: 14px 26px; font-size: 0.98rem; }
.ps-lead .form-message { margin-top: 12px; }

.ps-info { padding: 64px 0; }
.ps-info__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ps-info h2 { color: var(--navy); font-size: clamp(1.5rem, 2.6vw, 2rem); text-align: center; margin: 0 0 10px; text-wrap: balance; }
.ps-info__lead { text-align: center; max-width: 720px; margin: 0 auto 34px; color: var(--text-body); line-height: 1.7; }
.ps-info .ps-card h3 { font-size: 1.02rem; }
.ps-info .ps-card h2 { text-align: left; }
.ps-info__links { margin-top: 28px; text-align: center; font-size: 0.92rem; color: var(--text-body); }
.ps-info__links a { color: var(--navy); font-weight: 600; }
.ps-faqwrap { max-width: 820px; margin: 0 auto; }

@media (max-width: 960px) {
  .ps-problems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-grid, .ps-lead, .ps-info__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ps-tool { padding: 22px 16px; border-radius: 18px; }
  .ps-problems { grid-template-columns: 1fr; }
  .ps-opt__card { flex-direction: row; align-items: center; padding: 12px 14px; }
  .ps-result__head, .ps-lead { padding: 24px 18px; }
  .ps-card { padding: 20px 16px; }
  .ps-form { grid-template-columns: 1fr; }
  .ps-pick .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ps-opt__card, .ps-progress > span, .ps-btn { transition: none; } .ps-opt:hover .ps-opt__card { transform: none; } }

/* Print-only letterhead and footer: hidden on screen, shown only in the PDF/print output. */
.print-header, .print-footer { display: none; }

@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
  body > *:not(main) { display: none !important; }
  /* Hide the hero's own intro (crumb, heading, form) but not .ps-hero itself --
     the generated result (.ps-result, or #rsApp's output on the refusal-review
     tool) lives INSIDE .ps-hero, so hiding the whole section printed a blank
     page. display:none on an ancestor can't be undone on a descendant. */
  .ps-crumb, .ps-hero__head, .ps-tool, .ps-info, .ps-noprint, .ps-lead, .ps-actions { display: none !important; }
  .ps-result[hidden] { display: none !important; }
  .ps-result { display: block !important; }

  .print-header {
    display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding-bottom: 16px;
    border-bottom: 3px solid var(--green);
  }
  .print-header img { height: 40px; width: auto; }
  .print-header div { display: flex; flex-direction: column; }
  .print-header strong { font-family: var(--font-heading); font-size: 1.1rem; color: var(--navy); line-height: 1.3; }
  .print-header span { font-size: 0.76rem; color: #555; }

  .ps-result__head {
    background: #f4f6fb; color: var(--navy); padding: 22px 26px; border-radius: 10px;
    border: none; border-left: 5px solid var(--green);
  }
  .ps-result__head h2, .ps-result__head p { color: var(--navy); }
  .ps-pill { background: rgba(0,0,128,0.08); color: var(--navy); }
  .ps-card {
    border: 1px solid #e2e8f0; border-left: 4px solid var(--green); border-radius: 6px;
    padding: 16px 18px; margin-bottom: 4px; break-inside: avoid; background: #fff;
  }
  .ps-card h3 { color: var(--navy); }
  .ps-grid { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; word-break: break-all; color: #555; }

  .print-footer {
    display: block; margin-top: 26px; padding-top: 14px; border-top: 1px solid #ccc;
    font-size: 0.72rem; line-height: 1.6; color: #555;
  }
  .print-footer strong { color: var(--navy); }
  @page { margin: 16mm 14mm; }
}
