@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&display=swap');

/* =========================================================
   ListFormatting.com — Master Stylesheet
   index.html
   column-formatting-gallery.html
   view-formatting-gallery.html
   ========================================================= */

/* ---------------------------------------------------------
   GLOBAL TOKENS / RESET
   --------------------------------------------------------- */

:root{
  --bg:#f6f8fb;
  --surface:#ffffff;
  --surface-soft:#f0f4f8;
  --text:#18212f;
  --muted:#647084;
  --border:#dbe2ea;
  --accent:#0f6cbd;
  --accent-dark:#0b4f8a;
  --shadow:0 10px 30px rgba(24,33,47,.08);
  --shadow-soft:0 4px 16px rgba(24,33,47,.06);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 15% 0%,rgba(15,108,189,.08),transparent 34%),
    linear-gradient(180deg,#fbfcfe 0%,var(--bg) 38%,#f7f9fb 100%);
}

a{color:inherit}


/* ---------------------------------------------------------
   SHARED SITE TOP BAR
   --------------------------------------------------------- */

.site-topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid #dbe2ea;
  backdrop-filter:blur(10px);
}

.site-topbar-inner{
  max-width:1500px;
  margin:0 auto;
  padding:10px 28px;
  min-height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
}

.site-brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  min-width:0;
}

.site-brand img{
  width:78px;
  height:52px;
  object-fit:contain;
  display:block;
  flex:0 0 auto;
}

.site-wordmark{
  display:flex;
  align-items:baseline;
  white-space:nowrap;
}

.word-list,
.word-formatting{
  font-family:"Aptos","Segoe UI",sans-serif;
  font-size:28px;
  font-weight:750;
  letter-spacing:-.045em;
}

.word-list{
  color:#172554;
  margin-right:6px;
}

.word-formatting{
  background:linear-gradient(90deg,#0f6cbd,#00a4ef,#00b7c3);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.word-domain{
  font-family:Georgia,"Times New Roman",serif;
  font-size:14px;
  font-weight:400;
  font-style:italic;
  letter-spacing:0;
  color:#7b8492;
  margin-left:5px;
  position:relative;
  top:-1px;
}

.site-nav{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.site-nav a{
  color:#354052;
  text-decoration:none;
  font-size:14px;
  font-weight:650;
  padding:9px 12px;
  border-radius:8px;
  transition:background .15s ease,color .15s ease;
}

.site-nav a:hover{
  background:#f0f4f8;
  color:#0f6cbd;
}

.site-nav a[aria-current="page"]{
  background:#eaf3fb;
  color:#0f6cbd;
}


/* =========================================================
   HOME PAGE
   ========================================================= */

.shell{
  max-width:1480px;
  margin:0 auto;
  padding:0 28px;
}

.hero{
  padding:68px 0 44px;
  text-align:center;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:18px;
}

.hero h1{
  margin:0 auto;
  max-width:1050px;
  font-size:clamp(38px,5vw,68px);
  line-height:1.03;
  letter-spacing:-.035em;
  font-weight:750;
}

.subhead{
  margin:18px auto 0;
  max-width:820px;
  font-size:clamp(18px,2vw,24px);
  color:var(--muted);
  line-height:1.45;
}

.pnp-link{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-top:24px;
  text-decoration:none;
  font-size:15px;
  color:var(--accent);
  font-weight:650;
}

.pnp-link:hover{text-decoration:underline}


/* Home page catalog tiles */

.catalog{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:26px;
  padding:8px 0 68px;
}

.catalog-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.catalog-top{
  min-height:330px;
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  text-decoration:none;
  position:relative;
  background:
    linear-gradient(140deg,rgba(15,108,189,.08),rgba(255,255,255,.9)),
    var(--surface);
}

.catalog-top::after{
  content:"";
  position:absolute;
  right:-80px;
  top:-90px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(15,108,189,.08);
}

.kicker{
  font-size:13px;
  font-weight:750;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:12px;
}

.catalog-title{
  font-size:clamp(28px,3vw,40px);
  line-height:1.05;
  margin:0;
  letter-spacing:-.025em;
}

.catalog-copy{
  margin:14px 0 0;
  max-width:560px;
  color:var(--muted);
  font-size:16px;
  line-height:1.55;
}

.cta{
  margin-top:30px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--accent-dark);
  font-weight:700;
  font-size:15px;
}


/* Home featured additions */

.featured{
  border-top:1px solid var(--border);
  padding:24px;
  background:#fcfdff;
}

.featured-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:15px;
  margin-bottom:16px;
}

.featured h3{
  margin:0;
  font-size:16px;
  letter-spacing:-.01em;
}

.featured-note{
  color:var(--muted);
  font-size:12px;
}

.mini-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}

.mini{
  text-decoration:none;
  display:block;
  min-width:0;
}

.mini-thumb{
  aspect-ratio:1.25/1;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:6px;
  box-shadow:var(--shadow-soft);
}

.mini-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.mini-title{
  margin-top:7px;
  font-size:11px;
  line-height:1.3;
  color:#354052;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.placeholder{
  color:#8a94a5;
  font-size:10px;
  text-align:center;
  padding:8px;
}

