/* ==========================================================================
   Tooreen Construction — privacy policy and terms pages
   A readable document column with a sticky contents list, on the site's
   pale photographic background.
   ========================================================================== */

.legal{
  padding:clamp(56px,7vw,110px) var(--ch-gutter) clamp(72px,8vw,124px);
  color:#12372c;
  font-family:var(--ch-body);
}
.legal__grid{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:250px minmax(0,760px);
  gap:clamp(40px,6vw,100px);
  justify-content:center;
}

/* contents */
.legal__toc{position:sticky;top:32px;align-self:start}
.legal__toc-label{
  margin:0 0 14px;
  color:#b88e36;
  font-size:10px;
  font-weight:700;
  letter-spacing:.24em;
  text-transform:uppercase;
}
.legal__toc ol{list-style:none;margin:0;padding:0;border-left:1px solid rgba(18,55,44,.16)}
.legal__toc a{
  display:block;
  margin-left:-1px;
  padding:7px 0 7px 16px;
  border-left:2px solid transparent;
  color:#5d6d64;
  font-size:13px;
  line-height:1.35;
  text-decoration:none;
  transition:color .2s ease,border-color .2s ease;
}
.legal__toc a:hover,
.legal__toc a.is-current{color:#12372c;border-left-color:#d5b65f}

/* document */
.legal__intro{
  margin:0 0 8px;
  font-size:clamp(17px,1.3vw,19px);
  line-height:1.7;
  color:#243d33;
}
.legal__article section{
  padding:30px 0;
  border-top:1px solid rgba(18,55,44,.14);
  scroll-margin-top:24px;
}
.legal__article section:first-of-type{border-top:0;padding-top:18px}
.legal__article h2{
  display:flex;
  align-items:baseline;
  gap:14px;
  margin:0 0 14px;
  color:#12372c;
  font-family:var(--ch-display);
  font-size:clamp(26px,2.3vw,34px);
  font-weight:700;
  line-height:1.02;
  letter-spacing:.01em;
  text-transform:uppercase;
}
.legal__article h2 span{color:#b88e36;font-size:.62em;letter-spacing:.06em}
.legal__article p,
.legal__article li{
  margin:0;
  color:#34463d;
  font-size:16px;
  line-height:1.75;
}
.legal__article p + p{margin-top:12px}
.legal__article ul{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:6px}
.legal__article li{position:relative;padding-left:22px}
.legal__article li::before{
  content:"";
  position:absolute;
  left:2px;
  top:.78em;
  width:8px;
  height:2px;
  background:#d5b65f;
}
.legal__article a{
  color:#12372c;
  font-weight:600;
  text-decoration:underline;
  text-decoration-color:rgba(184,142,54,.7);
  text-decoration-thickness:1px;
  text-underline-offset:3px;
  transition:color .2s ease,text-decoration-color .2s ease;
}
.legal__article a:hover{color:#b88e36;text-decoration-color:#b88e36}
.legal__article a:focus-visible{outline:2px solid #b88e36;outline-offset:3px}

.legal__address{
  margin-top:14px;
  padding:18px 20px;
  border-left:2px solid #d5b65f;
  background:rgba(255,255,255,.5);
}
.legal__address p{margin:0;font-size:15px;line-height:1.65}

.legal__updated{
  margin-top:26px;
  padding:24px 26px;
  background:#0b2b21;
  color:rgba(239,237,218,.86);
}
.legal__updated strong{
  display:block;
  margin-bottom:6px;
  color:#d5b65f;
  font-size:10px;
  font-weight:700;
  letter-spacing:.24em;
  text-transform:uppercase;
}
.legal__updated p{margin:0;color:inherit;font-size:14px;line-height:1.7}

@media (max-width:900px){
  .legal__grid{grid-template-columns:1fr;gap:28px}
  .legal__toc{position:static;padding:18px 20px;background:rgba(255,255,255,.55);border:1px solid rgba(18,55,44,.12)}
  .legal__toc ol{columns:2;column-gap:24px;border-left:0}
  .legal__toc li{break-inside:avoid}
  .legal__toc a{padding:6px 0;margin:0;border-left:0}
}
@media (max-width:520px){
  .legal__toc ol{columns:1}
  .legal__article p,.legal__article li{font-size:15px}
}

/* cookie table (privacy policy) */
.legal__table-wrap{margin:18px 0 6px}
.legal__table{
  width:100%;
  border-collapse:collapse;
  border:1px solid rgba(18,55,44,.16);
  background:rgba(255,253,246,.72);
  font-size:14px;
  line-height:1.55;
}
.legal__table caption{
  padding:0 0 10px;
  color:#b88e36;
  font-size:10px;
  font-weight:700;
  letter-spacing:.2em;
  text-align:left;
  text-transform:uppercase;
}
.legal__table th,
.legal__table td{
  padding:12px 14px;
  border-bottom:1px solid rgba(18,55,44,.12);
  color:#34463d;
  text-align:left;
  vertical-align:top;
}
.legal__table th{
  background:#0b211b;
  color:#efedda;
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.legal__table tbody tr:last-child td{border-bottom:0}
.legal__table code{
  color:#12372c;
  font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;
  font-size:13px;
  overflow-wrap:anywhere;
}
.legal__article p[data-cookie-settings]{margin-top:16px}
.legal__cookie-settings{
  min-height:46px;
  padding:0 20px;
  border:1px solid #0b211b;
  border-radius:3px;
  background:#0b211b;
  color:#efedda;
  font-family:inherit;
  font-size:12px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease;
}
.legal__cookie-settings:hover{border-color:#d5b65f;background:#d5b65f;color:#0b211b}
.legal__cookie-settings:focus-visible{outline:2px solid #b88e36;outline-offset:3px}

/* phones: each cookie becomes a labelled card */
@media (max-width:700px){
  .legal__table,
  .legal__table tbody,
  .legal__table tr,
  .legal__table td{display:block;width:100%}
  .legal__table{border:0;background:none}
  .legal__table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .legal__table tr{
    margin-bottom:10px;
    border:1px solid rgba(18,55,44,.16);
    background:rgba(255,253,246,.8);
  }
  .legal__table td{
    padding:10px 14px;
    font-size:14px;
  }
  .legal__table td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:2px;
    color:#b88e36;
    font-size:10px;
    font-weight:700;
    line-height:1.9;
    letter-spacing:.14em;
    text-transform:uppercase;
  }
  .legal__table tbody tr:last-child td{border-bottom:1px solid rgba(18,55,44,.12)}
  .legal__table tr td:last-child{border-bottom:0}
}
