/* start page in the apple.com arrangement: one centred statement with two pills, the services as Store tiles under a
   segmented filter, then a bento of three status cards. Tokens and controls come from ui.css; app.js's ribbon says
   what is broken. */
.start main > * + * { margin-top: 104px; }

/* ---------- the statement ---------- */
.hero { padding-top: 40px; text-align: center; }
.hero-title {
  max-width: 19ch; margin: 0 auto;
  font-size: clamp(30px, 5.4vw, 56px); font-weight: 600; line-height: 1.07; letter-spacing: -.028em;
  text-wrap: balance;
}
.hero-title .t-mut { color: var(--mut-2); }
.hero-title .t-bad { color: var(--down); }
/* the first real state comes into focus once; the loading line before it stays as it is */
.hero-title.settle { animation: settle 1s var(--ease-out) both; }
@keyframes settle { from { opacity: .3; filter: blur(12px); transform: translateY(12px); } }
.hero-sub { max-width: 46em; margin: 22px auto 0; font-size: 19px; line-height: 1.42; letter-spacing: -.012em; color: var(--mut); text-wrap: balance; }
.hero-sub span + span::before { content: ' · '; }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- services as Store tiles ---------- */
.shelf-title { max-width: 25ch; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.024em; text-wrap: balance; }
.shelf-title span { color: var(--mut-2); }
.shelf-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 36px 0 44px; }
.launcher-search { width: min(320px, 100%); }

.quick-links { display: flex; flex-direction: column; gap: 52px; }
.link-section .section-head { margin-bottom: 14px; }
.link-section .section-label { font-size: 21px; text-transform: capitalize; }
.section-codes { font: 12px var(--mono); color: var(--mut); }
.link-section.cat-off { display: none; }

.bento-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bento-link-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-width: 0; padding: 28px 12px 20px;
  border-radius: var(--r); background: var(--surf-2);
  color: var(--ink); text-align: center; text-decoration: none;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.bento-icon { width: 48px; height: 48px; object-fit: contain; }
html:not(.light) .bento-icon.invert, html:not(.light) .recent-pill-icon.invert { filter: invert(1); }
.bento-text { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
/* one line like a Home Screen label: a long name ends in an ellipsis, the card's title holds it in full */
.bento-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; line-height: 1.25; }
.bento-host { margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--mut); }
.bento-code { position: absolute; top: 10px; right: 12px; font-size: 11px; color: var(--mut); }
.bento-link-card:hover { background: var(--surf-h); color: var(--ink); }
@media (hover: hover) { .bento-link-card:hover { transform: scale(1.025); } }
.bento-link-card.is-active { box-shadow: inset 0 0 0 2px var(--acc); }
.bento-link-card.pinned .bento-code::after { content: ' · Pin'; color: var(--acc); }
.bento-link-card.dragging { opacity: .45; }
.bento-link-card.is-hidden, .link-section.is-hidden, .recent-pill.is-hidden { display: none; }
.bento-live { position: absolute; top: 13px; left: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-dot); }
.bento-live.down { background: var(--down); }
.bento-link-card.is-down { background: var(--down-bg); }
.bento-link-card.is-down .bento-name, .bento-link-card.is-down .bento-host { color: var(--down); }
.bento-link-card.is-down .bento-host::before { content: 'Down · '; font-weight: 600; }

.recent-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 10px; border-radius: var(--pill); background: var(--surf); color: var(--ink); font-size: 14px; transition: background-color .2s var(--ease); }
.recent-pill:hover { background: var(--surf-h); color: var(--ink); }
.recent-pill-icon { width: 20px; height: 20px; object-fit: contain; }
#recentClear { font-size: 13px; color: var(--acc); }
.launcher-empty { display: none; padding: 16px 0; font-size: 15px; color: var(--mut); }

/* ---------- bento: infrastructure wide on the left, Microsoft 365 and KEV stacked on the right ---------- */
.bento { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.bento > .scard-up { grid-row: span 2; }
.scard { display: flex; flex-direction: column; min-width: 0; }
.scard-title { margin-bottom: 8px; font-size: 24px; letter-spacing: -.02em; }
.srow-wait { padding: 10px 0; font-size: 14px; color: var(--mut); }
.scard > .more { align-self: flex-start; margin-top: auto; padding-top: 22px; font-size: 15px; }

.hist { margin-top: 26px; }
.hist-cap { margin-bottom: 6px; font-size: 12px; color: var(--mut); }
.hist svg { display: block; width: 100%; height: auto; overflow: visible; }
.hist path { fill: none; }
.h-guide { stroke: var(--div); stroke-dasharray: 2 4; }
.h-ok { stroke: var(--ok-dot); stroke-width: 2.5; }
.h-down { stroke: var(--down); stroke-width: 2.5; }
.h-join { stroke: var(--div-2); stroke-width: 1.5; }
.h-mark { stroke: var(--down); stroke-dasharray: 2 3; }
.h-txt, .h-alert { font: 11px var(--font); fill: var(--mut); }
.h-alert { fill: var(--down); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento > .scard-up { grid-row: auto; grid-column: 1 / -1; }
}
@media (max-width: 833px) {
  .hero-sub span { display: block; }
  .hero-sub span + span::before { content: none; }
}
@media (max-width: 760px) {
  .start main > * + * { margin-top: 72px; }
  .hero { padding-top: 12px; }
  .hero-sub { margin-top: 16px; font-size: 16px; }
  .hero-cta { gap: 10px; margin-top: 26px; }
  .hero-cta .btn-lg { min-height: 40px; padding: 0 18px; font-size: 15px; }
  .shelf-bar { margin: 24px 0 32px; }
  .seg .tab-btn { padding: 0 12px; }
  .launcher-search { width: 100%; }
  .quick-links { gap: 40px; }
  .bento-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bento-link-card { padding: 20px 6px 14px; gap: 10px; border-radius: 14px; }
  .bento-icon { width: 38px; height: 38px; }
  .bento-name { font-size: 13px; }
  .bento-host, .bento-code { display: none; }
  .bento-live { top: 9px; left: 9px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > .scard-up { grid-column: auto; }
  .scard-title { font-size: 21px; }
}
