/* =========================
   UClick — HTML/CSS only
   ========================= */

/* Design tokens */
:root{
  --primary:#2968f0;
  --accent:#10b981;
  --text:#0f172a;
  --muted:#64748b;
  --bg:#ffffff;
  --bg-alt:#f8fafc;

  --radius:14px;
  --shadow:0 6px 20px rgba(15,23,42,.08);
  --maxw:1120px;
}

/* Base */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block}
a{
  color:var(--primary);
  text-decoration:none;
  transition:all .2s ease-in-out;
}
a:hover{
  color:#1e40af;
  background-color:rgba(37,99,235,.08);
  border-radius:6px;
  text-decoration:none;
}
small,.small{font-size:.875rem}
.muted{color:var(--muted)}

.h1{font-size:clamp(2rem, 2.5vw + 1rem, 2.75rem);line-height:1.15;margin:.2em 0 .4em}
.h2{font-size:1.75rem;margin:.2em 0 .4em}
.h3{font-size:1.35rem;margin:.2em 0 .4em}
.h4{font-size:1.1rem;margin:.2em 0 .4em}

/* Layout utilities */
.container{max-width:var(--maxw);margin:auto;padding:0 1rem}
.stack-6>*+*{margin-top:1.5rem}
.stack-8>*+*{margin-top:2rem}
.gap{display:flex;gap:.75rem;flex-wrap:wrap}
.grid{display:grid;gap:1rem}
.grid-2{grid-template-columns:1fr}
.grid-3{grid-template-columns:1fr}
@media (min-width:640px){
  .grid-2{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:1024px){
  .grid-3{grid-template-columns:repeat(3,1fr)}
}

/* Header & Footer */
.site-header{
  border-bottom:1px solid #e5e7eb;
  background:var(--bg);
  position:sticky;
  top:0;
  z-index:50;
}
.header-inner{display:flex;align-items:center;justify-content:space-between;min-height:64px}
.brand{display:flex;align-items:center;gap:.5rem}
.brand-logo{width:36px;height:36px}
.brand-logo.small{width:28px;height:28px}
.brand-name{font-weight:700;font-size:1.125rem;color:var(--text)}
.nav{display:flex;gap:.75rem;list-style:none;margin:0;padding:0}
.nav a{
  display:block;
  padding:.5rem .75rem;
  border-radius:10px;
}
.nav a[aria-current="page"]{
  background:rgba(37,99,235,.08);
  border:1px solid rgba(37,99,235,.25);
  text-decoration:none;
}

/* Footer */
.site-footer{
  margin-top:3rem;
  border-top:1px solid #e5e7eb;
  background:var(--bg-alt);
  padding:2rem 0;
}
.footer-grid{display:grid;gap:1rem}
.footer-brand .tagline{margin:.25rem 0 0}
.footer-nav ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:1rem;
  top:1rem;
  width:auto;
  height:auto;
  background:#fff;
  border:2px solid var(--primary);
  padding:.5rem .75rem;
  border-radius:10px;
  z-index:1000;
}

/* Hero */
.hero{padding:2.25rem 0}
.hero-grid{display:grid;gap:1.25rem;align-items:center}
@media (min-width:1024px){
  .hero-grid{grid-template-columns:1.1fr .9fr}
}
.lead{font-size:1.125rem;color:var(--muted);max-width:60ch}
.actions .btn{margin-top:.5rem}

/* Cards & components */
.card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:var(--radius);
  padding:1rem;
  box-shadow:var(--shadow);
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}
.equal{display:flex;flex-direction:column}
.card .num{
  width:36px;
  height:36px;
  border-radius:999px;
  background:var(--primary);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  margin-bottom:.5rem;
}
.quote footer{margin-top:.75rem;color:var(--muted)}
.checklist{padding-left:1.25rem}
.checklist li{margin:.4rem 0}

/* Ordered steps list */
.steps{
  list-style:none;
  padding:0;
  margin:0;
}

