/* The page frame: main, panels and their title strips, section headings. Split out of style.css (issue #159). */

/* A small label over a title; in a panel's title strip (.panel-head). */
.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

/* Generic card used for the upload form, the summary block, and each
   per-page block -- one visual language for every section of the page. */
.panel {
  background: linear-gradient(145deg, rgba(21, 29, 42, 0.98), rgba(17, 23, 34, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2vw, 1.65rem);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.05rem;
}

.section-heading h2, .section-heading h3 { margin: 0; font-weight: 680; letter-spacing: -0.02em; }

.section-heading h2 { font-size: clamp(1.2rem, 2vw, 1.48rem); }

.section-copy { max-width: 780px; margin: 0.32rem 0 0; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 900px) {
  main { padding-left: 1rem; padding-right: 1rem; }
  .section-heading { align-items: stretch; flex-direction: column; }
}

@media (max-width: 620px) {
  main { padding-top: 1rem; }
  .section-heading .secondary-button { align-self: flex-start; }
}

main {
  max-width: 1680px;
  padding: 2.1rem 2rem 6rem;
}

#projects-view,
#test-view {
  animation: jis-view-in 300ms ease both;
}

/* A panel: white (dark theme: slate) with a faint shadow and no border, as
   in the keskuskuvaskanneri. --panel-pad is its padding, which the title
   strip below reaches past. */
.panel {
  --panel-pad: 1.1rem;
  padding: var(--panel-pad);
  border: 0;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* The panel's title strip: dark in both themes, across the panel's top
   edge; the negative margins undo the panel's padding. index.html's panels
   have a .panel-head. the UI's panels get the strip on the heading they
   already start with: Testitila's page heading, the project's name in the
   sidebar and the page panel's Edellinen / Seuraava row. */
.panel-head,
.panel > h3:first-child,
.document-sidebar .sidebar-project-name,
.project-page-panel > .page-navigation {
  margin: calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) var(--panel-pad);
  padding: 0.6rem var(--panel-pad);
  color: var(--panel-head-text);
  background: var(--panel-head);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
}

.panel-head h2 { margin: 0; font: inherit; }

.panel-head .eyebrow { margin: 0; color: var(--bar-muted); }

.panel-head + .section-copy { margin: 0 0 1rem; }

.section-heading .section-copy { margin: 0; }

.section-heading {
  margin-bottom: 1.15rem;
}

.section-heading h2,
.section-heading h3 {
  font-weight: 760;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(1.28rem, 2vw, 1.65rem);
}

.section-copy {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

@media (max-width: 700px) {
  main { padding: 1rem 0.8rem 4rem; }
  .panel { --panel-pad: 0.9rem; }
  .section-heading { gap: 0.8rem; }
}
