/* =========================================
   DAILYSCROLLINO
========================================= */

:root {
  --paper: #f7f2e8;
  --ink: #171611;

  --yellow: #ffdc55;
  --pink: #ff70aa;
  --blue: #72cff5;
  --green: #a8e85d;
  --coral: #ff9b68;
  --lilac: #b99cff;
  --piazza: #74d7ca;

  --white: #fffdf7;

  --border: 2px solid var(--ink);
}


* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;

  background:
    radial-gradient(
      rgba(23, 22, 17, 0.035) 1px,
      transparent 1px
    ),
    var(--paper);

  background-size: 18px 18px;

  color: var(--ink);

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  line-height: 1.5;
}


button,
input,
textarea {
  font: inherit;
}


button {
  color: inherit;
}


button,
a {
  -webkit-tap-highlight-color: transparent;
}


a {
  color: inherit;
}


img {
  display: block;
  max-width: 100%;
}


[hidden] {
  display: none !important;
}


.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}



/* =========================================
   HEADER
========================================= */

.site-header {
  padding:
    42px
    20px
    18px;
}


.header-inner {
  width: min(760px, 100%);

  margin: 0 auto;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;

  border-bottom: 3px solid var(--ink);

  padding-bottom: 18px;
}


.site-header h1 {
  margin: 3px 0 0;

  font-size:
    clamp(2rem, 8vw, 4.7rem);

  line-height: 0.9;

  letter-spacing: -0.07em;

  font-weight: 900;
}


.eyebrow {
  margin: 0;

  font-size: 0.72rem;
  font-weight: 900;

  letter-spacing: 0.14em;
}


.header-tagline {
  margin: 0;

  flex-shrink: 0;

  text-align: right;

  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}



/* =========================================
   MAIN
========================================= */

.daily {
  width: min(700px, calc(100% - 28px));

  margin: 24px auto 80px;
}


.card {
  position: relative;

  margin: 32px 0;

  padding:
    clamp(25px, 6vw, 44px);

  border: var(--border);

  box-shadow:
    6px 7px 0
    rgba(23, 22, 17, 0.95);
}


.card:nth-of-type(odd) {
  transform: rotate(-0.25deg);
}


.card:nth-of-type(even) {
  transform: rotate(0.2deg);
}


.card-yellow {
  background: var(--yellow);
}


.card-pink {
  background: var(--pink);
}


.card-blue {
  background: var(--blue);
}


.card-green {
  background: var(--green);
}


.card-coral {
  background: var(--coral);
}


.card-lilac {
  background: var(--lilac);
}


.card-piazza {
  background: var(--piazza);
}


.tape {
  position: absolute;

  top: -13px;
  left: 50%;

  width: 90px;
  height: 27px;

  transform:
    translateX(-50%)
    rotate(-2deg);

  background:
    rgba(255, 253, 247, 0.72);

  border-left:
    1px solid
    rgba(23, 22, 17, 0.08);

  border-right:
    1px solid
    rgba(23, 22, 17, 0.08);
}


.tape-right {
  transform:
    translateX(-50%)
    rotate(2deg);
}


.section-label {
  margin:
    0
    0
    17px;

  font-size: 0.76rem;
  font-weight: 900;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}


.card h2 {
  margin:
    0
    0
    18px;

  max-width: 620px;

  font-size:
    clamp(1.65rem, 6vw, 2.8rem);

  line-height: 0.98;

  letter-spacing: -0.045em;

  font-weight: 900;
}


.lead {
  margin:
    0
    0
    24px;

  font-size:
    clamp(1.05rem, 3vw, 1.3rem);

  line-height: 1.45;

  font-weight: 700;
}


.section-intro {
  margin:
    -5px
    0
    23px;

  font-weight: 700;
}


.definition {
  margin:
    0
    0
    25px;

  font-size:
    clamp(1.05rem, 3vw, 1.25rem);

  font-weight: 700;
}



/* =========================================
   BUTTONS
========================================= */

button {
  cursor: pointer;
}


