:root{
  --bg:rgba(0,141,136,0.1); --text:#1a1a1a; --accent:#0b5cff; --muted:#3e434d;
  --max-width:1000px;
  --gap:1rem;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
.container{max-width:var(--max-width); margin:0 auto; padding:1.25rem}
.header-inner, .footer-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.site-header{border-bottom:1px solid #e6e6e6; background:#fff}
.logo{display:flex;align-items:center;gap:0.5rem;text-decoration:none}
/* Site logo image sizing and fallback (increased 50%) */
.logo .site-logo{height:60px;width:auto;display:block}
@media (min-width:720px){
  .logo .site-logo{height:72px}
}

.device-instructions{margin-top:-1rem; font-family: Georgia, 'Times New Roman', Times, serif ;padding-left:1rem;border-left:3px solid var(--accent);font-size:1rem;}
.ios-color{color: rgb(14, 148, 152)}
.android-color{color: rgb(127, 50, 108);}

/* Top links and phone dropdown styles */
.top-links{position:relative}
.top-links a{margin-left:0.75rem;color:var(--muted);text-decoration:none}
/* Underline the e-mail link for emphasis */
.top-links a[href^="mailto:"]{text-decoration:underline}
.phone-dropdown{display:inline-block;margin-left:0.75rem;position:relative}
.phone-dropdown summary{list-style:none;cursor:pointer;border:none;background:none;padding:0;color:var(--muted);display:flex;align-items:center;gap:.4rem}
.phone-dropdown summary:focus{outline:2px solid var(--accent);outline-offset:3px}
.phone-panel{display:none;position:absolute;top:calc(100% + 0.5rem);right:0;background:#fff;border:1px solid #e6e6e6;padding:.5rem .75rem;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.08);white-space:nowrap;z-index:10}
.phone-dropdown[open] .phone-panel{display:block}
.phone-number{color:var(--accent);text-decoration:none;font-weight:600}
.phone-icon{display:inline-block;vertical-align:middle}
h1{font-size:1.75rem;margin:0 0 1rem}
.faq-tabs{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
.faq-tabs a{
  padding:.5rem .75rem;
  border-radius:8px;
  text-decoration:none;
  background:#f6f8fb;
  color:var(--text);
  border:1px solid #e6e6e6;
  box-shadow:0 1px 0 rgba(0,0,0,0.04);
  font-weight:600;
  transition: background .15s, box-shadow .15s, transform .08s;
}
.faq-tabs a:hover{
  background:#eef6ff;
  box-shadow:0 6px 18px rgba(11,92,255,0.06);
  transform:translateY(-1px);
}
.faq-tabs a[aria-selected="true"]{background:var(--accent); color:white; box-shadow:0 1px 0 rgba(0,0,0,.06)}

/* Section title styling */
.faq-section h2{
  display:inline-block;
  background:rgba(0,141,136,0.8);
  color:#ffffff;
  padding:0.4rem 0.75rem;
  border-radius:6px;
  margin-bottom:0.75rem;
  font-size:1rem;
}

.faq-section{display:none;padding:0.5rem 0}
@scope {section.faq-section{text-align:center;}}
.faq-section:target{display:block}
/* Sections are closed by default; opened when targeted. */
/* Also allow JS to toggle visibility by adding the `is-open` class */
.faq-section.is-open{display:block}
.faq-list{list-style:none;padding:0;margin:0;display:grid;gap:.5rem}
/* Question card */
details{border:1px solid #e6e6e6;padding:.75rem;border-radius:8px;background:#fff}
/* Highlight open question with UC-green */
details[open]{border-color:#008D88;box-shadow:0 6px 18px rgba(0,141,136,0.06)}
summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;list-style:none}
summary:focus{outline:2px solid var(--accent); outline-offset:3px}
.permalink{margin-left:.75rem;text-decoration:none;color:var(--muted);font-size:0.9rem}
.answer{margin-top:.5rem;color:var(--text)}

/* Figures inside answers */
.faq-figures{display:flex;gap:.75rem;margin-top:.75rem;flex-wrap:wrap}
.faq-figure{flex:1 1 220px;max-width:320px;display:flex;flex-direction:column;gap:.4rem}
.faq-figure img{width:100%;height:auto;border-radius:8px;border:1px solid #eaeaea}
.faq-figure figcaption{font-size:.9rem;color:var(--muted)}

/* Search UI */
.faq-search{display:flex;gap:.5rem;margin-bottom:1rem}
.faq-search input{flex:1;padding:.5rem;border-radius:8px;border:1px solid #e6e6e6}
.faq-search button{padding:.5rem .75rem;border-radius:8px;background:var(--accent);color:white;border:none;cursor:pointer}
#clear-search{background:#e6e6e6;color:var(--text)}

/* Search results */
.search-results{margin-top:1rem;border:1px dashed #e6e6e6;padding:1rem;border-radius:8px;background:#fff}
.search-result{border:1px solid #e6e6e6;padding:.75rem;border-radius:8px;margin-bottom:.75rem;background:#fff}
.search-result h3{margin:0 0 .25rem;font-size:1rem}
.search-highlight{background:linear-gradient(90deg,#fff08a,#ffd34d);padding:0 .12rem;border-radius:2px}



/* When showing search results, hide the tabs and sections to focus on results */
.show-search .faq-tabs{display:none}
.show-search .faq-section{display:none}

.site-footer{border-top:1px solid #e6e6e6;margin-top:2rem;padding:1rem 0;color:var(--muted)}
.skip-link{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{position:static;width:auto;height:auto;padding:.25rem .5rem;background:var(--accent);color:white;border-radius:4px}

.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* Responsive */
@media (min-width:720px){
  .faq-tabs{gap:.75rem}
  .faq-list{grid-template-columns:repeat(2,1fr)}
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto}
}

/* UC Berkeley logo placed in footer (aligned right) - reduced 50% */
.ucb-link{display:block;margin-left:auto;text-decoration:none}
.ucb-link:focus{outline:3px solid var(--accent);outline-offset:4px;border-radius:4px}
.ucb-logo{height:24px;width:auto;display:block}
@media (max-width:420px){
  .ucb-logo{height:18px}
}
@media print{
  .ucb-logo{display:none}
}