/*
 * HomeLoanCalc: small phones (loaded only below 700px wide; tuned for 320 to 420px).
 * Full-width layout, 44px touch targets, 16px form text (no zoom on iPhone), compact header, lighter effects.
 */
html { -webkit-tap-highlight-color: transparent; }
button, a, summary, select, input { touch-action: manipulation; }

/* ----- header: logo, search, colour mode, menu all fit on a 320px screen ----- */
.hlc-container, .hlc-narrow { padding-left: 16px; padding-right: 16px; }
.hlc-header-inner { gap: 8px; min-height: 60px; }
.hlc-brand { flex: 1 1 auto; min-width: 0; }
.hlc-brand-link { gap: 8px; min-width: 0; }
.hlc-brand-mark, .hlc-brand-mark img { width: 38px; height: 38px; }
.hlc-brand-name { font-size: .92rem; line-height: 1.15; overflow-wrap: anywhere; }
.hlc-search-toggle, .hlc-mode-toggle, .hlc-nav-toggle { width: 42px; height: 42px; flex: none; margin-left: 0; }
.hlc-nav { max-height: calc(100dvh - 70px); overflow-y: auto; }
.hlc-menu a { min-height: 48px; display: flex; align-items: center; }

/* ----- type and spacing ----- */
.hlc-hero { padding-top: 24px; }
.hlc-hero h1 { font-size: clamp(1.6rem, 7.2vw, 2.1rem); line-height: 1.15; }
.hlc-hero .hlc-lead { font-size: 1rem; }
.hlc-hero-points { grid-template-columns: 1fr; }
.hlc-section, .hlc-step { padding-top: 36px; padding-bottom: 12px; }
.hlc-step-head { gap: 12px; margin-bottom: 16px; }
.hlc-step-num { width: 38px; height: 38px; font-size: 1rem; }
.hlc-step-head h2, .hlc-section-head h2 { font-size: 1.35rem; line-height: 1.2; }
.hlc-card { padding: 16px; }
.hlc-result-big { font-size: clamp(1.9rem, 10vw, 2.6rem); }

/* ----- forms and buttons: easy to tap, no iOS zoom ----- */
.hlc-input input, .hlc-plain, .hlc-select, .hlc-search-input, .hlc-emino input, .hlc-money, .hlc-dialog input, .hlc-dialog select, .comment-form input, .comment-form textarea { font-size: 16px; }
.hlc-input, .hlc-plain, .hlc-select, .hlc-search-input { min-height: 48px; }
.hlc-btn { min-height: 46px; }
.hlc-btn-sm { min-height: 44px; padding-left: 16px; padding-right: 16px; }
.hlc-chip { min-height: 42px; padding-left: 14px; padding-right: 14px; }
.hlc-chips { gap: 8px; }
.hlc-topic-pill { min-height: 42px; display: inline-flex; align-items: center; }
.hlc-tag, .hlc-tags a { padding: 6px 12px; }
.hlc-monthpicker { gap: 8px; }
.hlc-emino input { min-height: 44px; }
.hlc-choice-card { padding: 14px 14px 14px 50px; }

/* ----- step bar: one row, swipe sideways ----- */
.hlc-stepper ol { scroll-snap-type: x proximity; padding-left: 0; padding-right: 0; -webkit-overflow-scrolling: touch; }
.hlc-stepper li { flex: none; scroll-snap-align: start; }
.hlc-stepper a { min-height: 42px; }

/* ----- results and tables ----- */
.hlc-table { font-size: .84rem; }
.hlc-table th, .hlc-table td { padding: 8px 10px; }
.hlc-table-wrap { -webkit-overflow-scrolling: touch; }
.hlc-banner { padding: 16px; gap: 12px; }