.black-button,
.small-submit {
  border: 2px solid var(--ink);

  background: var(--ink);
  color: var(--white);

  font-weight: 900;

  letter-spacing: 0.03em;

  box-shadow:
    3px 3px 0
    rgba(255, 253, 247, 0.7);
}


.black-button {
  min-height: 48px;

  padding: 11px 18px;
}


.small-submit {
  min-height: 45px;

  padding: 10px 14px;

  align-self: flex-start;
}


.standalone-button {
  margin-top: 18px;
}


.text-button {
  margin-top: 18px;

  padding: 4px 0;

  border: 0;
  border-bottom:
    1px dashed
    var(--ink);

  background: transparent;

  font-size: 0.78rem;
  font-weight: 900;

  letter-spacing: 0.05em;
}



/* =========================================
   DISCLOSURES
========================================= */

.disclosure-group {
  display: grid;

  gap: 9px;
}


.disclosure-toggle,
.micro-toggle {
  width: fit-content;

  min-height: 42px;

  padding:
    8px
    0;

  border: 0;
  border-bottom:
    1px dashed
    rgba(23, 22, 17, 0.7);

  background: transparent;

  text-align: left;

  font-size: 0.78rem;
  font-weight: 900;

  letter-spacing: 0.035em;
}


.disclosure-panel,
.micro-panel {
  display: none;
}


.disclosure-panel.is-open,
.micro-panel.is-open {
  display: block;
}


.disclosure-panel {
  margin:
    2px
    0
    7px;

  padding:
    17px
    18px;

  border:
    1.5px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.74);

  box-shadow:
    3px 3px 0
    rgba(23, 22, 17, 0.15);
}


.disclosure-panel p:first-child {
  margin-top: 0;
}


.disclosure-panel p:last-child {
  margin-bottom: 0;
}


.editor-panel {
  background:
    rgba(255, 253, 247, 0.88);
}


.source-link {
  display: inline-block;

  margin-top: 8px;

  font-size: 0.73rem;
  font-weight: 900;

  letter-spacing: 0.045em;

  text-decoration-thickness: 1px;
}



/* =========================================
   ASCETA
========================================= */

.answer-form {
  margin-top: 5px;
}


.inline-form {
  display: flex;

  gap: 8px;
}


.inline-form input {
  min-width: 0;
  flex: 1;
}


input,
textarea {
  width: 100%;

  border:
    1.7px solid
    var(--ink);

  border-radius: 0;

  background:
    rgba(255, 253, 247, 0.88);

  color: var(--ink);

  padding:
    12px
    13px;

  font-size: 16px;

  outline: none;
}


textarea {
  resize: vertical;
}


input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline:
    3px solid
    rgba(255, 253, 247, 0.95);

  outline-offset: 2px;
}


.feedback {
  margin:
    14px
    0
    0;

  font-weight: 900;
}


.feedback.is-incorrect {
  font-weight: 800;
}


.answer-reveal {
  margin-top: 16px;

  padding:
    16px;

  border:
    2px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.72);
}


.answer-word {
  margin:
    0
    0
    8px;

  font-size: 1.45rem;
  font-weight: 900;
}


.answer-reveal p:last-child {
  margin-bottom: 0;
}


.optional-contribution {
  margin-top: 18px;
}


.micro-panel {
  margin-top: 10px;

  padding-top: 4px;
}


.micro-copy {
  margin:
    0
    0
    12px;

  max-width: 540px;

  font-size: 0.9rem;
  font-weight: 700;
}


.community-form {
  display: grid;

  gap: 9px;
}


.form-status {
  min-height: 0;

  margin: 3px 0 0;

  font-size: 0.78rem;
  font-weight: 800;
}



/* =========================================
   TIMELINE
========================================= */

.timeline-list {
  display: grid;

  gap: 9px;
}


.timeline-item {
  min-width: 0;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 10px;

  padding:
    11px
    12px;

  border:
    1.7px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.82);

  font-weight: 800;

  cursor: grab;
}


.timeline-item.dragging {
  opacity: 0.5;
}


