/* Cozy Tidy Spaces
   Y tuong: moi bai viet la mot hop luu tru co dan nhan, dat tren ke go. */

:root {
  --paper: #f5f7f6;
  --ink: #1e2b31;
  --muted: #56666c;
  --link: #1f5a85;
  --shelf: #cbae80;
  --shelf-edge: #a88958;
  --line: #d9dfdc;

  --sage: #c3d6c5;
  --sage-rim: #9dbaa1;
  --sky: #c5dbea;
  --sky-rim: #9cbdd4;
  --blush: #edd3c8;
  --blush-rim: #d6ae9e;
  --butter: #f0e3ae;
  --butter-rim: #d8c57c;

  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.7;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2.5rem, 41rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
}

/* Dau trang */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1.1rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* Mo dau trang chu va trang chuyen muc */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 7.2vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.hero p,
.page-head p {
  font-size: 1.25rem;
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
}

.page-head {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
}

.page-head h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.025em;
}

.empty {
  color: var(--muted);
  padding-bottom: 4rem;
}

/* Ke va hop */

.shelf {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 1.5rem;
  margin: 0 0 3.5rem;
  padding: 0 1.25rem;
  border-bottom: 14px solid var(--shelf);
  box-shadow: 0 4px 0 var(--shelf-edge);
}

.bin a {
  display: flex;
  flex-direction: column;
  min-height: 12.5rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 4px 4px 10px 10px;
  border-top: 10px solid var(--rim);
  background: var(--bin);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease-out;
}

.bin a:active {
  transform: translateY(-2px);
}

.bin a::before {
  content: "";
  align-self: center;
  width: 3.75rem;
  height: 0.7rem;
  border-radius: 1rem;
  background: var(--rim);
  margin-bottom: auto;
}

.bin.has-image a::before {
  display: none;
}

.bin a:hover {
  transform: translateY(-6px);
}

.bin img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 0.9rem;
}

.label {
  display: block;
  margin-top: 2.5rem;
  background: #fff;
  border-radius: 3px;
  padding: 0.8rem 0.9rem 0.75rem;
  box-shadow: 0 1px 0 rgba(30, 43, 49, 0.2);
}

.bin.has-image .label {
  margin-top: 0;
}

.label-title {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.label-kind {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--muted);
}

.bin-sage { --bin: var(--sage); --rim: var(--sage-rim); }
.bin-sky { --bin: var(--sky); --rim: var(--sky-rim); }
.bin-blush { --bin: var(--blush); --rim: var(--blush-rim); }
.bin-butter { --bin: var(--butter); --rim: var(--butter-rim); }

/* Bai viet */

.post-head {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
}

.post-head h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.4rem);
  letter-spacing: -0.025em;
}

.crumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
}

.crumb li + li::before {
  content: "/";
  margin-inline: 0.6rem;
  color: var(--muted);
}

.crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.meta {
  margin: 1.1rem 0 0;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--muted);
}

.disclosure {
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border-left: 6px solid var(--shelf);
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.55;
}

.post-image {
  width: min(100% - 2.5rem, 52rem);
  margin: 1rem auto 0;
  border-radius: 6px;
}

.prose {
  padding-bottom: 4.5rem;
  overflow-wrap: anywhere;
}

.prose > * {
  margin-block: 0;
}

.prose > * + * {
  margin-top: 1.35rem;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.85rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose strong {
  font-weight: 600;
}

.prose img {
  border-radius: 6px;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 6px solid var(--shelf);
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.4;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.prose th {
  border-bottom: 2px solid var(--ink);
}

.buy {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}

.buy:hover,
.buy:active {
  background: var(--link);
}

.buy:focus-visible {
  outline-offset: 4px;
}

.related h2 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

/* Chan trang */

.site-footer {
  border-top: 14px solid var(--shelf);
  box-shadow: 0 -4px 0 var(--shelf-edge);
  margin-top: 1rem;
  padding-block: 2.25rem 3rem;
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.5;
}

.site-footer p {
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Man hinh nho */

@media (max-width: 46rem) {
  body {
    font-size: 1.0625rem;
  }

  .shelf {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-inline: 0.75rem;
    margin-bottom: 2.5rem;
  }

  .bin a {
    min-height: 0;
  }

  .label {
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bin a {
    transition: none;
  }

  .bin a:hover {
    transform: none;
  }
}
