/* Scholarship tools, public pages. Ported from the original HelperCBT student design. No shadows.
   When the Sharpnaija theme is active, the .hbst--sn block at the end takes its colours, fonts and radius from the theme. */

.hbst {
  --hbst-accent: #0f766e;
  --hbst-bg: #f5f5f5;
  --hbst-surface: #ffffff;
  --hbst-surface-2: #f7f7f7;
  --hbst-ink: #111111;
  --hbst-ink-2: #2b2b2b;
  --hbst-muted: #6b6b6b;
  --hbst-line: #e6e6e6;
  --hbst-line-2: #d6d6d6;
  --hbst-green: #15803d;
  --hbst-green-bg: #dcfce7;
  --hbst-red: #c2410c;
  --hbst-red-bg: #fee2e2;
  --hbst-blue: #404040;
  --hbst-blue-bg: #ededed;
  --hbst-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  background: var(--hbst-bg);
  color: var(--hbst-ink);
  font-family: var(--hbst-font);
  font-size: 15px;
  line-height: 1.55;
  padding: 32px 0 56px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .hbst:not(.hbst--sn):not([data-theme="light"]) {
    --hbst-bg: #000000;
    --hbst-surface: #1a1a1a;
    --hbst-surface-2: #222222;
    --hbst-ink: #f2f2f2;
    --hbst-ink-2: #d4d4d4;
    --hbst-muted: #9a9a9a;
    --hbst-line: #2e2e2e;
    --hbst-line-2: #3a3a3a;
    --hbst-green: #4ade80;
    --hbst-green-bg: rgba(74, 222, 128, .14);
    --hbst-red: #fb923c;
    --hbst-red-bg: rgba(248, 113, 113, .14);
    --hbst-blue: #d4d4d4;
    --hbst-blue-bg: rgba(255, 255, 255, .08);
    color-scheme: dark;
  }
}

.hbst:not(.hbst--sn)[data-theme="dark"] {
  --hbst-bg: #000000;
  --hbst-surface: #1a1a1a;
  --hbst-surface-2: #222222;
  --hbst-ink: #f2f2f2;
  --hbst-ink-2: #d4d4d4;
  --hbst-muted: #9a9a9a;
  --hbst-line: #2e2e2e;
  --hbst-line-2: #3a3a3a;
  --hbst-green: #4ade80;
  --hbst-green-bg: rgba(74, 222, 128, .14);
  --hbst-red: #fb923c;
  --hbst-red-bg: rgba(248, 113, 113, .14);
  --hbst-blue: #d4d4d4;
  --hbst-blue-bg: rgba(255, 255, 255, .08);
  color-scheme: dark;
}

.hbst-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.hbst *, .hbst *::before, .hbst *::after { box-sizing: border-box; }
.hbst h1, .hbst h2, .hbst h3 { color: var(--hbst-ink); margin: 0; letter-spacing: -.02em; line-height: 1.2; font-weight: 800; }
.hbst h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.hbst h2 { font-size: 1.1rem; }
.hbst h3 { font-size: 1rem; }
.hbst p { margin: 0 0 .75em; }
.hbst a { color: inherit; }
.hbst button { font: inherit; }
.hbst :focus-visible { outline: 3px solid var(--hbst-accent); outline-offset: 2px; border-radius: 10px; }
.hbst-muted { color: var(--hbst-muted); }

/* Page heading */
.hbst-page-head { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--hbst-line); }
.hbst-page-head h1 { margin-bottom: 8px; }
.hbst-page-head p { margin: 0; }

/* Tool tabs */
.hbst-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.hbst-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hbst-line-2); background: var(--hbst-surface); color: var(--hbst-ink-2); font-size: .85rem; font-weight: 600; text-decoration: none; }
.hbst-chip.is-active { background: var(--hbst-ink); color: var(--hbst-surface); border-color: var(--hbst-ink); }

/* Cards */
.hbst-card { background: var(--hbst-surface); border: 1px solid var(--hbst-line); border-radius: 18px; padding: 22px; margin: 0 0 18px; }
.hbst-card h2 { margin-bottom: 12px; }

/* Buttons */
.hbst-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--hbst-accent); background: var(--hbst-accent); color: #ffffff; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; }
.hbst-btn--ghost { background: var(--hbst-surface); color: var(--hbst-ink); border-color: var(--hbst-line-2); }