.drag-handle {
  font-weight: 900;
}


.move-buttons {
  display: flex;

  gap: 4px;
}


.move-buttons button {
  width: 36px;
  height: 36px;

  border:
    1.5px solid
    var(--ink);

  background: transparent;

  font-weight: 900;
}


.timeline-facts {
  margin-top: 18px;

  padding:
    16px;

  border:
    2px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.74);
}


.timeline-facts p {
  margin:
    0
    0
    10px;
}


.timeline-facts p:last-child {
  margin-bottom: 0;
}



/* =========================================
   SOCOTRA / FUORI PORTA
========================================= */

.travel-figure {
  margin:
    0
    0
    22px;
}


.image-placeholder {
  position: relative;

  overflow: hidden;

  aspect-ratio: 1 / 1;

  border:
    2px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.72);
}


.image-placeholder img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}


.missing-image-copy {
  display: none;

  position: absolute;

  inset: 0;

  margin: 0;

  align-items: center;
  justify-content: center;

  text-align: center;

  font-weight: 900;

  font-size: 1rem;
}


.image-placeholder.missing-image
.missing-image-copy {
  display: flex;
}


.travel-figure figcaption {
  margin-top: 7px;

  font-size: 0.75rem;
  font-weight: 800;

  font-style: italic;
}


/*
   IMPORTANTE:
   link UNESCO e "Scopri il fatto vero"
   devono stare uno SOTTO l'altro.
*/

.travel-link {
  display: block;

  width: fit-content;

  margin:
    0
    0
    12px;

  font-size: 0.73rem;
  font-weight: 900;

  letter-spacing: 0.045em;

  text-decoration-thickness: 1px;
}


#fuori-porta .disclosure-toggle {
  display: block;

  width: fit-content;

  clear: both;

  margin-top: 0;
}



/* =========================================
   WORDSEARCH
========================================= */

.word-bank {
  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  margin-bottom: 17px;
}


.word-chip {
  padding:
    5px
    9px;

  border:
    1.5px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.72);

  font-size: 0.72rem;
  font-weight: 900;
}


.word-chip.found {
  text-decoration:
    line-through
    2px;

  opacity: 0.58;
}


.word-grid {
  width: min(100%, 480px);

  display: grid;

  grid-template-columns:
    repeat(10, 1fr);

  gap: 4px;

  margin:
    0
    auto;
}


.letter {
  min-width: 0;

  aspect-ratio: 1 / 1;

  display: grid;

  place-items: center;

  padding: 0;

  border:
    1.5px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.84);

  font-size:
    clamp(0.72rem, 3vw, 1rem);

  font-weight: 900;
}


.letter.selected {
  background: var(--ink);
  color: var(--white);
}


.letter.found {
  background:
    rgba(255, 220, 85, 0.95);
}


.god-facts {
  display: grid;

  gap: 7px;

  margin-top: 14px;
}


.god-fact {
  padding:
    11px
    13px;

  border-left:
    4px solid
    var(--ink);

  background:
    rgba(255, 253, 247, 0.72);

  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}



/* =========================================
   JOKE
========================================= */

.joke {
  font-size:
    clamp(1.1rem, 3.5vw, 1.35rem);

  font-weight: 800;
}


.joke p {
  margin:
    0
    0
    10px;
}


.punchline {
  font-size:
    clamp(1.45rem, 5vw, 2rem);

  font-weight: 900;
}


.curtain {
  margin-top:
    20px !important;

  font-size: 0.85rem;
  font-style: italic;
}



/* =========================================
   PIAZZETTA
========================================= */

.piazza-intro {
  max-width: 570px;

  margin:
    0
    0
    22px;

  font-weight: 700;
}


.piazza-toggle {
  width: 100%;

  min-height: 50px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding:
    11px
    0;

  border: 0;

  border-top:
    2px solid
    var(--ink);

  border-bottom:
    2px solid
    var(--ink);

  background: transparent;

  text-align: left;

  font-size: 0.84rem;
  font-weight: 900;
}


.piazza-chevron {
  flex-shrink: 0;

  font-size: 1.1rem;
}


