#!/usr/bin/env python3
"""Writes policy-draft.docx: a shipping-and-returns policy typed as one long run of Normal paragraphs - no heading
styles, section labels numbered four different ways, the rates table as tab-separated text, eight spelling
mistakes, one paragraph pasted twice, a date written two ways. Needs python-docx. Deterministic."""
import pathlib
from docx import Document
from docx.shared import Pt
HERE = pathlib.Path(__file__).parent
PARAS = [
 "Quinta da Ribeira - Shipping and Returns Policy (draft, valid from 1 July 2026)",
 "1. Introduction",
 "This policy explains how we ship the things you order from quintadaribeira.example and what happens if you want to send something back. It applies to every order placed on the website. By placing an order you accept these terms. We keep the policy short on purpose, so if something is not covered here, write to us and we will sort it out.",
 "Section 2 - Shipping within Portugal",
 "We ship from Lisbon with CTT. Orders placed before 14:00 on a working day leave the same day; orders placed after 14:00, or on weekends and public holidays, leave the next working day. You will recieve a tracking number by email as soon as the parcel is collected.",
 "Shipping is free on orders over €60 to mainland Portugal. Below €60 the rates in the table apply. Wine and Ginjinha are packed in seperate boxes from ceramics, so a mixed order may arrive as two parcels on the same day.",
 "Zone\tUp to 2 kg\t2 to 5 kg\tOver 5 kg",
 "Portugal mainland\t€4.90\t€6.90\t€9.90",
 "Azores and Madeira\t€7.90\t€11.90\t€16.90",
 "Spain\t€8.90\t€12.90\t€18.90",
 "Rest of the EU\t€12.90\t€18.90\t€26.90",
 "3) Shipping to the rest of Europe",
 "We ship to Spain and to the rest of the European Union at the rates in the table above. We do not ship outside the EU for now. Please make sure your adress is complete, including the door number and postcode; parcels returned to us because of an incomplete address are re-sent at the customer's cost.",
 "Shipping is free on orders over €60 to mainland Portugal. Below €60 the rates in the table apply. Wine and Ginjinha are packed in seperate boxes from ceramics, so a mixed order may arrive as two parcels on the same day.",
 "4 Delivery times",
 "Mainland Portugal: 2 to 3 working days. Azores and Madeira: 5 to 7 working days. Spain: 3 to 5 working days. Rest of the EU: 4 to 8 working days. These are estimates, wich the carrier occassionally misses in December and around Easter; we are not responsible for carrier delays, but we will chase them for you.",
 "5. Returns",
 "You can return any unopened item within 14 days of receiving it, for any reason. Tell us first by email so we can send you a returns label; do not send anything back untill you have the label. Return shipping is paid by the customer unless the item was damaged or wrong. Opened food and drink cannot be returned, for hygiene reasons, unless it was faulty.",
 "Refunds (6)",
 "We refund to the original payment method within 5 working days of the parcel arriving back at the shop. The original shipping cost is refunded only when the return is our fault. We definately do not refund to a different card or account.",
 "7. Damaged items",
 "If something arrives broken or leaking, send us a photo of the item and the box within 48 hours of delivery and we will replace it or refund it - your choice. Keep the packaging until we have replied. We cannot guarentee a replacement of a discontinued item, in which case we refund.",
 "8. Contact us",
 "Email hello@quintadaribeira.example or call +351 210 000 000, Monday to Friday, 10:00 to 18:00. We answer every email within one working day.",
 "Last updated 07/01/2026.",
]
doc = Document()
st = doc.styles["Normal"]; st.font.name = "Calibri"; st.font.size = Pt(11)
for p in PARAS:
    doc.add_paragraph(p)
doc.save(HERE / "policy-draft.docx")
print("wrote policy-draft.docx,", len(PARAS), "paragraphs")