/* Buttons */
.btn{
  display:inline-block;
  padding:.6rem 1rem;
  border-radius:12px;
  border:1px solid transparent;
  font-weight:600;
  line-height:1;
  text-decoration:none;
  transition:all .2s ease-in-out;
}
.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  filter:brightness(1.05);
}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn-accent{background:var(--accent);color:#04352a;border-color:var(--accent)}
.btn-ghost{background:transparent;color:var(--text);border-color:#cbd5e1}

/* Forms */
.form .field{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  margin-bottom:.9rem;
}
label,.label{font-weight:600}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea{
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:.65rem .75rem;
  font:inherit;
}
input:focus,select:focus,textarea:focus{
  outline:3px solid rgba(37,99,235,.25);
  border-color:var(--primary);
}
input:hover,select:hover,textarea:hover{
  border-color:var(--primary);
  background-color:#f0f9ff;
}
.inline{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}
fieldset{border:0;padding:0;margin:0}

/* Tabs (Login/Register) */
.tabs{padding:0}
/* Hide only the tab radio buttons, not all inputs */
.tabs input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.tabs .tab-labels{display:flex;border-bottom:1px solid #e5e7eb}
.tabs .tab-labels label{
  padding:.9rem 1rem;
  cursor:pointer;
  font-weight:700;
  flex:1;
  text-align:center;
}
#tab-login:checked ~ .tab-labels label[for="tab-login"],
#tab-register:checked ~ .tab-labels label[for="tab-register"]{
  color:var(--primary);
  border-bottom:3px solid var(--primary);
}
.tab-panels{padding:1rem}
.panel{display:none}
#tab-login:checked ~ .tab-panels #panel-login{display:block}
#tab-register:checked ~ .tab-panels #panel-register{display:block}

/* Callout & toast */
.callout{margin:2rem 0}
.callout-inner{
  background:linear-gradient(90deg, rgba(37,99,235,.08), rgba(16,185,129,.08));
  border:1px solid #dbeafe;
  padding:1.25rem;
  border-radius:var(--radius);
}
.toast{
  border-radius:var(--radius);
  padding:1.25rem;
  margin:2rem auto;
  max-width:760px;
  text-align:left;
}
.toast.success{
  background:#ecfdf5;
  border:1px solid #bbf7d0;
}

/* College cards & filters */
.cards{align-items:stretch}
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  margin-bottom:.5rem;
}
.badge{
  display:inline-block;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid #c7d2fe;
  padding:.2rem .5rem;
  border-radius:999px;
  font-size:.85rem;
}

/* CSS-only filtering using :has() to reach sibling section */
.filters{position:sticky;top:64px;z-index:10}
.college{transition:opacity .2s ease}
.cards .college{display:block}

/* Tuition */
form.filters:has(#t-low:checked) ~ #results .college:not(.tuition-low){display:none}
form.filters:has(#t-mid:checked) ~ #results .college:not(.tuition-mid){display:none}
form.filters:has(#t-high:checked) ~ #results .college:not(.tuition-high){display:none}

/* Size */
form.filters:has(#sz-small:checked) ~ #results .college:not(.size-small){display:none}
form.filters:has(#sz-medium:checked) ~ #results .college:not(.size-medium){display:none}
form.filters:has(#sz-large:checked) ~ #results .college:not(.size-large){display:none}

/* Acceptance */
form.filters:has(#a-high:checked) ~ #results .college:not(.acc-high){display:none}
form.filters:has(#a-mid:checked) ~ #results .college:not(.acc-mid){display:none}
form.filters:has(#a-low:checked) ~ #results .college:not(.acc-low){display:none}

/* Region (multi-select). If any box is checked, hide non-matching; re-show matches. */
form.filters:has(#f-ne:checked, #f-mw:checked, #f-s:checked, #f-w:checked) ~ #results .college{display:none}
form.filters:has(#f-ne:checked) ~ #results .college.r-ne{display:block}
form.filters:has(#f-mw:checked) ~ #results .college.r-mw{display:block}
form.filters:has(#f-s:checked)  ~ #results .college.r-s{display:block}
form.filters:has(#f-w:checked)  ~ #results .college.r-w{display:block}

/* Print shortlist: only print cards with the checkbox checked */
@media print{
  header,.filters,.site-footer,.callout,.page-intro{display:none !important}
  .cards .college{display:none !important}
  .cards .college:has(.shortlist:checked){
    display:block !important;
    break-inside:avoid;
  }
}

/* Accessibility focus */
:focus-visible{
  outline:3px solid rgba(37,99,235,.4);
  outline-offset:2px;
}

/* Forms: buttons row */
.actions{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}

/* Hero image decoration */
.hero-media img{
  border-radius:var(--radius);
  border:1px solid #e5e7eb;
  width:130%;
  max-width:600px;
}

/* Page intro spacing */
.page-intro{margin:1.25rem 0}

/* Footer grid */
@media (min-width:640px){
  .footer-grid{grid-template-columns:1fr auto}
}

/* Misc */
.inline li{list-style:none}
.no-js-note{margin:.35rem 0 0}

/* Table styling */
.table-wrapper{overflow-x:auto}
.timeline{
  width:100%;
  border-collapse:collapse;
  font-size:.95rem;
}
.timeline caption{
  text-align:left;
  font-weight:600;
  margin-bottom:.5rem;
}
.timeline th,
.timeline td{
  border:1px solid #e5e7eb;
  padding:.55rem .65rem;
  text-align:left;
}
.timeline thead{
  background:#eef2ff;
}
.timeline tbody tr:nth-child(even){
  background:#f9fafb;
}

/* End */


/* Responsive YouTube embed */
.video-wrapper{
  position:relative;
  padding-bottom:56.25%;
  height:0;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid #e5e7eb;
}
.video-wrapper iframe{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
}