/* Form */
.hbst-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 20px; padding: clamp(22px, 3vw, 34px); border-radius: 24px; }
.hbst-form > .hbst-wide:first-child h2 { margin-bottom: 6px; }
.hbst-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hbst-form label > span { font-size: .8rem; font-weight: 700; color: var(--hbst-ink-2); }
.hbst-form input[type="text"], .hbst-form input[type="number"], .hbst-form select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--hbst-line-2); background: var(--hbst-bg); color: var(--hbst-ink); font: inherit; font-size: .94rem; }
.hbst-form input:focus, .hbst-form select:focus { outline: 2px solid var(--hbst-accent); outline-offset: 0; }
.hbst-form .hbst-wide { grid-column: 1 / -1; }
.hbst-note { margin: 0; color: var(--hbst-muted); }
.hbst-form > .hbst-wide .hbst-btn { width: 100%; }

/* Results */
.hbst-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--hbst-red-bg); color: var(--hbst-red); font-weight: 600; font-size: .9rem; margin: 14px 0; }
.hbst-alert--info { background: var(--hbst-blue-bg); color: var(--hbst-blue); }
.hbst-alert--ok { background: var(--hbst-green-bg); color: var(--hbst-green); }
.hbst-stat { padding: 18px; border-radius: 18px; background: var(--hbst-bg); border: 1px solid var(--hbst-line); display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.hbst-stat h3 { font-size: 1.02rem; }
.hbst-stat ul { margin: 0; padding-left: 18px; }
.hbst-stat .hbst-btn { align-self: flex-start; margin-top: 4px; }

/* Cost table */
.hbst-table-wrap { overflow-x: auto; }
.hbst-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.hbst-table th, .hbst-table td { padding: 12px 14px; border-bottom: 1px solid var(--hbst-line); text-align: left; vertical-align: middle; }
.hbst-table th { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hbst-muted); background: var(--hbst-surface-2); }
.hbst-table td:last-child, .hbst-table th:last-child { text-align: right; white-space: nowrap; }
.hbst-table tbody tr:last-child td { border-bottom: 0; }

/* Guide and FAQ */
.hbst-guide { margin-top: 28px; }
.hbst-section { background: var(--hbst-surface); border: 1px solid var(--hbst-line); border-radius: 18px; padding: 22px; margin: 0 0 18px; }
.hbst-section h2 { margin-bottom: 10px; }
.hbst-list { margin: 0 0 .75em; padding-left: 20px; }
.hbst-list li { margin-bottom: 6px; }
.hbst-qa { border-top: 1px solid var(--hbst-line); padding: 14px 0; }
.hbst-qa:first-of-type { border-top: 0; padding-top: 4px; }
.hbst-qa summary { cursor: pointer; font-weight: 700; list-style: none; }
.hbst-qa summary::-webkit-details-marker { display: none; }
.hbst-qa summary::after { content: "+"; float: right; font-weight: 800; color: var(--hbst-accent); }
.hbst-qa[open] summary::after { content: "\2212"; }
.hbst-qa p { margin: 10px 0 0; color: var(--hbst-ink-2); }

