/* slices.css — LAYOUT ONLY.
 *
 * Every component on this page is the brand's: `card` and `card-selectable` for
 * the tiles, `btn btn-primary` for the submit, and brand.css's own element rules
 * for inputs and labels. What is left here is where things sit — the grid's
 * columns, the gaps, and the two rules that undo the editor's viewport lock.
 *
 * That division is the point. A tile styled here would be a second answer to
 * "what does a card look like", free to drift from the first, and the borders,
 * corners and hover behaviour are exactly the things this page got wrong by
 * inventing them: 1px hairlines, rounded corners, and a hover that changed a
 * border colour instead of lifting. Border radius is always 0, every border is
 * 2px, and a card that does something carries the toy affordance. */

/* This page wears the shared navbar and no announce strip. --header-h is
 * derived from --announce-h, so leaving it at 40px would have anything clearing
 * the header reserve a band that is not there. HQ zeroes it for the same
 * reason. */
:root {
  --announce-h: 0px;
}

/* configurator.css pins the document to the viewport and hides its overflow,
 * because the editor is two columns that scroll independently. A grid is one
 * column that grows, so it scrolls as a page. */
body {
  height: auto;
  overflow: auto;
}

main#app {
  height: auto;
  /* The navbar is in normal flow above this, so the page fills the rest of the
     viewport rather than a whole one — otherwise every visit has a scrollbar
     for the height of the bar. */
  min-height: calc(100vh - var(--nav-h));
  /* The navbar's container geometry, not the editor's. The editor is a form at
     1200px; this page sits under a wordmark, and a heading that does not start
     where the wordmark starts reads as two surfaces stacked rather than one. */
  max-width: var(--max-width);
  padding-left: var(--padding);
  padding-right: var(--padding);
}

/* ---------- The grid ---------- */

.grid {
  display: grid;
  /* auto-fill, not auto-fit: with auto-fit a single slice stretches its tile
     across the whole row, which reads as a banner rather than as one of a set. */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 10px;
  /* The toy affordance lifts a tile 4px and drops a hard shadow 4px below it.
     Without room the lift clips against the row above and the shadow against
     the one below. */
  padding: 4px 0 8px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
}

.tile-name {
  font-size: 1.05rem;
  font-weight: 600;
  /* A slice name is user-chosen and up to 32 characters; it wraps rather than
     spilling out of the tile or being cut off mid-word. */
  overflow-wrap: anywhere;
}

.tile-counts {
  font-size: 13px;
  font-weight: 300;
  /* Pushes the cost to the bottom edge, so every tile's price sits on one line
     across the row however much the middle holds. */
  flex: 1 1 auto;
}

.tile-cost {
  font-size: 13px;
  font-weight: 600;
}

/* The last tile. It is a card like the others — same border, same corners, same
   lift — and says what it is with a mark rather than with a different edge. */
.tile--new {
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
}

.tile-plus {
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
}

.grid-foot {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
}

/* Sign out is a link, not a button: it is one quiet action in a footer line,
   and a filled control there would outrank every tile above it.
   Ink with an underline, which is how this system draws a link — the underline
   IS the signal, so a link never spends one of the three pillar colours.
   Orange, purple and green mean Atomic, Backbone and Canvas everywhere else. */
.linkish {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink-subtle);
  text-underline-offset: 3px;
}

.linkish:hover {
  text-decoration-color: var(--ink);
}

/* ---------- Sign-in ---------- */

#signin {
  max-width: 340px;
  margin: 6vh auto 0;
}

#signin-form {
  display: flex;
  flex-direction: column;
}

.signin-lead {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}

/* brand.css gives inputs their fill, border, corners and weight. Only the
   rhythm between the fields belongs to this page. */
#signin input {
  margin-bottom: 10px;
}

#signin .btn {
  margin-top: 6px;
  /* The one button on the page, so it spans the form rather than sitting in a
     row of one. */
  width: 100%;
}

.signin-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--error);
}

.signin-note {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
}
