@charset "utf-8";
/* The hosted layer: sign-in and terms screens, the signed-out bar, the account pane, the plans view and the
   import status line. It uses the app's own tokens (app.css), so every theme carries over. */

/* ---------- the gate: while it shows, the app shell stays out of the way ---------- */
#hostGate:not([hidden]) {
  min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}
#hostGate:not([hidden]) ~ .shell, #hostGate:not([hidden]) ~ .tabbar,
body.host-gated > .shell, body.host-gated > .tabbar { display: none; }

.host-screen { width: min(100%, 27rem); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.host-mark { width: 40px; height: 40px; margin-bottom: 6px; }
.host-brand { font-size: clamp(1.7rem, 6.6vw, 2.25rem); overflow-wrap: anywhere; }
.host-title { margin-top: 6px; }
.host-lead { margin: 0; font-size: 1.06rem; line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.host-fine { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.host-caution { color: var(--fg); }
.host-legal { margin-top: 10px; }
.host-alert {
  margin: 0; padding: 10px 12px; font-size: .9rem; line-height: 1.45; color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--bad) 60%, var(--bg)); border-radius: var(--r-ctl);
  background: color-mix(in srgb, var(--bad) 9%, transparent);
}

/* Google's button, to its branding rules: the colour mark unaltered; dark fill #131314 with a #8E918F stroke and
   #E3E3E3 text, light fill #FFFFFF with a #747775 stroke and #1F1F1F text. */
.host-google {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px 0 12px; margin: 6px 0 4px;
  border-radius: var(--r-ctl); border: 1px solid #8e918f; background: #131314; color: #e3e3e3;
  font: 500 .9rem/1.25 var(--ui); letter-spacing: .01em; text-decoration: none;
  transition: background-color .18s, border-color .18s;
}
.host-google:hover { background: #1f2022; text-decoration: none; }
.host-google:active { translate: 0 1px; }
.host-g { width: 20px; height: 20px; flex: none; }
[data-theme="light"] .host-google, [data-theme="sepia"] .host-google, [data-theme="vivid-light"] .host-google {
  background: #ffffff; border-color: #747775; color: #1f1f1f;
}
[data-theme="light"] .host-google:hover, [data-theme="sepia"] .host-google:hover, [data-theme="vivid-light"] .host-google:hover { background: #f3f4f3; }

.host-form { display: grid; gap: 14px; width: 100%; margin: 0; }
.host-check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; line-height: 1.5; cursor: pointer; }
.host-check input { margin-top: .28em; }
/* The Terms and Privacy links inside the tick-box sentence: underlined like the app's other links in running text,
   so it is plain where to read what is agreed to (app.css underlines links only inside p, li and .small). */
.host-check a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.host-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.host-field { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.host-field input {
  height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--fg); font: 500 max(16px, 1rem)/1 var(--mono); letter-spacing: .08em;
}

/* ---------- the signed-out bar ---------- */
.host-bar {
  position: fixed; z-index: 90; top: 0; left: 0; right: 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--surface-2); border-bottom: 1px solid var(--line-strong); box-shadow: var(--pop-shadow);
  font-size: .92rem; line-height: 1.4; text-align: center;
}

/* ---------- account pane (inside Settings) ---------- */
.host-who { overflow-wrap: anywhere; }
.host-plan-name { font-weight: 600; }
.host-usage-block { align-items: start; }
.host-usage-block > .set-label { padding-top: 2px; }
.host-usage { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.host-usage-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.host-usage-count { font: 400 max(12px, .84rem)/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.host-usage-when { font-size: .82rem; color: var(--muted); }
.host-usage-row.near .host-usage-count, .host-usage-row.near .host-usage-when { color: var(--hy); }
.host-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 60%, var(--bg)); }
.host-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.host-links a { white-space: nowrap; }
.host-status { color: var(--fg); }

/* ---------- dialogs ---------- */
.host-dialog {
  width: min(30rem, calc(100vw - 32px)); padding: 20px; background: var(--surface); color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: var(--r-pane); box-shadow: var(--pop-shadow);
}
.host-dialog::backdrop { background: rgb(0 0 0 / .55); }
.host-dialog p { margin: 0; line-height: 1.5; }
.host-dialog h2 { font-size: 1.15rem; }

.host-dialog.host-plans { width: min(66rem, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; }
.host-plans[open] { display: flex; flex-direction: column; }
.host-plans-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line); }
.host-plans-head form { margin: 0; }
.host-plans-body { overflow: auto; padding: 20px; display: grid; gap: 14px; overscroll-behavior: contain; }
.host-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-pane); overflow: hidden; }
.host-plan { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); min-width: 0; }
.host-plan.mine { background: var(--surface-2); }
.host-plan > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 10px; }
.host-plan h3 { font-size: 1.05rem; }
.host-price { font-family: var(--display); font-stretch: 118%; font-weight: 300; font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.host-plan-tag {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 3px;
  font: 400 max(12px, .74rem)/1.5 var(--mono); text-transform: lowercase; white-space: nowrap; color: var(--fg);
}
.host-plan-tag.quiet { color: var(--muted); border-color: var(--line); }
.host-allow, .host-later { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; line-height: 1.4; }
.host-later { color: var(--muted); }
.host-later-title { margin-top: 4px; color: var(--muted); font: 400 max(12px, .78rem)/1.4 var(--mono); text-transform: lowercase; }
.host-plan > .btn { margin-top: auto; white-space: normal; min-height: 44px; padding: 8px 12px; text-align: center; }
.host-plans-note { max-width: none; }
@media (max-width: 980px) { .host-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .host-plan-grid { grid-template-columns: minmax(0, 1fr); }
  .host-plan[data-plan="resident"] { order: -1; }
  .host-plans-body { padding: 14px; }
}

/* ---------- the import status line (inside the Add a lecture form) ---------- */
.host-imp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--fg); }
.host-imp-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.host-imp-actions:empty, .host-imp-text:empty { display: none; }
.host-imp .host-check { padding: 2px 0; flex: 1 1 100%; }

@media (max-width: 820px), (pointer: coarse) {
  .host-actions .btn, .host-imp-actions .btn, .host-account .btn { min-height: 44px; }
  .host-links a { display: inline-block; padding: 6px 0; }
}