@media (max-width: 640px) {
  .hbst { padding: 20px 0 40px; }
  .hbst-card, .hbst-section { padding: 18px; }
  .hbst-form { padding: 18px; border-radius: 20px; }
  .hbst-table th, .hbst-table td { padding: 10px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hbst * { transition: none !important; animation: none !important; }
}

/* Desktop: fields sit in two columns. Phones keep one column (base rule above). */
@media (min-width: 641px) {
  .hbst-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* More tools: cards in a grid. */
.hbst-more { margin-top: 28px; }
.hbst-more > h2 { margin-bottom: 12px; }
.hbst-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.hbst-tool-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.hbst-tool-card h3 { font-size: 1.05rem; }
.hbst-tool-card p { margin: 0; }
.hbst-tool-card .hbst-btn { margin-top: auto; align-self: flex-start; }
.hbst-nowrap { white-space: nowrap; }
.hbst-checks { list-style: none; padding-left: 0; }
.hbst-checks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.hbst-checks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 12px; border: 2px solid var(--hbst-accent); border-radius: 3px; }
@media (min-width: 641px) {
  .hbst-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Sharpnaija theme match (.hbst--sn). Colours, fonts, borders, radius and
   dark mode come from the theme's own CSS variables, so the tool pages follow
   the theme's settings. The theme switches dark mode on <html data-theme>, or
   with the system preference, so the dark values below use the same selectors.
   ========================================================================== */

.hbst.hbst--sn {
  --hbst-accent: var(--sn-primary, #0a8f4e);
  --hbst-bg: var(--sn-bg, #ffffff);
  --hbst-surface: var(--sn-surface, #f5f6f7);
  --hbst-surface-2: var(--sn-surface, #f5f6f7);
  --hbst-ink: var(--sn-text, #1d2327);
  --hbst-ink-2: var(--sn-text, #1d2327);
  --hbst-muted: var(--sn-muted, #5f6670);
  --hbst-line: var(--sn-border, #e2e5e8);
  --hbst-line-2: var(--sn-border, #e2e5e8);
  --hbst-green: var(--sn-primary, #0a8f4e);
  --hbst-green-bg: color-mix(in srgb, var(--sn-primary, #0a8f4e) 14%, transparent);
  --hbst-red: #c2410c;
  --hbst-red-bg: color-mix(in srgb, #c2410c 12%, transparent);
  --hbst-blue: var(--sn-text, #1d2327);
  --hbst-blue-bg: var(--sn-surface, #f5f6f7);
  --hbst-font: var(--sn-font-body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  --hbst-radius: var(--sn-radius, 12px);
  --hbst-bw: var(--sn-bw, 1px);
  background: var(--sn-bg, #ffffff);
  color: var(--sn-text, #1d2327);
  font-family: var(--hbst-font);
  font-size: var(--sn-fs, 15px);
}

.hbst.hbst--sn h1,
.hbst.hbst--sn h2,
.hbst.hbst--sn h3 {
  font-family: var(--sn-font-head, var(--hbst-font));
  font-weight: var(--sn-head-weight, 800);
  text-transform: var(--sn-head-case, none);
}

.hbst.hbst--sn .hbst-card,
.hbst.hbst--sn .hbst-section,
.hbst.hbst--sn .hbst-stat,
.hbst.hbst--sn .hbst-form,
.hbst.hbst--sn .hbst-chip,
.hbst.hbst--sn .hbst-btn,
.hbst.hbst--sn .hbst-form input,
.hbst.hbst--sn .hbst-form select,
.hbst.hbst--sn .hbst-alert {
  border-radius: var(--hbst-radius);
}

.hbst.hbst--sn .hbst-card,
.hbst.hbst--sn .hbst-section,
.hbst.hbst--sn .hbst-stat,
.hbst.hbst--sn .hbst-chip,
.hbst.hbst--sn .hbst-btn,
.hbst.hbst--sn .hbst-btn--ghost,
.hbst.hbst--sn .hbst-form input,
.hbst.hbst--sn .hbst-form select {
  border-width: var(--hbst-bw);
}

.hbst.hbst--sn .hbst-btn {
  color: var(--sn-on-primary, #ffffff);
}

.hbst.hbst--sn .hbst-btn--ghost {
  color: var(--sn-text, #1d2327);
}

.hbst.hbst--sn .hbst-page-head,
.hbst.hbst--sn .hbst-qa,
.hbst.hbst--sn .hbst-table th,
.hbst.hbst--sn .hbst-table td {
  border-color: var(--sn-border, #e2e5e8);
}

.hbst.hbst--sn .hbst-table th {
  background: var(--sn-surface, #f5f6f7);
}

/* Ad slots from the theme (see HBST_Settings::ad) */
.hbst-ad {
  margin: 0 0 18px;
  max-width: 100%;
  overflow: hidden;
}

/* Dark mode, as the theme sets it: data-theme on <html>, or the system setting when the theme is on auto. */
:root[data-theme="dark"] .hbst.hbst--sn {
  --hbst-red: #fb923c;
  --hbst-red-bg: color-mix(in srgb, #fb923c 14%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hbst.hbst--sn {
    --hbst-red: #fb923c;
    --hbst-red-bg: color-mix(in srgb, #fb923c 14%, transparent);
  }
}

/* Desktop sidebar on tool pages: content beside a column of deadlines, country picks, a trust note and signup. */
.hbst-wrap--wide { max-width: 1180px; }
.hbst-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.hbst-layout__main { min-width: 0; }
.hbst-aside { display: grid; gap: 16px; min-width: 0; }
.hbst-aside-card { margin: 0; padding: 18px; }
.hbst-aside-card h2 { font-size: 1rem; margin-bottom: 10px; }
.hbst-aside-card p { font-size: .9rem; margin: 0; }
.hbst-aside-list { list-style: none; margin: 0; padding: 0; }
.hbst-aside-list li { padding: 10px 0; border-top: 1px solid var(--hbst-line); }
.hbst-aside-list li:first-child { border-top: 0; padding-top: 0; }
.hbst-aside-list a { font-weight: 600; text-decoration: none; }
.hbst-aside-list a:hover { text-decoration: underline; }
.hbst-aside-list--compact li { padding: 7px 0; }
.hbst-aside-meta { display: block; color: var(--hbst-muted); font-size: .82rem; margin-top: 2px; }
.hbst-aside-signup { min-width: 0; }
@media (min-width: 1024px) {
  .hbst-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .hbst-aside { position: sticky; top: 24px; }
}
