/* Home (screens/home.js), after Cydia's on the 4S (ref/4s/screens/cydia-home.png). Sizes are the 4S shot's pixels
   halved; colours sampled from it: tile edges #999 with 8px corners, white tiles, the account tile #eefff0, by-line
   #586c90 with a white emboss. Tiles are .cell-inner links, so the held look (blue selection, white text and
   chevron) is the table cells' from ios6.css. No highlights or bottom lines: the phone draws none. */
.home {
  --tile: #fff;
  --tile-edge: #999;
  --tile-green: #eefff0;
  --by: #586c90;
}
html[data-theme="dark"] .home {
  --tile: var(--table);
  --tile-edge: var(--table-edge);
  --tile-green: #2f4a36;
  --by: #a9c4f2;
}

/* Icon and welcome: a 76px icon 16px in from the tiles, the words beside it. */
.home-head { margin: 0 10px; display: flex; align-items: center; gap: 22px; padding: 11px 0 11px 16px; }
.home-icon { flex: none; width: 76px; height: 76px; border-radius: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.home-words { min-width: 0; }
/* F152: the words as one block (lines still flush left, as Cydia's), centred across and down in the space between the
   icon and the tiles' right edge, as on Cydia's Home (4S: 32pt left of the block, 36pt right). Auto margins take the
   free space; the 10px each side is the closest the text comes, kept equal so the centre stays true. */
.home-head { gap: 0; }
.home-head > .home-words { margin: 0 auto; padding: 0 10px; }
.home-title { margin: 0; font-size: 21px; font-weight: normal; line-height: 26px; color: var(--text); text-shadow: var(--emboss); }
.home-by { margin: 2px 0 0; font-size: 17px; line-height: 21px; color: var(--text); text-shadow: var(--emboss); }
.home-by a { color: var(--by); font-weight: bold; text-decoration: none; }

/* Tile rows: 43px tiles, 10px apart; two halves 9px apart, or one outlined pair split by a line. */
.home-row { margin: 0 10px; display: flex; gap: 9px; }
.home-row + .home-row { margin-top: 10px; }
.home-row > .table {
  flex: 1; min-width: 0; overflow: hidden; border: 1px solid var(--tile-edge); border-radius: 8px;
  background: var(--tile); box-shadow: none;
}
.home-row.pair > .table { display: flex; background: none; } /* Cydia: no fill, the pinstripes show through */
.home-pair > .cell { flex: 1; min-width: 0; }
.home-pair > .cell + .cell { border-top: 0; border-left: 1px solid var(--tile-edge); }
.home-pair > .cell + .cell > .cell-inner { box-shadow: none; } /* not a table's divider highlight */
.home-row.green > .table { background: var(--tile-green); }
.home-tile { padding: 0 10px 0 6px; gap: 8px; }
.home-tile .cell-label { flex: 1; min-width: 0; }

/* Glyphs: 29px rounded squares with a white symbol, drawn here (original art, no logos). */
.home-glyph { box-shadow: none; background-position: center; background-repeat: no-repeat; background-size: 21px 21px; }
.glyph-github { background-color: #333; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6 2 12l6 6M16 6l6 6-6 6M14 4l-4 16'/%3E%3C/svg%3E"); }
.glyph-sources { background-color: #5c7aa3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M3 4h18v4H3zM4 9h16v11H4zm5 3v2h6v-2z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.glyph-discord { background-color: #7289da; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M19.3 5.4A16.6 16.6 0 0 0 15.2 4l-.5 1a15.3 15.3 0 0 0-5.4 0l-.5-1a16.5 16.5 0 0 0-4.1 1.4C2.1 9.3 1.4 13.2 1.8 17a16.7 16.7 0 0 0 5 2.5l1.1-1.7a10.8 10.8 0 0 1-1.7-.8l.4-.3a11.9 11.9 0 0 0 10.8 0l.4.3a10.8 10.8 0 0 1-1.7.8l1.1 1.7a16.6 16.6 0 0 0 5-2.5c.5-4.4-.7-8.3-2.9-11.6zM8.5 14.6c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2zm7 0c-1 0-1.8-.9-1.8-2s.8-2 1.8-2 1.8.9 1.8 2-.8 2-1.8 2z'/%3E%3C/svg%3E"); } /* the old blurple and Clyde */
.glyph-featured { background-color: #fc0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='m12 1.5 3.2 6.9 7.3.8-5.4 5 1.5 7.3L12 17.8l-6.6 3.7 1.5-7.3-5.4-5 7.3-.8z'/%3E%3C/svg%3E"); }
.glyph-themes { background-color: #1a82fb; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M2 4h20v13H2zm2 2v9h16V6zM9 18h6l1 3H8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.glyph-browse { background-color: #f39c12; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M3 3h8v8H3zm10 0h8v8h-8zM3 13h8v8H3zm10 0h8v8h-8z'/%3E%3C/svg%3E"); }
.glyph-signing { background-color: #8e44ad; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M4 3h12l4 4v8.5a5 5 0 0 0-2-1.2V8h-3V5H6v14h6.6a5 5 0 0 0 .7 2H4zm14 13a3.5 3.5 0 1 1-1.5 6.7L15 24v-3.4A3.5 3.5 0 0 1 18 16zM8 9h7v2H8zm0 4h5v2H8z'/%3E%3C/svg%3E"); }
.glyph-install { background-color: #2c9b3c; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M11 3h2v9.6l3.3-3.3 1.4 1.4L12 16.4l-5.7-5.7 1.4-1.4 3.3 3.3zM4 18h16v2H4z'/%3E%3C/svg%3E"); }
.glyph-send { background-color: #2c9b3c; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M3 11h12.2l-4.6-4.6L12 5l7 7-7 7-1.4-1.4 4.6-4.6H3z'/%3E%3C/svg%3E"); }
.home-row.green .home-glyph { background-color: #37a94a; }
html[data-theme="dark"] .glyph-github { background-color: #4a4d52; }
.glyph-add { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M10 3h4v7h7v4h-7v7h-4v-7H3v-4h7z'/%3E%3C/svg%3E"); }
.glyph-upgrades { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2 3 11h6v10h6V11h6z'/%3E%3C/svg%3E"); }
.glyph-failed { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M10 3h4l-.6 12h-2.8zm0 15h4v3h-4z'/%3E%3C/svg%3E"); }
.glyph-current { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12.5 5 5L20 6.5'/%3E%3C/svg%3E"); }
.glyph-changes, .glyph-loading { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2.5'/%3E%3C/svg%3E"); }
.glyph-loading { opacity: .6; }

/* The help links: a white list with #999 edges like Cydia's, taller rows whose text may wrap. */
.group.home-links { margin-top: 10px; }
.home-links .table.grouped { background: #fff; border-color: #999; border-radius: 8px; box-shadow: none; }
html[data-theme="dark"] .home-links .table.grouped { background: var(--table); border-color: var(--table-edge); }
.home-links .cell-inner { min-height: 43px; padding: 9px 10px 9px 15px; }
.home-links .cell-label { white-space: normal; line-height: 21px; }
.home-links .cell + .cell { border-top-color: #999; }
.home-links .cell + .cell > .cell-inner { box-shadow: none; }
html[data-theme="dark"] .home-links .cell + .cell { border-top-color: var(--divider); }

/* F37: the Not Jailbroken hint under the welcome, in the grouped footer's type (ios6.css .group-footer); a tap opens
   Settings > Device. Empty box when jailbroken. */
.home-hint-box:empty { display: none; }
.home-hint-box { margin: -3px 20px 10px; text-align: center; }
.home-hint {
  font-size: 15px; line-height: 19px; color: var(--head); text-shadow: var(--emboss);
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}

/* Cydia's footer line under Home's links: small, centred, embossed grey. */
.home-version { margin: 14px 10px 6px; font-size: 13px; line-height: 16px; text-align: center; color: var(--head); text-shadow: var(--emboss); }

/* I7: Settings > Signing's Install Cydian App row, once the certificate works: Home's green tile (the account tile's
   #eefff0, its green glyph) as a grouped row. */
.app-offer .table.grouped { background: #eefff0; }
html[data-theme="dark"] .app-offer .table.grouped { background: #2f4a36; }
.app-offer .home-glyph { background-color: #37a94a; }

/* Home's Cydian App card (screens/home.js tileRow "green stack"): one green table, two full-width rows with a line
   of explanation each. */
.home-row.stack > .table { flex: 1; }
.home-stack > .cell + .cell { border-top: 1px solid var(--tile-edge, rgba(0,0,0,.12)); }
.home-stack .home-tile { min-height: 58px; }
.home-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.home-tile-text .cell-subtitle { font-size: 13px; font-weight: normal; color: var(--subtitle); }
.installed-myipas { margin: 12px 10px; }
.installed-myipas > .table { border: 1px solid var(--table-edge, #b4b8bf); box-shadow: 0 1px 2px rgba(0,0,0,.12); background: var(--table, #fff); }
.installed-myipas .home-tile { min-height: 58px; }

/* F82 Home's Reload while it reloads, as Cydia's loadingitem_ (CyteKit/WebViewController.mm): the same bordered nav
   button titled " " (so UIKit's 50pt minimum width), with UIActivityIndicatorViewStyleWhite (20pt, 12 spokes from
   r 4.5 to 9.5, the brightest at 9 o'clock with five fading behind it, the rest at 27%) added inside it at x 15, y 5:
   centred in the bezel. The bezel stays as it is, never pressed or dimmed. */
.bar-button.is-reloading {
  position: relative; width: 50px; min-width: 50px; padding: 0; color: transparent; text-shadow: none; cursor: default;
}
.bar-button.is-reloading::after {
  content: ""; position: absolute; left: 14px; top: 4px; width: 20px; height: 20px; /* 15,5 less the 1px border */
  background: var(--spinner-white) center / 20px no-repeat;
  animation: hud-spin .96s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .bar-button.is-reloading::after { animation-duration: 3s; } }
.home-version.home-commit { margin-top: -10px; font-size: 13px; opacity: .8; }
.home-commit:empty { display: none; }

/* Credits' Special Thanks: big rows like a package page's header: a 58px picture, name, handle, then what for. */
.thanks-row .cell-inner { padding-top: 10px; padding-bottom: 10px; gap: 12px; }
.thanks-row .cell-icon { position: relative; overflow: hidden; width: 58px; height: 58px; border-radius: 11px; font-size: 26px; }
.thanks-row .cell-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: #fff; }
.thanks-row .cell-icon img.loaded { opacity: 1; }
.thanks-row .cell-subtitle { white-space: pre-line; overflow-wrap: anywhere; line-height: 18px; margin-top: 2px; }

/* Website, before Cydian is installed: rows below the Cydian App card are disabled, iOS 6 style: dimmed text and
   icons, and a small grey padlock where the chevron was (screens/home.js, websign-gate.js askToBrowse). */
.home-locked .cell-label, .home-locked .cell-detail, .home-locked .cell-subtitle { color: #a3a8af !important; text-shadow: none; }
.home-locked .home-glyph, .home-locked .cell-icon { filter: grayscale(1); opacity: .45; }
.home-locked .cell-inner.chevron::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath fill='%23a3a8af' d='M3 6V4.2a3 3 0 0 1 6 0V6h.6c.8 0 1.4.6 1.4 1.4v5.2c0 .8-.6 1.4-1.4 1.4H2.4C1.6 14 1 13.4 1 12.6V7.4C1 6.6 1.6 6 2.4 6H3zm1.5 0h3V4.2a1.5 1.5 0 0 0-3 0V6z'/%3E%3C/svg%3E") center / 11px 14px no-repeat !important;
  border: 0 !important; transform: none !important; width: 12px !important; height: 15px !important;
}
.home-locked .cell-inner:active, .home-locked .cell-inner.is-pressed { background: none !important; }
html[data-theme="dark"] .home-locked .cell-label, html[data-theme="dark"] .home-locked .cell-detail { color: #6c7178 !important; }

/* "Install Full Cydian" (the website, for a jailbroken phone): its own purple tile, an open padlock for the glyph
   (drawn here: an unlocked lock, jailbreak's usual sign; not anyone's artwork). */
.home-row.purple > .table { background: linear-gradient(#7d4fc4, #5b2fa3); border-color: #3f1d78; }
.home-row.purple .cell-label, .home-row.purple .cell-subtitle { color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.35); }
.home-row.purple .cell-subtitle { opacity: .85; }
.home-row.purple .cell-inner.chevron::after { border-color: rgba(255,255,255,.85); }
.home-row.purple .home-tile { min-height: 58px; }
.glyph-jailbreak { background-color: #2b1158; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' d='M8 10.5V7.5a4 4 0 0 1 7.6-1.7'/%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2' fill='%23fff'/%3E%3Ccircle cx='12' cy='15' r='1.6' fill='%232b1158'/%3E%3Cpath d='M12 15.5v2.3' stroke='%232b1158' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* F135/F159: Home's Settings row, a tile glyph (grey square, white gear) with the tiles' inset and gap, so its icon
   and label line up with the tiles above. */
.home-settings-row > .cell-inner { padding: 0 10px 0 6px; gap: 8px; }
.glyph-settings { background-color: #8e8e93; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23fff' stroke-width='3.4' stroke-dasharray='3.534 3.534'/%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M12 4.5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15zm0 4.2a3.3 3.3 0 1 0 0 6.6 3.3 3.3 0 0 0 0-6.6z'/%3E%3C/svg%3E"); }
