/* 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; }
.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; }
.home-nod { margin-top: 0; font-size: 15px; line-height: 19px; }

/* 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: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg stroke='%23fff' stroke-width='2.1' stroke-linecap='round'%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(0 10 10)' opacity='0.27'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(30 10 10)' opacity='0.27'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(60 10 10)' opacity='0.27'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(90 10 10)' opacity='0.27'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(120 10 10)' opacity='0.4'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(150 10 10)' opacity='0.5'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(180 10 10)' opacity='0.6'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(210 10 10)' opacity='0.72'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(240 10 10)' opacity='0.85'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(270 10 10)' opacity='1'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(300 10 10)' opacity='0.27'/%3E%3Cline x1='10' y1='1.4' x2='10' y2='5.4' transform='rotate(330 10 10)' opacity='0.27'/%3E%3C/g%3E%3C/svg%3E") center / 20px no-repeat;
  animation: hud-spin .96s steps(12) 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; }
