/* Portal frame (shared/shell.js): top bar everywhere, bottom tab bar on phones. */
.pf-top { background: linear-gradient(120deg, var(--indigo-900), var(--indigo-800) 60%, var(--indigo-700)); color: #fff; position: sticky; top: 0; z-index: 30; }
.pf-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; min-height: 56px; }
.pf-logo { flex: none; display: flex; }
.pf-logo img { height: 30px; width: auto; background: #fff; border-radius: 7px; padding: 4px 7px; display: block; }
.pf-title { font-weight: 700; white-space: nowrap; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .25); }
.pf-nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: 6px; }
.pf-nav::-webkit-scrollbar { display: none; }
.pf-nav a { color: #d9d4f5; text-decoration: none; padding: 8px 11px; border-radius: 9px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.pf-nav a.on, .pf-nav a:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.pf-acc { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; font-size: .9rem; }
.pf-name { color: #d9d4f5; }
.pf-out, .pf-login { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.pf-main { min-width: 0; }
.pf-tabs { display: none; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Phones and small tablets: title bar + app-style tab bar at the bottom */
@media (max-width: 860px) {
  .pf-nav, .pf-name { display: none; }
  .pf-in { min-height: 52px; padding-inline: 14px; }
  .pf-logo img { height: 28px; }
  .pf-title { font-size: .98rem; }
  .pf-student .pf-acc, .pf-acc .pf-login { display: none; }
  .pf-main { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .pf-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(23, 21, 59, .08); padding-bottom: env(safe-area-inset-bottom); }
  .pf-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px;
    color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; line-height: 1.1; text-align: center; -webkit-tap-highlight-color: transparent; }
  .pf-tabs a.on { color: var(--violet); }
  .pf-tabs a.on .ic { stroke-width: 2.3; }
  .pf-tabs a.on::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--violet); }
  .pf-tabs a { position: relative; }
}

/* "More" page on phones: a plain list of links */
.more-list { list-style: none; margin: 0 0 16px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.more-list li + li { border-top: 1px solid var(--line); }
.more-list a, .more-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 16px; min-height: 54px;
  background: none; border: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.more-list a::after { content: "›"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.more-list button.danger { color: var(--red); }
.more-list small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; }

/* Inside the website (the website header and footer are on the page): a light section bar instead of the dark top bar. */
.pf-site .pf-bar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(23, 21, 59, .02); }
.pf-site .pf-in { max-width: 1180px; padding: 0 20px; min-height: 54px; gap: 14px; }
.pf-site .pf-title { color: var(--ink); border-left: 0; padding-left: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.pf-site .pf-nav { margin-left: 4px; flex: 1; }
.pf-site .pf-nav a { color: var(--muted); padding: 16px 12px 14px; border-radius: 0; border-bottom: 3px solid transparent; }
.pf-site .pf-nav a:hover { background: none; color: var(--violet); }
.pf-site .pf-nav a.on { background: none; color: var(--violet); border-bottom-color: var(--violet); }
.pf-join { flex: none; margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, #ffe08a, #ffc53d 45%, #ffa51a); color: var(--indigo-800); box-shadow: 0 6px 16px rgba(255, 165, 26, .25); }
.pf-join:hover { filter: brightness(1.03); }
.pf-site .pf-main { min-height: 60vh; }
@media (max-width: 860px) {
  .pf-site .pf-nav { display: flex; }
  .pf-site .pf-in { padding: 0 8px 0 16px; min-height: 48px; gap: 6px; }
  .pf-site .pf-title { display: none; }
  .pf-site .pf-nav a { padding: 13px 10px 11px; font-size: .88rem; }
  .pf-site .pf-join { padding: 7px 11px; font-size: .8rem; }
  .pf-site:not(.pf-student) .pf-main { padding-bottom: 0; }
  body.has-site.nav-open .pf-tabs { display: none; }
  .pf-site.pf-student .pf-bar { display: none; }
}
/* inside the website: page content lines up with the website's header and footer (1180px, 20px sides) */
.pf-site .ot-wrap, .pf-site .main { max-width: 1180px; padding-left: 20px; padding-right: 20px; }
.pf-site .ot-wrap h1, .pf-site .main h1 { font-size: 1.75rem; }
@media (max-width: 860px) { .pf-site .ot-wrap h1, .pf-site .main h1 { font-size: 1.35rem; } .pf-site .ot-wrap, .pf-site .main { padding-left: 16px; padding-right: 16px; } }
.pf-join-s { display: none; }
@media (max-width: 560px) { .pf-join-l { display: none; } .pf-join-s { display: inline; } }

/* section bar labels: full on computers, short on phones ("Chapter practice" was cut off at 390 px) */
.pf-s { display: none; }
@media (max-width: 860px) {
  .pf-site .pf-l { display: none; }
  .pf-site .pf-s { display: inline; }
  .pf-site .pf-in { min-height: 52px; }
  /* if the tabs still do not fit (very narrow phones), they scroll sideways and the right edge fades */
  .pf-site .pf-nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent); }
  .pf-site .pf-nav::after { content: ""; flex: 0 0 14px; }
  .pf-site .pf-join { min-height: 44px; }
}
@media (max-width: 380px) { .pf-site .pf-nav a { padding-inline: 8px; } }