.loading{
  color:var(--muted);
  font-size:12px;
  padding:8px 0;
}


/* Home / global site footer */

body > footer{
  border-top:1px solid var(--border);
  padding:24px 0 42px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}

body > footer a{
  color:var(--accent-dark);
  text-decoration:none;
}

body > footer a:hover{
  text-decoration:underline;
}


/* =========================================================
   GALLERY PAGES
   The :has(.gallery-header) selector intentionally restores
   the original gallery page palette/background.
   ========================================================= */

body:has(.gallery-header){
  --bg:#f6f8fa;
  --card:#fff;
  --text:#1f2328;
  --muted:#656d76;
  --border:#d0d7de;
  --accent:#0969da;

  background:#f6f8fa;
  color:#1f2328;
}

.gallery-header{
  position:relative;
  z-index:1;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #d0d7de;
  backdrop-filter:blur(8px);
}

.wrap{
  max-width:1500px;
  margin:auto;
  padding:22px 28px;
}

.gallery-header h1{
  font-size:28px;
  line-height:normal;
  font-weight:700;
  letter-spacing:normal;
  max-width:none;
  margin:0 0 5px;
}

.gallery-header .sub{
  color:#656d76;
  font-size:14px;
  margin-bottom:16px;
}

.gallery-header .controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.gallery-header .controls input{
  flex:1;
  min-width:250px;
  padding:10px 12px;
  border:1px solid #d0d7de;
  border-radius:7px;
  font-family:inherit;
  font-size:15px;
  background:#fff;
  color:#1f2328;
}

.gallery-header .count{
  font-size:13px;
  color:#656d76;
  white-space:nowrap;
}

main.wrap{
  padding-top:28px;
}

main.wrap .status{
  padding:24px;
  border:1px dashed #d0d7de;
  border-radius:10px;
  background:#fff;
  color:#656d76;
}

main.wrap .grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(290px,1fr));
  gap:20px;
}

main.wrap .card{
  background:#fff;
  border:1px solid #d0d7de;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(31,35,40,.06);
  display:flex;
  flex-direction:column;
  min-height:320px;
}

main.wrap .preview{
  height:210px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid #d0d7de;
  padding:14px;
}

main.wrap .preview img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
}

main.wrap .noimg{
  color:#656d76;
  font-size:13px;
  text-align:center;
  padding:25px;
}

main.wrap .card .body{
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:9px;
  flex:1;
}

main.wrap .card .title{
  font-size:17px;
  font-weight:650;
  line-height:1.3;
}

main.wrap .card .folder{
  font-size:12px;
  color:#656d76;
  overflow-wrap:anywhere;
}

main.wrap .card .link{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#0969da;
  font-weight:600;
  text-decoration:none;
  font-size:14px;
}

main.wrap .card .link:hover{
  text-decoration:underline;
}

/* This is the small "Source: github..." footer inside main,
   not the full site footer below it. */
main.wrap > footer{
  border:0;
  padding:30px 0 60px;
  color:#656d76;
  font-size:12px;
  text-align:center;
}


.share-button{
  border:1px solid var(--border);
  background:#fff;
  color:#354052;
  font:inherit;
  font-size:14px;
  font-weight:650;
  padding:9px 12px;
  border-radius:8px;
  cursor:pointer;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}

.share-button:hover{
  background:#f0f4f8;
  color:var(--accent);
  border-color:#c7d2df;
}

.share-button:focus-visible{
  outline:2px solid rgba(15,108,189,.25);
  outline-offset:2px;
}


.card-actions{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.card-actions .link{
  margin-top:0;
}

.sample-share{
  flex:0 0 auto;
  width:34px;
  height:34px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:0;
  border-radius:7px;

  background:transparent;
  color:#647084;

  cursor:pointer;

  transition:
    background .15s ease,
    color .15s ease;
}

.sample-share:hover{
  background:#f0f4f8;
  color:#0f6cbd;
}

.sample-share svg{
  display:block;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media(max-width:1050px){
  .catalog{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .site-topbar-inner{
    padding:9px 16px;
    gap:12px;
    align-items:flex-start;
    flex-direction:column;
  }

  .site-brand img{
    width:62px;
    height:42px;
  }

  .word-list,
  .word-formatting{
    font-size:21px;
  }

  .word-domain{
    font-size:11px;
  }

  .site-nav{
    width:100%;
    justify-content:flex-start;
    gap:2px;
  }

  .site-nav a{
    padding:7px 9px;
    font-size:13px;
  }
}

@media(max-width:700px){
  .shell{
    padding:0 16px;
  }

  .hero{
    padding-top:46px;
  }

  .catalog-top{
    min-height:270px;
    padding:26px;
  }

  .mini-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .mini:nth-child(5){
    grid-column:span 2;
    max-width:50%;
  }
}

@media(max-width:600px){
  .wrap{
    padding-left:16px;
    padding-right:16px;
  }

  main.wrap .grid{
    grid-template-columns:1fr;
  }
}
