@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500&display=swap");
/* User flows and style guides for the case studies, in the homepage paper palette.
   Both sit on the same white card so they read as one family next to the paper-note cards. */

/* Shared card and header row. */
:is(.uflow, .sg) { margin: 44px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px 24px; }
.uflow-head { display: flex; justify-content: space-between; gap: 16px; font: 400 11px/1.5 "DM Sans", Arial, sans-serif; letter-spacing: .08em; color: rgba(0, 0, 0, .6); margin-bottom: 16px; }
.uflow-head span:first-child { color: var(--accent); }
.uflow-head--next { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }

/* User flow: an SVG flowchart (rectangle = screen, slanted = user action, diamond = decision, outlined = what the app does).
   Each flow ships a wide layout and a tall one; phones get the tall one, so nothing scrolls sideways. */
.uflow-svg { display: block; width: 100%; height: auto; }
.uflow-svg--tall { display: none; max-width: 420px; margin: 0 auto; }
.uflow-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font: 400 12px/1.5 "DM Sans", Arial, sans-serif; color: #58616b; }
.uflow-legend li { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 22px; height: 12px; }
.lg--screen { background: #add6f7; border-radius: 3px; }
.lg--action { background: #fdd1ba; transform: skewX(-20deg); }
.lg--decision { width: 12px; height: 12px; margin: 0 5px; background: #c8d665; transform: rotate(45deg); }
.lg--system { border: 1.5px solid #35414f; border-radius: 3px; }
.lg--stop { border: 1.5px dashed #7d8792; border-radius: 8px; }
.lg--back, .lg--note { height: 0; border-top: 2px dashed #35414f; }
.lg--note { border-top-color: #7d8792; }
.uflow :is(.caption, .cap) { margin-top: 14px; }

/* Style guide: one board for colour and type. Colours are sampled from each case study's designed screens.
   Text blocks are divs, not paragraphs, so the shared 14px paragraph rule doesn't flatten the specimen sizes. */
.sg-label { margin: 34px 0 14px; font: 400 11px/1.5 "DM Sans", Arial, sans-serif; letter-spacing: .08em; color: rgba(0, 0, 0, .6); }
.sg-label--rule { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.sg-word { margin-top: 6px; font: 500 clamp(72px, 12vw, 150px)/.92 "Inter", Arial, sans-serif; letter-spacing: -.055em; white-space: nowrap; }
.sg-word .sg-lt { -webkit-text-stroke: 1.5px rgba(53, 65, 79, .2); paint-order: stroke fill; }

/* Swatches and type cards lean like the site's paper notes. */
.sg-neutrals { display: grid; grid-template-columns: repeat(var(--sg-cols, 3), 1fr); gap: 16px; padding: 4px 2px; }
.sg-swatch { min-height: 136px; padding: 15px 17px; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; color: #181818; box-shadow: inset 0 0 0 1px rgba(53, 65, 79, .14); transform: rotate(-.8deg); }
.sg-swatch:nth-child(even) { transform: rotate(.8deg); }
.sg-swatch-top { display: flex; justify-content: space-between; gap: 10px; font: 600 15px/1.3 "Inter", Arial, sans-serif; }
.sg-swatch-top span { font-weight: 400; color: #5c5c5c; }
.sg-swatch-use { font-size: 12px; line-height: 1.4; color: #4a4a4a; }
.sg-swatch--dark { color: #f2f1f1; box-shadow: none; }
.sg-swatch--dark .sg-swatch-top span { color: #c8c8c8; }
.sg-swatch--dark .sg-swatch-use { color: #d6d6d6; }
.sg-swatch--mid, .sg-swatch--mid :is(.sg-swatch-top span, .sg-swatch-use) { color: #111; }

.sg-blobs { display: grid; grid-template-columns: repeat(var(--sg-blob-cols, 4), 1fr); gap: 22px; align-items: end; }
.sg-blobs--one { grid-template-columns: minmax(0, 260px) 1fr; gap: 34px; }
.sg-blob { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.sg-shape { position: relative; width: 100%; height: 112px; margin-bottom: 10px; }
.sg-blobs--one .sg-shape { height: 132px; }
.sg-shape i { position: absolute; bottom: 0; border-radius: 50%; background: var(--c); }
.sg-blob--light .sg-shape i { box-shadow: inset 0 0 0 1px rgba(53, 65, 79, .16); }
.sg-blob b { font: 600 14px/1.3 "Inter", Arial, sans-serif; color: var(--ink); }
.sg-blob small { font-size: 12px; line-height: 1.4; color: #5b6570; }
.sg-blob-note { margin-bottom: 34px; max-width: 420px; font-size: 15px; line-height: 1.6; color: #58616b; }

.sg-specimen { font: 500 clamp(72px, 12vw, 150px)/.95 var(--sg-font, "DM Sans"), Arial, sans-serif; letter-spacing: -.05em; margin: 6px 0 28px; white-space: nowrap; color: var(--ink); }
.sg-specimen span { color: var(--sg-accent); }
.sg-serif { display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: baseline; margin: -6px 0 30px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sg-serif-sample { font: 400 clamp(28px, 3.4vw, 40px)/1.1 "EB Garamond", Georgia, serif; color: var(--ink); }
.sg-serif-sample span { color: #7d8792; }
.sg-serif-use { font-size: 13px; line-height: 1.5; color: #55585b; }
.sg-type-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: end; }
.sg-statement { font: 500 clamp(20px, 2.2vw, 26px)/1.25 var(--sg-font, "DM Sans"), Arial, sans-serif; letter-spacing: -.01em; margin-bottom: 14px; color: var(--ink); }
.sg-note { font-size: 13px; line-height: 1.55; color: #55585b; margin-bottom: 18px; max-width: 360px; }
.sg-weights { display: flex; gap: 22px; font: 15px/1.4 var(--sg-font, "DM Sans"), Arial, sans-serif; color: var(--ink); }
.sg-glyphs { font: 13px/1.75 var(--sg-font, "DM Sans"), Arial, sans-serif; letter-spacing: .06em; color: #55585b; margin-bottom: 22px; }
.sg-cards { position: relative; height: 196px; }
.sg-cards span { position: absolute; border-radius: 12px; padding: 6px 22px; font: 500 100px/1 var(--sg-font, "DM Sans"), Arial, sans-serif; letter-spacing: -.04em; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(53, 65, 79, .12); }
.sg-cards .sg-aa { top: 0; right: 0; width: 74%; height: 114px; text-align: right; background: var(--sg-a); color: var(--sg-a-ink, #181818); transform: rotate(1.5deg); }
.sg-cards .sg-bb { left: 0; bottom: 0; width: 58%; height: 126px; padding-top: 14px; background: var(--sg-b); color: var(--sg-b-ink, #181818); transform: rotate(-2deg); }

@media (max-width: 960px) { .sg-neutrals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  :is(.uflow, .sg) { padding: 16px 16px 20px; margin-left: -6px; margin-right: -6px; }
  .uflow-svg--wide { display: none; }
  .uflow-svg--tall { display: block; }
  .uflow :is(.caption, .cap) > span:last-child { display: block; margin-top: 6px; }
  .sg-neutrals { grid-template-columns: 1fr; }
  .sg-swatch { min-height: 96px; }
  .sg-blobs { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .sg-blobs--one { grid-template-columns: 1fr; gap: 6px; }
  .sg-serif { grid-template-columns: 1fr; }
  .sg-type-grid { grid-template-columns: 1fr; gap: 26px; }
  .sg-cards { height: 172px; }
  .sg-cards span { font-size: 82px; }
  .sg-cards .sg-aa { height: 98px; }
  .sg-cards .sg-bb { height: 110px; }
}
