/* Brogue (brogue.site): the shoemaker's bench meets the gentleman's-club newspaper.
   Oxford-shirt blue paper, cordovan leather, brass. Every edge is a row of punched holes,
   one corner of every feature box is cut as a wingtip. Loaded only on this title's pages;
   every class and keyframe is prefixed brogue-. */

/* ---------- textures ---------- */
.brogue-weave {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgb(22 26 34 / .045) 0 1px, #0000 1px 3px),
    repeating-linear-gradient(90deg, rgb(22 26 34 / .035) 0 1px, #0000 1px 3px);
}
.brogue-leather {
  --bg: #7a2618; --fg: #fff8f0; --muted: #e9cfc2; --line: rgb(255 240 230 / .22); --surface: #6a1f13; --accent: #f1d9a6; --on-accent: #3a1009;
  background-color: #7a2618; color: #fff8f0;
  background-image:
    radial-gradient(rgb(255 255 255 / .035) 1px, #0000 1.4px),
    linear-gradient(180deg, rgb(255 255 255 / .05), rgb(0 0 0 / .1));
  background-size: 3px 3px, 100% 100%;
}
.brogue-ink { --bg: #161a22; --fg: #eef2f7; --muted: #aab3c2; --line: rgb(238 242 247 / .16); --surface: #1f2430; background-color: #161a22; color: #eef2f7; }

/* ---------- perforations ---------- */
/* A row of punched holes: 4px holes every 10px with a smaller hole between each pair. */
.brogue-perf {
  --pc: var(--accent);
  height: 8px;
  background:
    radial-gradient(circle, var(--pc) 2px, #0000 2.5px) 0 50% / 10px 8px repeat-x,
    radial-gradient(circle, color-mix(in srgb, var(--pc) 75%, transparent) 1px, #0000 1.5px) 5px 50% / 10px 8px repeat-x;
}
.brogue-perf-muted { --pc: color-mix(in srgb, var(--fg) 30%, transparent); }
.brogue-perf-line { --pc: var(--line); }

/* Vertical column rule, drawn on the left edge of a column (lg+ only, see .brogue-col). */
@media (min-width: 1024px) {
  .brogue-col {
    background:
      radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent) 1.6px, #0000 2.1px) 0 0 / 8px 10px repeat-y,
      radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent) .9px, #0000 1.3px) 0 5px / 8px 10px repeat-y;
    padding-left: 28px;
  }
}

/* Small punched border on all four sides (menu button, avatars, chips). */
.brogue-perfbox {
  --pc: var(--accent);
  background-image:
    radial-gradient(circle, var(--pc) 1.2px, #0000 1.65px),
    radial-gradient(circle, var(--pc) 1.2px, #0000 1.65px),
    radial-gradient(circle, var(--pc) 1.2px, #0000 1.65px),
    radial-gradient(circle, var(--pc) 1.2px, #0000 1.65px);
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-size: 6px 5px, 6px 5px, 5px 6px, 5px 6px;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
}

/* Larger perforated frame (figures, newsletter box): big + small holes on all edges. */
.brogue-frame {
  --pc: var(--accent);
  padding: 14px;
  background-image:
    radial-gradient(circle, var(--pc) 2px, #0000 2.5px), radial-gradient(circle, color-mix(in srgb, var(--pc) 70%, transparent) 1px, #0000 1.4px),
    radial-gradient(circle, var(--pc) 2px, #0000 2.5px), radial-gradient(circle, color-mix(in srgb, var(--pc) 70%, transparent) 1px, #0000 1.4px),
    radial-gradient(circle, var(--pc) 2px, #0000 2.5px), radial-gradient(circle, color-mix(in srgb, var(--pc) 70%, transparent) 1px, #0000 1.4px),
    radial-gradient(circle, var(--pc) 2px, #0000 2.5px), radial-gradient(circle, color-mix(in srgb, var(--pc) 70%, transparent) 1px, #0000 1.4px);
  background-position: 0 0, 5px 0, 0 100%, 5px 100%, 0 0, 0 5px, 100% 0, 100% 5px;
  background-size: 10px 8px, 10px 8px, 10px 8px, 10px 8px, 8px 10px, 8px 10px, 8px 10px, 8px 10px;
  background-repeat: repeat-x, repeat-x, repeat-x, repeat-x, repeat-y, repeat-y, repeat-y, repeat-y;
}

/* ---------- the wingtip corner ---------- */
/* The top-right corner is cut as a sweeping curve with a W point; size it with --ww / --wh. */
.brogue-wing {
  --ww: 72px; --wh: 44px;
  -webkit-mask:
    linear-gradient(#000 0 0) 0 0 / calc(100% - var(--ww) + 1px) 100% no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--wh) - 1px) / 100% calc(100% - var(--wh) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0C14 0 24 7 31 18L38 13C52 20 72 28 72 44H0Z'/%3E%3C/svg%3E") 100% 0 / var(--ww) var(--wh) no-repeat;
  mask:
    linear-gradient(#000 0 0) 0 0 / calc(100% - var(--ww) + 1px) 100% no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--wh) - 1px) / 100% calc(100% - var(--wh) + 1px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44' preserveAspectRatio='none'%3E%3Cpath d='M0 0C14 0 24 7 31 18L38 13C52 20 72 28 72 44H0Z'/%3E%3C/svg%3E") 100% 0 / var(--ww) var(--wh) no-repeat;
}
.brogue-wing-lg { --ww: 112px; --wh: 66px; }
.brogue-wing-sm { --ww: 40px; --wh: 25px; }
.brogue-wing-xs { --ww: 15px; --wh: 10px; }
/* A perforated seam that follows the cut, just inside it (on photos). */
.brogue-stitch { position: relative; }
.brogue-stitch::after {
  content: ''; position: absolute; top: 0; right: 0; width: var(--ww); height: calc(var(--wh) + 8px); pointer-events: none; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 52' preserveAspectRatio='none'%3E%3Cpath d='M-2 7C11 7 19.5 12.5 26 23.5L33.5 18.5C45 25.5 64.5 32 64.5 52' fill='none' stroke='%23f8f1e6' stroke-opacity='.92' stroke-width='2.4' stroke-linecap='round' stroke-dasharray='0 6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* ---------- the welt: the only shadow on the site ---------- */
.brogue-welt { box-shadow: 0 1px 0 rgb(122 38 24 / .3); }

/* ---------- buttons: sharp cordovan, one wingtip corner, hard 2px welt ---------- */
.brogue-btn {
  --ww: 15px; --wh: 10px;
  background-color: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .32);
  transition: background-color .15s, transform .1s;
}
.brogue-btn:hover { background-color: color-mix(in srgb, var(--accent) 86%, #fff); }
.brogue-btn:active { transform: translateY(1px); }
.brogue-btn-cordovan { --accent: #7a2618; --on-accent: #fff; }

/* ---------- live label: the strap ---------- */
.brogue-strap {
  background-image: radial-gradient(circle, rgb(255 255 255 / .55) .9px, #0000 1.3px);
  background-position: 4px 1px; background-size: 6px 4px; background-repeat: repeat-x;
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / calc(100% - 13px) 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0H4C10 4 14 9 9.5 14C14 19 10 24 4 28H0Z'/%3E%3C/svg%3E") 100% 0 / 14px 100% no-repeat;
  mask: linear-gradient(#000 0 0) 0 0 / calc(100% - 13px) 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 28' preserveAspectRatio='none'%3E%3Cpath d='M0 0H4C10 4 14 9 9.5 14C14 19 10 24 4 28H0Z'/%3E%3C/svg%3E") 100% 0 / 14px 100% no-repeat;
}
.brogue-pulse circle + circle { opacity: .3; animation: brogue-hole 1.6s linear infinite both; }
@keyframes brogue-hole { 0% { opacity: 1; } 34% { opacity: .3; } 100% { opacity: .3; } }

/* ---------- links: perforation dots underneath, solid on hover ---------- */
.brogue-a {
  background: radial-gradient(circle, var(--accent) .95px, #0000 1.35px) 0 100% / 4px 3px repeat-x;
  padding-bottom: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.brogue-a:hover, .brogue-a:focus-visible { background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - .5px) / 100% 1.5px no-repeat; color: var(--accent); }
/* Headlines: the dots appear under the headline when its card is hovered. */
.brogue-h { -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-bottom: 1px; }
.group:hover .brogue-h, .group:focus-visible .brogue-h { background: radial-gradient(circle, var(--accent) 1.1px, #0000 1.5px) 0 100% / 5px 3px repeat-x; }

/* ---------- kicker: slab caps + a short welt line ---------- */
.brogue-kick::after { content: ''; display: inline-block; width: 22px; height: 2px; margin-left: 8px; vertical-align: .3em; background: currentColor; opacity: .55; box-shadow: 0 2px 0 rgb(122 38 24 / .2); }

/* ---------- bylines: pen-and-ink head sketches, square, perforated edge ---------- */
.brogue-sketch { --pc: color-mix(in srgb, var(--accent) 70%, transparent); padding: 3px; background-color: var(--surface); }
.brogue-sketch img { filter: grayscale(1) contrast(1.08); mix-blend-mode: multiply; }

/* ---------- carousel edge fade ---------- */
.brogue-fade { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 36px), #0000); mask: linear-gradient(90deg, #000 calc(100% - 36px), #0000); }
@media (min-width: 1024px) { .brogue-fade { -webkit-mask: none; mask: none; } }

/* ---------- reading text ---------- */
.brogue-prose { font-size: 18px; line-height: 1.7; color: var(--fg); }
@media (min-width: 768px) { .brogue-prose { font-size: 19px; } }
.brogue-prose > * + * { margin-top: 1.05em; }
.brogue-prose h2 { font-family: var(--font-head), Georgia, serif; font-weight: 700; font-size: 1.42em; line-height: 1.18; margin-top: 2em; scroll-margin-top: 6rem; }
.brogue-prose h2::before {
  content: ''; display: block; width: 76px; height: 8px; margin-bottom: .65em;
  background: radial-gradient(circle, var(--accent) 2px, #0000 2.5px) 0 50% / 10px 8px repeat-x, radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent) 1px, #0000 1.5px) 5px 50% / 10px 8px repeat-x;
}
.brogue-prose h3 { font-family: var(--font-head), Georgia, serif; font-weight: 700; font-size: 1.12em; line-height: 1.25; margin-top: 1.6em; }
.brogue-prose a { color: var(--fg); text-decoration: none; background: radial-gradient(circle, var(--accent) .95px, #0000 1.35px) 0 100% / 4px 3px repeat-x; padding-bottom: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.brogue-prose a:hover { color: var(--accent); background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - .5px) / 100% 1.5px no-repeat; }
.brogue-prose strong { font-weight: 700; }
.brogue-prose ul { padding-left: 0; list-style: none; }
.brogue-prose ul > li { position: relative; padding-left: 1.45em; }
.brogue-prose ul > li::before {
  content: ''; position: absolute; left: .1em; top: .52em; width: 11px; height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%237a2618'%3E%3Ccircle cx='6' cy='6' r='1.5'/%3E%3Ccircle cx='6' cy='1.6' r='1'/%3E%3Ccircle cx='9.1' cy='2.9' r='1'/%3E%3Ccircle cx='10.4' cy='6' r='1'/%3E%3Ccircle cx='9.1' cy='9.1' r='1'/%3E%3Ccircle cx='6' cy='10.4' r='1'/%3E%3Ccircle cx='2.9' cy='9.1' r='1'/%3E%3Ccircle cx='1.6' cy='6' r='1'/%3E%3Ccircle cx='2.9' cy='2.9' r='1'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.brogue-prose ol { list-style: decimal; padding-left: 1.5em; }
.brogue-prose ol > li::marker { font-family: var(--font-head), Georgia, serif; font-weight: 700; color: var(--accent); }
.brogue-prose li + li { margin-top: .45em; }
/* Pull quote: large Manuale italic under a cordovan slab quote mark the size of a heel. */
.brogue-prose blockquote { margin: 1.8em 0; padding: 0; border: 0; font-style: italic; font-size: 1.38em; line-height: 1.32; font-weight: 500; }
@media (min-width: 768px) { .brogue-prose blockquote { font-size: 1.6em; margin-left: -.1em; } }
.brogue-prose blockquote::before { content: '\201C'; display: block; height: .5em; margin-bottom: .1em; font-family: var(--font-head), Georgia, serif; font-style: normal; font-weight: 800; font-size: 3.4em; line-height: .9; color: var(--accent); }
.brogue-prose blockquote p + p { margin-top: .6em; }
.brogue-prose hr { border: 0; height: 8px; background: radial-gradient(circle, var(--accent) 2px, #0000 2.5px) 50% 50% / 10px 8px repeat-x; width: 120px; }

/* Drop cap: a 3-line cordovan slab initial set inside a perforated medallion ring. */
.brogue-drop {
  float: left; display: grid; place-items: center; width: 5.1em; height: 5.1em; margin: .3em .55em .1em 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%237a2618' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='46' stroke-width='3.4' stroke-dasharray='0 9.032'/%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='1.7' stroke-opacity='.75' stroke-dasharray='0 7.854' stroke-dashoffset='3.9'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.brogue-drop > span { font-family: var(--font-head), Georgia, serif; font-weight: 800; font-size: 3em; line-height: 1; color: var(--accent); transform: translateY(.03em); }

/* Newsletter form inside our perforated boxes: square fields, cordovan button with a welt. */
.brogue-form input { border-radius: 0 !important; background: var(--surface) !important; border-color: color-mix(in srgb, var(--fg) 28%, transparent) !important; }
.brogue-form button { border-radius: 0 !important; background: #7a2618 !important; color: #fff !important; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .32); font-family: var(--font-head), Georgia, serif; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; }
.brogue-form form > div { border-radius: 0 !important; }

/* Share bar buttons squared to match. */
.brogue-share a, .brogue-share button { border-radius: 0 !important; }

/* Today's cell in The Rotation. */
.brogue-today { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  .brogue-pulse circle + circle { animation: none; opacity: 1; }
  .brogue-btn { transition: none; }
}

/* End-of-story shoe tree and the vertical perforation between paired photos. */
.brogue-end { display: inline-block; width: 1.9em; height: .8em; color: var(--accent); vertical-align: -.02em; }
.brogue-perf-v {
  width: 8px;
  background:
    radial-gradient(circle, var(--accent) 2px, #0000 2.5px) 50% 0 / 8px 10px repeat-y,
    radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent) 1px, #0000 1.5px) 50% 5px / 8px 10px repeat-y;
}
.brogue-prose p:has(> .brogue-drop) { min-height: 5.4em; }
/* Lists and quotes sit beside a floated detail photo as blocks, so their markers never slide under it. */
.brogue-prose ul, .brogue-prose ol, .brogue-prose blockquote { display: flow-root; }