.piazza-community {
  display: none;

  padding-top: 16px;
}


.piazza-community.is-open {
  display: block;
}


.community-summary {
  display: flex;

  gap: 18px;

  margin-bottom: 14px;

  font-size: 0.82rem;
  font-weight: 900;
}


.comments-list {
  display: grid;

  gap: 10px;
}


.empty-piazza {
  padding:
    13px
    0;

  border-bottom:
    1px dashed
    rgba(23, 22, 17, 0.55);

  font-size: 0.87rem;
  font-weight: 700;
}


.empty-piazza p {
  margin: 0;
}


.comment {
  padding:
    13px
    0;

  border-bottom:
    1px dashed
    rgba(23, 22, 17, 0.55);
}


.comment-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 5px;
}


.comment-name {
  font-size: 0.8rem;
  font-weight: 900;
}


.comment-text {
  margin:
    0
    0
    8px;

  font-size: 0.95rem;
  font-weight: 700;
}


.comment-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;
}


.comment-action {
  padding: 3px 0;

  border: 0;

  background: transparent;

  font-size: 0.75rem;
  font-weight: 900;
}


.comment-action.starred {
  text-decoration: underline;
}


.reply {
  margin:
    10px
    0
    0
    22px;

  padding-left: 12px;

  border-left:
    2px solid
    rgba(23, 22, 17, 0.6);
}


.reply-form {
  display: grid;

  gap: 7px;

  margin-top: 10px;
}


.add-comment-toggle {
  margin-top: 18px;

  min-height: 42px;

  padding:
    7px
    0;

  border: 0;

  border-bottom:
    1px dashed
    var(--ink);

  background: transparent;

  font-weight: 900;
}


.piazza-form-wrap {
  margin-top: 12px;
}



/* =========================================
   FINE DEL DAILY
========================================= */

.finish {
  margin:
    60px
    auto
    0;

  padding:
    42px
    15px;

  border-top:
    3px solid
    var(--ink);

  border-bottom:
    3px solid
    var(--ink);

  text-align: center;
}


.finish-small {
  margin:
    0
    0
    10px;

  font-size: 0.7rem;
  font-weight: 900;

  letter-spacing: 0.15em;
}


.finish h2 {
  margin:
    0
    auto
    20px;

  max-width: 600px;

  font-size:
    clamp(1.8rem, 7vw, 3.4rem);

  line-height: 0.95;

  letter-spacing: -0.05em;
}


.finish p:not(.finish-small) {
  max-width: 570px;

  margin:
    10px auto;

  font-weight: 700;
}



/* =========================================
   FOOTER
========================================= */

.site-footer {
  width:
    min(
      700px,
      calc(100% - 28px)
    );

  margin:
    0
    auto;

  padding:
    0
    0
    35px;

  display: flex;

  justify-content: space-between;

  gap: 20px;

  font-size: 0.7rem;
  font-weight: 800;
}



/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

  .site-header {
    padding:
      28px
      14px
      10px;
  }


  .header-inner {
    align-items: flex-start;

    gap: 12px;
  }


  .header-tagline {
    font-size: 0.65rem;
  }


  .daily {
    width:
      calc(100% - 20px);

    margin-top: 16px;
  }


  .card {
    margin:
      26px
      0;

    padding:
      28px
      20px;

    box-shadow:
      4px
      5px
      0
      var(--ink);
  }


  .inline-form {
    align-items: stretch;
  }


  .inline-form .black-button {
    flex-shrink: 0;
  }


  .timeline-item {
    grid-template-columns:
      auto
      minmax(0, 1fr);
  }


  .move-buttons {
    grid-column:
      1 / -1;

    justify-self: end;
  }


  .word-grid {
    gap: 3px;
  }


  .letter {
    border-width: 1px;
  }


  .travel-link {
    margin-bottom: 10px;
  }


  #fuori-porta .disclosure-toggle {
    margin-top: 2px;
  }


  .site-footer {
    flex-direction: column;

    gap: 5px;
  }

}