/* ----- schedule ----- */
.hlc-sched-tools { gap: 10px; }
.hlc-sched-search { flex: 1 1 100%; }
.hlc-seg { width: 100%; }
.hlc-seg button { flex: 1; min-height: 40px; }
.hlc-sched-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hlc-sched-actions .hlc-btn { width: 100%; justify-content: center; }
.hlc-sched-pager { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; margin-left: -4px; margin-right: -4px; padding-left: 4px; }
.hlc-sched-pager::-webkit-scrollbar { display: none; }
.hlc-sched-pager .hlc-chip { flex: none; }
.hlc-sched-cards { grid-template-columns: 1fr; gap: 12px; }
.hlc-act { min-width: 42px; height: 42px; }
.hlc-prepay { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hlc-sched-card footer > div { align-items: center; }
.hlc-sched-legend { font-size: .8rem; }

/* ----- popups become bottom sheets ----- */
.hlc-dialog { width: calc(100vw - 16px); max-width: 480px; margin: auto auto 8px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 20px 18px; border-radius: 24px 24px 18px 18px; }
.hlc-dlg-actions .hlc-btn { flex: 1 1 auto; }
.hlc-dlg-actions .hlc-danger { margin-right: 0; flex-basis: 100%; order: 3; }

/* ----- blog ----- */
.hlc-blog-hero { padding-top: 22px; }
.hlc-blog-hero .hlc-page-title { font-size: clamp(1.6rem, 7vw, 2.1rem); }
.hlc-post-wrap { padding: 10px 12px 32px; }
.hlc-single, .hlc-page .hlc-entry { padding: 18px 16px; }
.hlc-entry-head .hlc-page-title { font-size: clamp(1.5rem, 6.8vw, 2rem); }
.hlc-prose { font-size: 1rem; line-height: 1.7; }
.hlc-prose h2 { font-size: 1.35rem; }
.hlc-prose h3 { font-size: 1.15rem; }
.hlc-cta-band { padding: 20px 18px; flex-direction: column; align-items: stretch; text-align: left; }
.hlc-cta-band .hlc-btn { width: 100%; justify-content: center; }
.hlc-author-box { flex-direction: column; gap: 12px; padding: 18px; }
.hlc-post-card-body { padding: 16px 18px 18px; }
.hlc-topic-grid { gap: 14px; }
.toc { padding: 16px 18px; }
.hlc-search { max-width: none; }
.page-numbers { min-width: 44px; height: 44px; }
.hlc-footer { padding-top: 36px; }
.hlc-footer a { display: inline-block; padding: 4px 0; }
.hlc-social a { padding: 8px 16px; }

/* ----- lighter effects on phones (battery and scroll smoothness) ----- */
body.hlc-style-glassmorphism { background-attachment: scroll; }
body.hlc-style-glassmorphism::before { position: absolute; }
body.hlc-style-glassmorphism .hlc-card, body.hlc-style-glassmorphism .hlc-benefit, body.hlc-style-glassmorphism .hlc-tool, body.hlc-style-glassmorphism .hlc-cat,
body.hlc-style-glassmorphism .hlc-post-card, body.hlc-style-glassmorphism .hlc-entry, body.hlc-style-glassmorphism .hlc-faq, body.hlc-style-glassmorphism .hlc-banner,
body.hlc-style-glassmorphism .hlc-header, body.hlc-style-glassmorphism .hlc-footer, body.hlc-style-glassmorphism .hlc-stepper { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.hlc-style-glassmorphism .hlc-header { margin: 8px auto 0; width: calc(100% - 16px); border-radius: 20px; }

@media (max-width: 380px) {
	.hlc-container, .hlc-narrow { padding-left: 14px; padding-right: 14px; }
	.hlc-brand-name { font-size: .85rem; }
	.hlc-search-toggle, .hlc-mode-toggle, .hlc-nav-toggle { width: 40px; height: 40px; }
	.hlc-card { padding: 14px; }
	.hlc-dlg-row { grid-template-columns: 1fr; }
	.hlc-sched-actions { grid-template-columns: 1fr; }
	.hlc-hero-cta .hlc-btn { flex: 1 1 100%; }
	.hlc-badge { font-size: .76rem; padding: 4px 10px; }
	.hlc-stepper-label { font-size: .78rem; }
	.hlc-table { font-size: .8rem; }
}

/* active chip (year pager, quick amounts): always readable */
.hlc-chip[aria-pressed="true"] { color: #fff; background: var(--hlc-teal, #0f766e); }
